Re: Can FK be nullable/optional by design?
From: Trey Walpole <treyNOpole_at_SPcomcastAM.net>
Date: Mon, 1 Dec 2003 10:55:46 -0600
Message-ID: <u3p24vCuDHA.3144_at_tk2msftngp13.phx.gbl>
Date: Mon, 1 Dec 2003 10:55:46 -0600
Message-ID: <u3p24vCuDHA.3144_at_tk2msftngp13.phx.gbl>
[ps. in Case B, where did PersonID come from? Is that the Client?]
> Example: There are clients. A client might belong to only one group.
>
> Case A.
> Group(GroupID PK, Name,Code.)
> Client(ClientID PK, Name, GroupID FK NULL)
>
>
> Case B(more cleaner)
> Group(GroupID PK, Name, GroupCode.)
>
> Client (ClientID PK, Name, ..)
> Subtype:
> GroupedClient (PersonID PK/FK, GroupID FK NOT NULL)
>
> There is one more entity in Case B and it will require an additional
> join in compare with caseA
> Example: Select all clients that belongs to any group
>
>
> Summary Q: Is it worth to go with CaseB?
>
> Thank you in advance
Received on Mon Dec 01 2003 - 17:55:46 CET