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

Certain chemicals, after ingestion, can be converted by the body into cyanide. Most of these chemicals have been removed from the market, but some old nail polish remover, solvents, and plastics manufacturing solutions can contain these substances.

Did you know?

Patients who have been on total parenteral nutrition for more than a few days may need to have foods gradually reintroduced to give the digestive tract time to start working again.

Did you know?

Although the Roman numeral for the number 4 has always been taught to have been "IV," according to historians, the ancient Romans probably used "IIII" most of the time. This is partially backed up by the fact that early grandfather clocks displayed IIII for the number 4 instead of IV. Early clockmakers apparently thought that the IIII balanced out the VIII (used for the number 8) on the clock face and that it just looked better.

Did you know?

Thyroid conditions cause a higher risk of fibromyalgia and chronic fatigue syndrome.

Did you know?

Cyanide works by making the human body unable to use oxygen.

For a complete list of videos, visit our video library