Master Detail 表的结构应该如何?

How should the Master Detail tables estructure be?

我想将一些加班时间登记到数据库中。我有两个 tables.. 我希望用户能够为每个员工一次添加几个小时。这意味着他们对多个输入有一个 ID。 我想知道我的结构是什么,我有一个 table 包含 ID、EMPLOYEE、DATE、NUMBER OF HOURS,另一个包含 ID、EMPLOYEE、DATE_REGISTRATION、NO_EMPL_BOSS, NO_EMPL_SUB.

我希望创建一个包含一些基本信息的 ID,然后为同一名员工添加每个时间段的注册表(可能是一个月中的几个)。

create table Employees(
id int not null primary key identity,
name nvarchar(200),
registrationDate datetime
);

create table Employees_overtime(
id int not null primary key identity,
employee_id int not null,
creationDate datetime,
overtime float not null,
constraint fk_employees_overtime foreign key(employee_id) references Employees(id)
);

我猜你的意思是这样的