12 RDBMS
12 RDBMS
What is Data?
What is a Database?
Ease of updating data: With the database, we can flexibly update the
data according to our convenience. Moreover, multiple people can also
edit data at same time.
Types of DBMS
Let's see how the DBMS family got evolved with the time. Following
diagram shows the evolution of DBMS categories.
There are 4 major types of DBMS. Let's look into them in detail.
Hierarchical DBMS
In a Hierarchical database, model data is organized in a tree-like
structure. Data is Stored Hierarchically (top down or bottom up) format.
Data is represented using a parent-child relationship. In Hierarchical
DBMS parent may have many children, but children have only one parent.
Network Model
The network database model allows each child to have multiple parents.
It helps you to address the need to model more complex relationships
like as the orders/parts many-to-many relationship. In this model,
entities are organized in a graph which can be accessed through several
paths.
Relational model
Relational DBMS is the most widely used DBMS model because it is one
of the easiest. This model is based on normalizing data in the rows and
columns of the tables. Relational model stored in fixed structures and
manipulated using SQL.
Object-Oriented Model
In Object-oriented Model data stored in the form of objects. The
structure which is called classes which display data within it. It defines a
database as a collection of objects which stores both data members
values and operations.
The table name and column names are helpful to interpret the meaning of
values in each row. The data are represented as a set of relations. In the
relational model, data are stored as tables. However, the physical storage
of the data is independent of the way the data are logically organized.
Relational Model Concepts
Tables – In the Relational model the, relations are saved in the table
format. It is stored along with its entities. A table has two properties
rows and columns. Rows represent records and columns represent
attributes.
Column: The column represents the set of values for a specific attribute.
Relation key - Every row has one, two or multiple attributes, which is
called relation key.
Domain :It is a collection of values from which the value is derived for a
column.
What are Keys?
Example:
Example:
In the following example, StudID is a Primary Key.
Example:
In this table, StudID, Roll No, Email are qualified to become a primary
key. But since StudID is the primary key, Roll No, Email becomes the
alternative key.
Example: In the given table Stud ID, Roll No, and email are candidate
keys which help us to uniquely identify the student record in the table.
Example:
DeptCode DeptName
001 Science
002 English
005 Computer
Teacher ID Fname Lname
B002 David Warner
B017 Sara Joseph
B009 Mike Brunton
In this table, adding the foreign key in Deptcode to the Teacher name,
we can create a relationship between the two tables.