sql - How to determine which columns to use as foreign keys? -


i need bit of refresher regarding sql database design, particularly how , columns use foreign key.

below 2 designs came with, can please tell makes more sense? me, believe design 2 seems better..

edit:

a project can contain 1 team. team can have 1 or more team members. likewise, team member can part of 1 or more teams. using microsoft visio, uml crow foot notation create these images.

the main reason separated project projectteamorg segregate data, realistically, going have many elements project , separating these own db tables.

design 1 design 1

design 2 design 2

the purpose of database not clear. did not explain flow of data. unable see team table. there? or projectteamorg team table.

please explain flow of data. 1 can able you.


Comments