Author Question: What are supertype and subtype entities? Include an example. What will be an ideal ... (Read 57 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?

It is believed that humans initially contracted crabs from gorillas about 3 million years ago from either sleeping in gorilla nests or eating the apes.

Did you know?

Most childhood vaccines are 90–99% effective in preventing disease. Side effects are rarely serious.

Did you know?

Asthma-like symptoms were first recorded about 3,500 years ago in Egypt. The first manuscript specifically written about asthma was in the year 1190, describing a condition characterized by sudden breathlessness. The treatments listed in this manuscript include chicken soup, herbs, and sexual abstinence.

Did you know?

To prove that stomach ulcers were caused by bacteria and not by stress, a researcher consumed an entire laboratory beaker full of bacterial culture. After this, he did indeed develop stomach ulcers, and won the Nobel Prize for his discovery.

Did you know?

More than one-third of adult Americans are obese. Diseases that kill the largest number of people annually, such as heart disease, cancer, diabetes, stroke, and hypertension, can be attributed to diet.

For a complete list of videos, visit our video library