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.
MySQL でリレーショナル データベースを構築していますが、問題があります。 たとえば、クライアントとコースのテーブルがあります。 1 人のクライアントが複数のコースを訪問できます。 これをどのようにデータベースに保存できますか?
これは実際には多対多の関係であり、3 つのテーブルでモデル化すると思います。
Client - ClientId (PK) - other fields Cource - CourceId (PK) - other fields ClientCourceVisit - ClientId (FK) - CourceId (FK) - other fields