0% found this document useful (0 votes)
20 views6 pages

Understanding the Relational Model in Databases

The document discusses the relational data model, which is widely used for data storage and processing due to its simplicity and efficiency. It outlines the characteristics, concepts, constraints, operations, advantages, and disadvantages of relational databases. Key operations include insert, update, delete, and select, while integrity constraints ensure data validity and consistency.

Uploaded by

coach5744vibes
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)
20 views6 pages

Understanding the Relational Model in Databases

The document discusses the relational data model, which is widely used for data storage and processing due to its simplicity and efficiency. It outlines the characteristics, concepts, constraints, operations, advantages, and disadvantages of relational databases. Key operations include insert, update, delete, and select, while integrity constraints ensure data validity and consistency.

Uploaded by

coach5744vibes
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

Database Management System

Session 9

Relational Model

Relational data model is the primary data model, which is used widely around the world for
data storage and processing. This model is simple and it has all the properties and
capabilities required to process data with storage efficiency.

Characteristics of relational model

1. Each relation in a database must have a distinct or unique name which would separate it
from the other relations in a database.
2. A relation must not have two attributes with the same name. Each attribute must have a
distinct name.
3. Duplicate tuples must not be present in a relation.

4. Each tuple must have exactly one data value for an attribute. For example, below in the
first table, you can see that for Roll_No. 265 we have enrolled two students Jhoson and
Charles, this would not work. We must have only one student for one Roll_No.
5. Tuples in a relation do not have to follow a significant order as the relation is not order-
sensitive.
6. Similarly, the attributes of a relation also do not have to follow certain ordering, it’s up to
the developer to decide the ordering of attributes.

Concepts

Tables − In relational data model, relations are saved in the format of Tables. This format
stores the relation among entities. A table has rows and columns, where rows represents
records and columns represent the attributes.
Tuple − A single row of a table, which contains a single record for that relation is called a
tuple.
Relation instance − A finite set of tuples in the relational database system represents
relation instance. Relation instances do not have duplicate tuples.
Relation schema − A relation schema describes the relation name (table name), attributes,
and their names.
Relation key − Each row has one or more attributes, known as relation key, which can
identify the row in the relation (table) uniquely.
Attribute domain − Every attribute has some pre-defined value scope, known as attribute
domain.

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

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.
Key constraints force that −
 in a relation with a key attribute, no two tuples can have identical values for key
attributes.
 a key attribute can not have NULL values.
Key constraints are also referred to as Entity Constraints.

Domain Constraints
Attributes have specific values in real-world scenario. For example, age can only be a
positive integer. The same constraints have been tried to employ on the attributes of a
relation. Every attribute is bound to have a specific range of values. For example, age cannot
be less than zero and telephone numbers cannot contain a digit outside 0-9.

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.
Referential integrity constraint states that if a relation refers to a key attribute of a different
or same relation, then that key element must exist.

Operations on relational model

Four basic update operations performed on relational database model are


Insert, update, delete and select.

 Insert is used to insert data into the relation


 Delete is used to delete tuples from the table.
 Modify allows you to change the values of some attributes in existing tuples.
 Select allows you to choose a specific range of data.

Whenever one of these operations are applied, integrity constraints specified on the
relational database schema must never be violated.

Insert Operation
The insert operation gives values of the attribute for a new tuple which should be inserted
into a relation.

Update Operation
You can see that in the below-given relation table CustomerName= ‘Apple’ is updated from
Inactive to Active.
Delete Operation
To specify deletion, a condition on the attributes of the relation selects the tuple to be
deleted.

In the above-given example, CustomerName= “Apple” is deleted from the table.


The Delete operation could violate referential integrity if the tuple which is deleted is
referenced by foreign keys from other tuples in the same database.

Select Operation

In the above-given example, CustomerName=”Amazon” is selected

Advantages of Relational Databases


The main advantages of relational databases are that they enable users to easily categorize
and store data that can later be queried and filtered to extract specific information for
reports. Relational databases are also easy to extend and aren't reliant on the physical
organization. After the original database creation, a new data category can be added
without all existing applications being modified.

Other Advantages
 Accurate − Data is stored just once, which eliminates data deduplication.
 Flexible − Complex queries are easy for users to carry out.
 Collaborative −Multiple users can access the same database.
 Trusted −Relational database models are mature and well-understood.
 Secure − Data in tables within relational database management systems (RDBMS)
can be limited to allow access by only particular users.
 Simplicity

 Speed
 Multi user

Disadvantages of Relational Database


1. Cost

The underlaying cost involved in a relational database is quite expensive. For setting up a
relational database, there must be separate software which needs to be purchased. And a
professional technician should be hired to maintain the system. All these can be costly,
especially for businesses with small budget.

2. Performance
Always the performance of the relational database depends on the number of tables. If
there are more number of tables, the response given to the queries will be slower.
Additionally, more data presence not only slows down the machine, it eventually makes it
complex to find information. Thus, a relational database is known to be a slower database.

3. Physical Storage

A relational database also requires tremendous amount of physical memory since it is with
rows and columns. Each of the operations depend on separate physical storage. Only
through proper optimization, the targeted applications can be made to have maximum
physical memory.

4. Complexity

Although a relational database is free from complex structuring, occasionally it may become
complex too. When the amount of data in a relational database increases, it eventually
makes the system more complicated. Each and every data is been complex since the data is
arranged using common characteristics.

5. Information Loss

Large organizations tends to use more number of number of database systems with more
tables. These information can be used to be transferred from one system to another. This
could pose a risk of data loss.

6. Structure Limitations

The fields that is present on a relational database is with limitations. Limitations in essence
means that it cannot accommodate more information. Despite if more information are
provided, it may lead to data loss. Therefore, it is necessary to describe the exact amount of
data volume which the field will be given.
Applications of Relational Database Model

You might also like