SQL Table Foreign Key that is part of a Composite Primary Key
问题 Is it possible to have a table's foreign key be part of another table's composite primary key? For example, if I have two tables, one contains information on all active projects of different users and another containing information on what equipment is being used by the projects: Project Table: Composite Primary Keys: UserId, ProjectId (neither are unique by themselves) Equipment Table: Composite Primary Keys: UserId, ProjectId, EquipmentId (neither are unique by themselves) Now is it