Unformatted text preview:

HW_1BChapter 88.2 Define the following terms: superclass of a subclass, superclass/subclass relationship, IS-Arelationship, specialization, generalization, category, specific (local) attributes, and specific relationships.● Superclass of a subclass is an entity type which has a subgrouping of entities that haveadditional specific attributes and/or relationships.● Superclass/subclass relationship is the relationship between superclass and one of itssubclasses. A subclass cannot exist on its own, so this relationship is mandatory for everysubclass.● IS-A relationship is another name for superclass/subclass relationship that is often used whenreferring to the concept. Instead of saying BOOK and NOVEL entity types participate insuperclass/subclass relationship, we could simply say NOVEL IS-A BOOK.● Specialization is the procedure of creating a set of subclasses, based on their differences, for theparticular entity that becomes the superclass.● Generalization is the procedure of creating a single superclass for several different entity types,based on common attributes or relationships. Entity types that are generalized becomesubclasses of the created superclass.● Category is a subclass which represents a collection of entities of different types. Category is asubset of the union of entity sets of different entity types. It can be total or partial. Totalcategory has a superclass that is union of all entity types while partial category has a subset ofthe union as its superclass.● Specific (local) attributes are attributes that can be found in subclasses and cannot be found insuperclasses. They are optional and are used to distinguish specific subclasses from othersubclasses.● Specific relationships are relationship types in which only the specific subclass or subclasses canparticipate in. The superclass is not allowed to participate in specific relationships, and likespecific attributes, they are optional.8.3 Discuss the mechanism of attribute/relationship inheritance. Why is it useful?Attribute/inheritance mechanism can be noticed when dealing with superclass and subclassconcepts. The general rule is that the subclass inherits all the attributes and relationships fromits superclass, but there are some special cases, so here is a brief description ofattribute/relationship inheritance mechanisms:● Type inheritanceEntity that is a member of a subclass inherits all attributes and relationships from itssuperclass but can also have additional attributes and relationships (specific/local). Thisway, a subclass can be viewed as an entity of its own.● Hierarchies (single inheritance)In specialization hierarchy, there is a rule that every entity type can participate as asubclass in only one class/subclass relationship. This means that a subclass can be asubclass of a superclass once, but that same subclass can be superclass to any number ofother subclasses. In this case, the subclass inherits all the attributes and relationshipsfrom direct and indirect superclasses all the way to the root of hierarchy.● Lattices (multiple inheritance)In specialization lattice, a single subclass can have more than one superclass. Everyattribute and relationship that can be found in any of the superclasses is inherited tosubclass. There is a rule of uniqueness that states that every attribute must be inheritedonly once.Example: Let's say there are entity types PERSON, LIBRARIAN, ARCHIVIST and DIRECTORin the Library database. PERSON is a superclass and has two subclasses LIBRARIAN andARCHIVIST. To be a DIRECTOR, one must have experience with archiving and regularlibrary jobs, so a DIRECTOR is a shared subclass between ARCHIVIST and LIBRARIAN.DIRECTOR entity type inherits all attributes from ARCHIVIST, LIBRARIAN and PERSONentity types with constraint that if some attribute appears more than once, it is inheritedjust once so no duplicate attributes exist.Attribute/inheritance mechanism is useful because there is no need for duplicating the sametype of attributes and relationships. Database schema looks more concise and it is easier tolocate attributes and relationships when we understand the concept of inheritance.8.5 Discuss user-defined and attribute-defined specializations, and identify the differences betweenthe two.User-defined specializations are specializations in which the user chooses how to sort entityinstances into subclasses. User decides the sorting criteria however he/she pleases.Attribute-defined specializations are specializations in which all the subclasses arepredicate-defined and the membership condition for all subclasses is on the same definingsuperclass attribute.User-defined specializationsAttribute-defined specializationsMembership of user-defined definedspecialization cannot be decided automaticallyMembership of attribute defined specializationcan be decided automaticallyThe user is responsible for identifying propersubclassThe value of the same attribute is used in definingpredicate for all subclasses8.19 Identify all the important concepts represented in the library database case study describedbelow. In particular, identify the abstractions of classification (entity types and relationship types),aggregation, identification, and specialization/generalization. Specify (min, max) cardinality constraintswhenever possible. List details that will affect the eventual design but that have no bearing on theconceptual design. List the semantic constraints separately. Draw an EER diagram of the librarydatabase.In the given case study we deal with 4 types of abstractions:● Classification● Aggregation● Identification● specialization/generalization.CLASSIFICATIONEntity types:● BOOK (ISBN, Title, Author (multivalued), Language (multivalued), Edition, Binding,Description, Subject_area (multivalued), No_of_copies).● MEMBER (SSN, Name, Campus_addr, Home_addr (multivalued), Phone_no(multivalued))● CARD (Card_no, Valid_until)● LIBRARIAN (SSN, Name, Salary)Relationship types:● CHECKS-OUT (Time_to_return) This is a ternary relationship type that relates MEMBER,LENDABLE book and CHECK-OUT librarian. Member can check-out up to 5 books at thesame time. All entity types participating in this relationship have partial participationconstraint, meaning, it is not necessary to check-out.● MAILES (Date) This ternary relationship type relates ASSISTANT, CARD and FACULTYmember. Not every card has to be mailed and not every assistant has to mail a card, soonly the FAULTY member

View Full Document

UTD CS 6360 - Chapter 8 HW

Download Chapter 8 HW
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...

Join to view Chapter 8 HW and access 3M+ class-specific study document.

We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Chapter 8 HW 2 2 and access 3M+ class-specific study document.


By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?