| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Sub-Entities
When creating sub-entities should you put a column in the root table
saying what kind of sub-entity it is, or is the presence of a row in
the more specific table? For example:
CREATE TABLE dbo.Clients
(
ClientIdentifier varchar(20) NOT NULL PRIMARY KEY
)
CREATE TABLE dbo.Individuals
(
ClientIdentifier varchar(20) NOT NULL PRIMARY KEY REFERENCES
dbo.Clients ( ClientIdentifier ),
NameTitleCode varchar(12) NOT NULL,
GivenName varchar(40) NOT NULL,
FamilyName varchar(40) NOT NULL
)
CREATE TABLE dbo.Organizations
(
ClientIdentifier varchar(20) NOT NULL PRIMARY KEY REFERENCES
dbo.Clients ( ClientIdentifier ),
OrganizationName varchar(200) NOT NULL
)
What is the best way to force a client to only be an individual OR an organization? Trigger? Received on Fri Jul 01 2005 - 21:57:42 CDT
![]() |
![]() |