Category Types
From: George R. <gringro1_at_yahoo.com>
Date: 17 Jun 2003 11:52:54 -0700
Message-ID: <d3ffc970.0306171052.27c74f1d_at_posting.google.com>
Are category types a bad database design methodology? For example, a person, company, or bank can own a car. To represent this scenario, I created the following entities: PERSON, COMPANY, BANK, OWNER, and CAR. The OWNER table contains a surrogate key and a type attribute which could be either a person, company, or bank. So the entities looks like the following:
Date: 17 Jun 2003 11:52:54 -0700
Message-ID: <d3ffc970.0306171052.27c74f1d_at_posting.google.com>
Are category types a bad database design methodology? For example, a person, company, or bank can own a car. To represent this scenario, I created the following entities: PERSON, COMPANY, BANK, OWNER, and CAR. The OWNER table contains a surrogate key and a type attribute which could be either a person, company, or bank. So the entities looks like the following:
Person
personID, fname, lname, ownerID
Company
companyID, fname, lname, ownerID
Bank
bankID, fname, lname, ownerID
Owner
ownerID, type
Car
year, make, model, ownerID
Thank you,
gr
Received on Tue Jun 17 2003 - 20:52:54 CEST