| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Can FK be nullable/optional by design?
depends on what a Group is and how it is used...
e.g.,
is a Group a Super-Client? -- individual Clients may be subsidiaries of a
Super-Client?
is a Group in internal designation, like a Sales territory?
How many Clients are there likely to be w/o a group? When you need to act on the clients that are grouped, do you also need to act on the clients that are not grouped?
[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 - 10:55:46 CST
![]() |
![]() |