Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
アカウント所有者が「友達」を持つアプリケーションを設計しています。それらの友達を元のアカウント所有者にリンクするにはどうすればよいですか? 効率的な SQL テーブルは次のようになります。
AccountHolderID (varChar 20) FriendsID (nText)
似たようなものを実装します - 友達を保持するためにテーブルを使用します...私たちのものは、友達のテーブルとして非常に単純に分解されます...
AccountHolderId( type) FriendAccountHolderId ( type) Created(datetime) // useful for tracking when the friend was added
Id フィールドは両方とも Accounts/Users テーブルにリンクしています。