0% found this document useful (0 votes)
8 views11 pages

4 DBMS Relational Data Model Concepts

Uploaded by

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

4 DBMS Relational Data Model Concepts

Uploaded by

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

RELATIONAL

DATA MODEL
CONCEPTS
Relational data model concepts
• The relational model uses a collection of tables to represent both data
and the relationship among those data.
 A table is a collection of rows and columns. Each column has a
unique name.
 Each row in the table represents a collection of related data values.
 In the relational model, a row is called a tuple, a column is called an
attribute and the table is called a relation.
Properties put in place to maintain consistency in a database, before
and after the transaction, certain properties are followed.
The acid properties in distributed database systems.
• Atomicity - each statement in a transaction (to read, write, update or delete
data) is treated as a single unit. Either the entire statement is executed, or
none of it is executed. This property prevents data loss and corruption from
occurring if, for example, if your streaming data source fails mid-stream.
• Consistency - ensures that transactions only make changes to tables in
predefined, predictable ways. Transactional consistency ensures that
corruption or errors in your data do not create unintended consequences for
the integrity of your table.
• Isolation - when multiple users are reading and writing from the same table
all at once, isolation of their transactions ensures that the concurrent
transactions don't interfere with or affect one another. Each request can occur
as though they were occurring one by one, even though they're actually
Integrity constraints
• Most database applications have certain integrity constraints that must
hold for the data.
 The simplest type of integrity constraint involves specifying a data
type for each data item.
 Integrity constrains can be classified as :

1. Entity integrity
• The entity integrity constraints states that no primary key value can be
null. This is because the primary key value is used to identify individual
tuple in a relation, having null values for the primary key implies that we
cannot identify some tuples.
2. Referential integrity
• We wish to ensure that a value that appears in one relation for a given
set of attributes also appears for a certain set of attributes in another.
This condition is called "referential integrity".
• This constraint establishes a relationship between records across a
master and a detail tables.
• This relationship ensures :
i. Records cannot be inserted into a detail table if corresponding
records in the master table do not exist.
ii. Records of the master table cannot be deleted if corresponding
records in the detail table exist.
Relational algebra
• Relational algebra is a procedural query language. It consists of a set of
operations that take one or two relations as input and produce a new
relation as their result.
• The functional operations in therelational algebra are :
 Select Natural Join
 Project
 Union
 Set difference
 Cartesian product
 Rename
 Intersection
 Division
 Join
ASSIGNMENT ON FUNCTIONAL OPERATIONS IN RELATIONAL
ALGEBRA
Select operation
• Select tuples that satisfy a given predicate. The notation of select
operation is :

• Where R - input relation


• P - predicate that is to be evaluated

E.G., Select those account which belongs the SBI.


Note: we can use following predicate.

• E.G., Select loans which has been taken from the SBI and whose
amount is greater than 50,000 each.
• Ans.
Examples:
• Using relational algebra format, write down how to select the employee
tuples who’s:
A. DEPT_NO is 10
B. SALARY is greater than 80,000

You might also like