Author Question: What are supertype and subtype entities? Include an example. What will be an ideal ... (Read 58 times)

crobinson2013

  • Hero Member
  • *****
  • Posts: 535
What are supertype and subtype entities? Include an example.
 
  What will be an ideal response?

Question 2

Explain the representation of a one-to-many strong entity relationship in a relational database design.
 
  What will be an ideal response?



Kedrick2014

  • Sr. Member
  • ****
  • Posts: 359
Answer to Question 1

When instances of an entity can be categorized into different types with each type sharing some common characteristics while having certain characteristics that are unique to each type, the common attributes can be separated from the unique ones. This is represented in E-R diagrams through the use of supertype and subtype entities. The supertype entity class contains the attributes that are common to all of the subtypes. The subtype entity classes represent the different types, or categories, of the supertype. Only the attributes that are unique to a given subtype tend to be listed as the attributes of that subtype. Each subtype has a relationship with the supertype. All subtypes should have the same identifier as the supertype since they represent different perspectives of the same thing. As an example, consider VEHICLE (VIN, year, make) as a supertype, with subtypes CAR (VIN, model, seatingCapacity) and MOTORCYCLE (VIN, horsepower). All vehicles have VINs, a year, and a make. CARs additionally have a model and a seating capacity and MOTORCYCLES additionally have a horsepower rating.

Answer to Question 2

One-to-many relationships are represented by placing the primary key of the table on the one side of the relationship into the table on the many side of the relationship as a foreign key. The term parent refers to the table on the one side of a 1:N relationship, and the term child refers to the table on the many side of the 1:N relationship. Therefore, the rule for representing a one-to-many relationship can be summarized as Place the key of the parent table in the child table as a foreign key.



Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
 

Did you know?

Only one in 10 cancer deaths is caused by the primary tumor. The vast majority of cancer mortality is caused by cells breaking away from the main tumor and metastasizing to other parts of the body, such as the brain, bones, or liver.

Did you know?

Computer programs are available that crosscheck a new drug's possible trade name with all other trade names currently available. These programs detect dangerous similarities between names and alert the manufacturer of the drug.

Did you know?

Allergies play a major part in the health of children. The most prevalent childhood allergies are milk, egg, soy, wheat, peanuts, tree nuts, and seafood.

Did you know?

Human kidneys will clean about 1 million gallons of blood in an average lifetime.

Did you know?

Chronic necrotizing aspergillosis has a slowly progressive process that, unlike invasive aspergillosis, does not spread to other organ systems or the blood vessels. It most often affects middle-aged and elderly individuals, spreading to surrounding tissue in the lungs. The disease often does not respond to conventionally successful treatments, and requires individualized therapies in order to keep it from becoming life-threatening.

For a complete list of videos, visit our video library