Question

In: Computer Science

Could you expound in database modeling, how subclass and superclass are used? Maybe you can use...

Could you expound in database modeling, how subclass and superclass are used? Maybe you can use these terms(cardinality constraint , total participation constraint, weak entity type, partial key, IS-A relationship, specialization and generalization, specific (or local) attribute, specific relationship, aggregation)

Solutions

Expert Solution

Specialized class are often called as subclass while generalized class are called superclass, probably inspired by object oriented programming. A sub-class is best understood by “IS-A analysis”. Following statements hopefully makes some sense to your mind “Technician IS-A Employee”, “Laptop IS-A Computer”.

An entity is specialized type/class of other entity. For example, Technician is special Employee in a university system Faculty is special class of Employee. We call this phenomenon as generalization/specialization. In the example here Employee is generalized entity class while Technician and Faculty are specialized class of Employee.

Example – This example instance of “sub-class” relationships. Here we have four sets employee: Secretary, Technician, and Engineer. Employee is super-class of rest three set of individual sub-class is subset of Employee set.

  • An entity belonging to a sub-class is related with some super-class entity. For instance emp no 1001 is a secretary, and his typing speed is 68. Emp no 1009 is engineer (sub-class) and her trade is “Electrical”, so forth.
  • Sub-class entity “inherits” all attributes of super-class; for example employee 1001 will have attributes eno, name, salary, and typing speed.

Constraints – There are two types of constraints on “Sub-class” relationship.

  • Total or Partial – A sub-classing relationship is total if every super-class entity is to be associated with some sub-class entity, otherwise partial. Sub-class “job type based employee category” is partial sub-classing – not necessary every employee is one of (secretary, engineer, and technician), i.e. union of these three types is proper subset of all employees. Whereas other sub-classing “Salaried Employee AND Hourly Employee” is total; union of entities from sub-classes is equal to total employee set, i.e. every employee necessarily has to be one of them.
  • Overlapped or Disjoint – If an entity from super-set can be related (can occur) in multiple sub-class sets, then it is overlapped sub-classing, otherwise disjoint. Both the examples: job-type based and salaries/hourly employee sub-classing are disjoint.

Related Solutions

Q. Explain how to invoke a superclass method from a subclass method for the case in...
Q. Explain how to invoke a superclass method from a subclass method for the case in which the subclass method overrides a superclass method and the case in which the subclass method does not override a superclass method. [1 Mark] this is a correct answer but i want answer it  in different way   : In the case where the subclass method overrides the superclass method, it is necessary to explicitly use the keyword super, to invoke the method of the superclass as...
how can object -relational database be used to implement an SDBMS?
how can object -relational database be used to implement an SDBMS?
How can you use motivation theory in the workplace? How could you use motivation theory to...
How can you use motivation theory in the workplace? How could you use motivation theory to design employment policies which would increase or sustain employee motivation? Give specific examples.
Can Western blotting be used as a quantitative technique? How could we use Western analysis to...
Can Western blotting be used as a quantitative technique? How could we use Western analysis to determine the relative change in a protein's expression levels between two treatments? What would we need to be able to determine the absolute level of a protein (i.e. ng/mg of total protein)?
What Is Confidence Interval, and how can it be used? Could you please give me a...
What Is Confidence Interval, and how can it be used? Could you please give me a few examples and thanks so much.
How could you use play in light of Vygotsky’s sociocultural theory? How could you use play...
How could you use play in light of Vygotsky’s sociocultural theory? How could you use play in light of Piaget’s four stages of cognitive development theory?
Describe in detail (you can use a sketch with numbers) how you could distinguish between the...
Describe in detail (you can use a sketch with numbers) how you could distinguish between the ISOMERS of diisopropyl ether and dipropyl ether using HNMR AND CNMR.
Describe what a database system is and how it is used. What is a relational database...
Describe what a database system is and how it is used. What is a relational database system and how used in a company to benefit an organization? What does it mean to run a query?
We have provided you the Hotel database to be used with SQLite DBMS. You should use...
We have provided you the Hotel database to be used with SQLite DBMS. You should use this database in SQLite to extract the necessary information as per the following query requirements. The sqlite script is based on the following relational schema: •Hotel (hotelNo, hotelName, city) • Room (roomNo, hotelNo, type, price) • Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo) •Guest (guestNo, guestName, guestAddress) Note the following details of the hotel database; •Hotel contains hotel details and hotelNo is the primary key;...
Describe the functions provided by a relational database that could be used to record courses taken...
Describe the functions provided by a relational database that could be used to record courses taken by university students in order to manage scheduling and preparing transcripts. Please respond with 200-250 words. Thanks
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT