0% found this document useful (0 votes)
8 views

Dbms Module 2 Part2

The Extended Entity-Relationship (EE-R) Model enhances the original ER model by incorporating concepts such as subclasses, specialization, generalization, and aggregation to better represent complex database requirements. The relational model organizes data into tables with defined relationships and supports operations like insertion, deletion, update, and retrieval, while also enforcing integrity constraints. Despite its advantages in design and flexibility, the relational model can struggle with performance in complex databases due to its simplistic mapping of logical tables to physical structures.

Uploaded by

budhiabarik66
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Dbms Module 2 Part2

The Extended Entity-Relationship (EE-R) Model enhances the original ER model by incorporating concepts such as subclasses, specialization, generalization, and aggregation to better represent complex database requirements. The relational model organizes data into tables with defined relationships and supports operations like insertion, deletion, update, and retrieval, while also enforcing integrity constraints. Despite its advantages in design and flexibility, the relational model can struggle with performance in complex databases due to its simplistic mapping of logical tables to physical structures.

Uploaded by

budhiabarik66
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Extended Entity-Relationship (EE-R) Model :-

EER is a high-level data model that incorporates the extensions to the original ER model.
Enhanced ERD are high level models that represent the requirements and complexities of
complex database.

Key Concepts in the EE-R Model


 Subclasses and Super classes.
 Specialization and Generalization.
 Category or union type.
 Aggregation.

Subclasses and Super class :-


 Super class is an entity that can be divided into further subtype.
 Super class shape has sub groups: Triangle, Square and Circle.

For example − consider Shape super class.

Sub classes are the group of entities with some unique attributes. Sub class inherits the
properties and attributes from super class.

Specialization and Generalization:-

Generalization is a process of generalizing an entity which contains generalized attributes or


properties of generalized entities.

It is a Bottom up process i.e. consider we have 3 sub entities Car, Truck and Motorcycle. Now
these three entities can be generalized into one super class named as Vehicle.
Specialization is a process of identifying subsets of an entity that share some different
characteristic. It is a top down approach in which one entity is broken down into low level entity.

In above example Vehicle entity can be a Car, Truck or Motorcycle.

Category or union:-
Relationship of one super or sub class with more than one super class.
Owner is the subset of two super class: Vehicle and House.

Aggregation:-
 Represents relationship between a whole object and its component.

 A higher-level abstraction that groups together entities and their relationships. This is
used to simplify complex ER diagrams by treating a collection of entities and their
relationships as a single unit.

 Consider a ternary relationship Works_On between Employee, Branch and Manager.


Now the best way to model this situation is to use aggregation, So, the relationship-set,
Works_On is a higher level entity-set. Such an entity-set is treated in the same manner as
any other entity-set. We can create a binary relationship, Manager, between Works_On
and Manager to represent who manages what tasks.
Relational Model:-
The relational model represents how data is stored in Relational Databases. A relational
database consists of a collection of tables, each of which is assigned a unique name.

Relational Model Terminologies:

Relation Table

Tuple Row, Record

Attribute Column, Field

Domain It consists of set of legal values

Cardinality It consists of number of rows

Degree It contains number of columns


 Relation: A relation is usually represented as a table, organized into rows and columns.
A relationship consists of multiple records.

 Tuple: The rows of a relation that contain the values corresponding to the attributes are
called tuples.
 Data Item: The smallest unit of data in the relation is the individual data item. It is stored
at the intersection of rows and columns are also known as cells.
 Domain: It contains a set of atomic values that an attribute can take. It could be
accomplish explicitly by listing all possible values or specifying conditions that all values
in that domain must be confirmed.
 Attribute: The smallest unit of data in relational model is an attribute. It contains the
name of a column in a particular table.
 Cardinality: The total number of rows at a time in a relation is called the cardinality of
that relation.
 Degree: The degree of association is called the total number of attributes in a
relationship. The relation with one attribute is called unary relation, with two attributes is
known a binary relation and with three attributes is known as ternary relation.

 Relational instance: In the relational database system, the relational instance is


represented by a finite set of tuples. Relation instances do not have duplicate tuples.

 Relational schema: A relational schema contains the name of the relation and name of
all columns or attributes.

 Relational key: In the relational key, each row has one or more attributes. It can identify
the row in the relation uniquely.

Advantages of Relational Model :-

o This model is very easy to design. Tables can use different attributes as per
requirements.

o The relational model supports data independence. In a relational database the data is
stored in tables so that we can modify the data without changing the physical structure.
o Relational database helps the user to use a query language to query the database.
o It offers more flexibility than other models.
o It is useful for representing most real world objects and the relationships between them.

Disadvantages of Relational Model :-

o Relational databases use a simple mapping of logical tables to physical structures.


o The relational model is suitable for small databases but not suitable for complex
databases because the user needs to know the complex physical data storage details.
So, while designing the databases they don't come to light when they may cause
problems. When a database grows it will slow down the system and will result in
performance degradation and data corruption.

Operations on Relational Model:


There are 4 types of operations.

o Insertion Operation
o Deletion Operation
o Update Operation
o Retrieval Operation
1. Insert operation: It is used to insert a new record in the table. Adding new records to the
table is much easier than other models.
2. DELETE operation: This operation is used to delete records from the table but
problems arise when the rows to be deleted have some attributes which are foreign key
attributes.

3. Update operation: It is used to modify or change the data value of a record in a table.
4. Retrieval operation: It is used to save a record from a relation. This operation is very
simple and homogeneous.

Constraints:-
Every relation has some conditions that must hold for it to be a valid relation. These conditions
are called Relational Integrity Constraints.

There are three main integrity constraints −

 Key constraints
 Domain constraints
 Referential integrity constraints

1) Key constraints:-
There must be at least one minimal subset of attributes in the relation, which can identify a tuple
uniquely. This minimal subset of attributes is called key for that relation. If there are more than
one such minimal subsets, these are called candidate keys.
Types of key constraints : Primary Key Constraint, Unique Constraint

2) Domain Constraints:-

 Attributes have specific values in real-world scenario.

 Define the valid values that an attribute (column) can hold.

 Specify the data type (e.g., integer, string, date) and any additional restrictions (e.g., range
of values, allowed patterns).

Types of Domain Constraints: 1) Check Constraint 2) Not Null Constraint

3) Referential integrity Constraints :-

Referential integrity constraints work on the concept of Foreign Keys. A foreign key is a key
attribute of a relation that can be referred in other relation.

Type of Referential integrity constraints- Foreign Key Constraint.

You might also like