A Supertype Entity Can Contain as Many as ____ Subtype Entities.
Entity subtypes. Supertype. Instance. Advantages and disadvantages of using subtypes of entities
Earlier studying this topic, information technology is recommended to familiarize yourself with the following topic:
- The concept of ER-model. The concept ofentity.Attributes. Attribute type
Contents
- 1. What is an entity subtype? What are entity subtypes used for? Instance
- 2. What is an entity supertype?
- 3. How can entity subtypes be related together? Example
- 4. What are the disadvantages of using subtypes of entities in database developing?
- 5. What are the advantages of using entity subtypes when designing databases?
- six. What type of relationship is established between a supertype and a subtype?
- Related topics
Search other websites:
1. What is an entity subtype? What are entity subtypes used for? Example
Entity subtypes are entered into the ER model in order to reduce the total number of attributes of each entity.
Each entity has a set of unique attributes. However, the attributes of unlike entities can be repeated. Therefore, it is necessary to develop the ER-model so that the number of repeated attributes in different entities was minimal or reduced to zero. Repeating attributes carries back-up in the database. The size of the database becomes unreasonably large, and then this trouble needs to be fixed. Entity subtypes are used to solve this trouble.
The thought of using an entity subtype is that a supertype is allocated for the entire diverse prepare of entities, which contains information common to all types of entities. Details (subtleties) of each type of entity are taken out separately in several specialized subtypes.
Example.
Suppose you need to develop a database of employees of the educational establishment. In an educational institution at that place are three entities, each of which represents a professional group of employees:
- the entity Administration;
- the entity Instructor;
- the entity Back up staff.
If for each entity to draw its own ready of attributes, so you will notice that some attributes in different entities will be repeated. The following attributes are common to all entities:
- Name;
- Surname;
- Identification number.
You lot can as well highlight some unique attributes:
- the entity type "Administration" has the authoritative rate, the name of the position held, etc.;
- the type of entity "Instructor" has the number of hours read, the rate per 1 60 minutes, category, etc.;
- the entity type "Support personnel" has a staff rate, a weekend or working mean solar day ratio (if the employee worked on weekends), etc.
To solve the problem of avoiding information repeatability, changes are made to the ER-model, as shown in Figure ane, namely:
- the "Employee" supertype of entity is introduced. This supertype contains common attributes for all types (subtypes) of entities;
- entity subtypes "Administration", "Teacher", "Support staff" are introduced. Each of the entity subtypes has its own unique attributes.
Figure 1. Supertype and subtypes in the diagram
⇑
2. What is an entity supertype?
An entity supertype is an entity blazon in which only common attributes are implemented (described) for entity subtypes that use this supertype.
⇑
3. How can entity subtypes exist related together? Instance
Entity subtypes may or may not intersect. If a subtype of one entity may be suitable for a subtype of another entity, and so this means that these subtypes of entities intersect each other. Otherwise subtypes of entities do not intersect.
Example. In an educational establishment, an employee who holds an authoritative position (subtype Assistants) may exist a instructor. That is, the entity subtype Administration intersects with the entity subtype Teacher.
However, an employee from the entity subtype "Support staff" cannot be a teacher. Therefore, the entity subtype "Support staff" does not intersect with the Teacher subtype.
In view of the above, the image of the supertype and subtypes in the diagram has the form, as shown in Figure 2.
Figure ii. The supertype and entity subtypes with intersection between entity subtypes
In Figure two, between the subtypes Assistants and Teacher is a text Gs. This ways that subtypes tin intersect. Between the Instructor and the Support Personnel subtypes is a symbol '1000'. This means that entity subtypes exercise not intersect.
⇑
4. What are the disadvantages of using subtypes of entities in database developing?
Each supertype and subtype of entities is implemented by a respective tabular array. Table fields are attributes of this type of entity.
The disadvantages of using subtypes of entities are that the overall evolution of the database is complicated. The difficulties are as follows:
- the difficulty in organizing the interaction betwixt the master and detailed tables for relational databases;
- in the subtype tables, you must additionally enter the primary keys for linking to the supertype table;
- SQL queries go more than circuitous considering you need to process data in related tables;
- difficulty in providing secure of user access to table columns.
⇑
five. What are the advantages of using entity subtypes when designing databases?
Advantages of using subtypes of entities:
- avoid information redundancy, as each subtype contains only unique information. This in turn leads to a reduction in the size of the database itself;
- simplifying the setting of restrictions for any attribute that corresponds to a column of a table that implements a detail subtype of an entity;
- reduction of errors in programming operations on a table that corresponds to a specific subtype of an entity;
- flexibility in modifying the database structure. Yous do non need to change the supertype table if you add / alter the structure of the subtype table. This, in turn, leads to the fact that there is no need to redo the unabridged database management program.
⇑
six. What blazon of relationship is established between a supertype and a subtype?
Betwixt the supertype and subtype ready relation "ane to one" or one:1.
⇑
Related topics
- The concept of ER-model. The concept ofentity.Attributes. Attribute type
- ER-model. Theconcept of human relationship. The human relationship capacity. Types of relationships.Examples
⇑
Source: https://www.bestprog.net/en/2019/01/27/entity-subtypes-supertype-example-advantages-and-disadvantages-of-using-subtypes-of-entities/
0 Response to "A Supertype Entity Can Contain as Many as ____ Subtype Entities."
Post a Comment