1

この単純化された例を使用します。どのアプローチがより良いと思いますか、またその理由は何ですか?

編集: 関係は 1 対 1 でなければなりません。生徒は 1 つの学校にしか存在しません。

Option1

**Table Schools:**
id int primary key;
name string;
**Table students:**
id int primary key;
name string;
idSchool int;

Option2

**Table Schools:**
id int primary key;
name string;
**Table Students:**
id int primary key;
name string;
**Table SchoolsStudents**
idSchool int;
idStudent int;
idSchool, idStudent as primary key;
4

1 に答える 1