How to determine which columns to use as foreign keys?

时间:2015-05-08 10:06:11

标签: sql database-design foreign-key-relationship

I need a bit of refresher regarding SQL Database Design, particularly how and what columns to use for a Foreign Key.

Below are 2 designs I came up with, can please tell which makes more sense? For me, I believe Design 2 seems better..

EDIT:

A Project can contain only 1 Team. A Team can have one or more Team Members. Likewise, a Team Member can be part of one or more Teams. I am using Microsoft Visio, UML Crow Foot Notation to create these images.

The main reason I separated Project from ProjectTeamOrg is to segregate the data, as realistically, I am going to have many elements for a Project and am separating these into their own DB Tables.

Design 1 Design 1

Design 2 Design 2

0 个答案:

没有答案