KEMBAR78
Relational Model in DBMS | PDF | Relational Database | Databases
0% found this document useful (0 votes)
5 views4 pages

Relational Model in DBMS

Uploaded by

abebe
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)
5 views4 pages

Relational Model in DBMS

Uploaded by

abebe
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/ 4

Relational Model

What is the Relational Model?


 The relational model for database management is an approach to logically represent and manage the data
stored in a database.
 In this model, the data is organized into a collection of two-dimensional inter-related tables, also known
as relations. Each relation is a collection of columns and rows, where the column represents the attributes
of an entity and the rows (or tuples) represents the records.
 The use of tables to store the data provided a straightforward, efficient, and flexible way to store and access
structured information. Because of this simplicity, this data model provides easy data sorting and data
access. Hence, it is used widely around the world for data storage and processing.
RDBMS
 RDBMS stands for Relational Database Management System.
 All modern database management systems like SQL, MS SQL Server, IBM DB2, ORACLE, My-SQL, and
Microsoft Access are based on RDBMS.
 It is called Relational Database Management System (RDBMS) because it is based on the relational model
introduced by E.F. Codd.
How it works
 Data is represented in terms of tuples (rows) in RDBMS. A relational database is the most commonly used
database. It contains several tables, and each table has its primary key.
What is table/Relation?
 Everything in a relational database is stored in the form of relations. The RDBMS database uses tables to
store data. A table is a collection of related data entries and contains rows and columns to store data. Each
table represents some real-world objects such as person, place, or event about which information is
collected. The organized collection of data into a relational table is known as the logical view of the
database.
Properties of a Relation:
 Each relation has a unique name by which it is identified in the database.
 Relation does not contain duplicate tuples.
 The tuples of a relation have no specific order.
 All attributes in a relation are atomic, i.e., each cell of a relation contains exactly one value.
What is a row or record?
 A row of a table is also called a record or tuple. It contains the specific information of each entry in the
table. It is a horizontal entity in the table.
Properties of a row:
 No two tuples are identical to each other in all their entries.
 All tuples of the relation have the same format and the same number of entries.
 The order of the tuple is irrelevant. They are identified by their content, not by their position.
What is a column/attribute?
 A column is a vertical entity in the table which contains all information associated with a specific field in a
table. For example, "name" is a column in the above table which contains all information about a student's
name.
Properties of an Attribute:
 Every attribute of a relation must have a name.
 Null values are permitted for the attributes.
 Default values can be specified for an attribute automatically inserted if no other value is specified for
an attribute.
 Attributes that uniquely identify each tuple of a relation are the primary key.
What is data item/Cells?
 The smallest unit of data in the table is the individual data item. It is stored at the intersection of tuples and
attributes.
Properties of data items:
 Data items are atomic.
 The data items for an attribute should be drawn from the same domain.
 Degree: The total number of attributes that comprise a relation is known as the degree of the table.
 Cardinality: The total number of tuples at any one time in a relation is known as the table's
cardinality. The relation whose cardinality is 0 is called an empty table.
DBMS Keys
What are keys in DBMS?
 Keys in DBMS are introduced to avoid redundancy in data. Keys play an important role in the relational
database. It is used to uniquely identify any record or row of data from the table. It is also used to establish
and identify relationships between tables.
Types of DBMS Keys
1. Primary key
 It is the first key used to identify one and only one instance of an entity uniquely. An entity can
contain multiple keys, as we saw in the PERSON table. The key which is most suitable from those
lists becomes a primary key

2. Candidate key
 A candidate key is an attribute or set of attributes that can uniquely identify a tuple. Except for the
primary key, the remaining attributes are considered a candidate key. The candidate keys are as
strong as the primary key.
3. Foreign key
 Foreign keys are the column of the table used to point to the primary key of another table.
4. Alternate key
 There may be one or more attributes or a combination of attributes that uniquely identify each tuple
in a relation. These attributes or combinations of the attributes are called the candidate keys. One key
is chosen as the primary key from these candidate keys, and the remaining candidate key, if it exists,
is termed the alternate key.
 In other words, the total number of the alternate keys is the total number of candidate keys minus
the primary key. The alternate key may or may not exist. If there is only one candidate key in a
relation, it does not have an alternate key.

You might also like