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

LEC 7 Operation in Relational Database Model

The document discusses the four basic operations in the relational database model: insert, update, delete, and select. It provides examples of how each operation works and notes that integrity constraints cannot be violated. Best practices for creating a relational model include representing data as relations, depicting each relation clearly in a table, and ensuring columns have unique names and attributes are from the same domain. Advantages of the relational model include simplicity, structural independence, easy querying, and data independence while disadvantages include field length limits and potential complexity as data grows.

Uploaded by

Sahir Saeed
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

LEC 7 Operation in Relational Database Model

The document discusses the four basic operations in the relational database model: insert, update, delete, and select. It provides examples of how each operation works and notes that integrity constraints cannot be violated. Best practices for creating a relational model include representing data as relations, depicting each relation clearly in a table, and ensuring columns have unique names and attributes are from the same domain. Advantages of the relational model include simplicity, structural independence, easy querying, and data independence while disadvantages include field length limits and potential complexity as data grows.

Uploaded by

Sahir Saeed
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

LEC 7 Operation In Relational

Database Model
Operations in Relational Model
Four basic update operations performed on relational database model are
Insert, update, delete and select.

1. Insert is used to insert data into the relation

2. Delete is used to delete tuples from the table.

3. Modify allows you to change the values of some attributes in existing tuples.

4. 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


Best Practices for creating a Relational
Model
1. Data need to be represented as a collection of relations
2. Each relation should be depicted clearly in the table
3. Rows should contain data about instances of an entity
4. Columns must contain data about attributes of the entity
5. Cells of the table should hold a single value
6. Each column should be given a unique name
7. No two rows can be identical
8. The values of an attribute should be from the same domain
Advantages of using Relational Model
Simplicity: A Relational data model in DBMS is simpler than the hierarchical and network model.

Structural Independence: The relational database is only concerned with data and not with a structure. This
can improve the performance of the model.

Easy to use: The Relational model in DBMS is easy as tables consisting of rows and columns are quite natural
and simple to understand

Query capability: It makes possible for a high-level query language like SQL to avoid complex database
navigation.

Data independence: The Structure of Relational database can be changed without having to change any
application.

Scalable: Regarding a number of records, or rows, and the number of fields, a database should be enlarged to
enhance its usability.
Disadvantages of using Relational Model
1. Few relational databases have limits on field lengths which can't be exceeded.

2. Relational databases can sometimes become complex as the amount of data grows, and the
relations between pieces of data become more complicated.

3. Complex relational database systems may lead to isolated databases where the information
cannot be shared from one system to another.

You might also like