0% found this document useful (0 votes)
14 views30 pages

DBMS Notes

Uploaded by

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

DBMS Notes

Uploaded by

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

DBMS NOTES

Database and Database Management System 📚


A database
is a collection of related information stored in a way that it is
available to many users for different purposes. It is a computerized
record-keeping system that allows easy and efficient storage, retrieval,
and modification of data.

"A database is a logically coherent, organized


collection of similar data. Similar data refers to the collection of
data, which is stored based on the same context."

A Database Management System (DBMS)


is a collection of interrelated data and a set of programs to access
those data. Its primary goal is to provide a way to store and retrieve
database information that is both convenient and efficient.

Components of DBMS
Component Description

Users Application programmers, end users, and Database Administrators (DBA)

DBMS, operating system, metadata repository (if necessary), and


Software
application programs

Computers, storage devices (hard disks), and input/output devices


Hardware
(monitor, printer)

Numerical data, non-numerical data, and complex data entities (images,


Data
audio)

Need for DBMS


Historically, information systems employed
stand-alone systems for separate applications, each with their own set

DBMS NOTES 1
of files. This led to:

Duplication of data

Inconsistency

Waste of space

Difficulty in maintaining data integrity

DBMS solves these problems by providing a centralized repository of data that


can be accessed and modified efficiently.

Applications of DBMS
Banking: maintaining customer information, accounts, loans, and banking
transactions

Universities: maintaining student records, course registration, and grades

Railway Reservation: checking availability of reservation in different trains,


tickets, etc.

Airlines: reservation and schedule information

Telecommunication: keeping records of calls made, generating monthly bills,


etc.

Finance: storing information about holidays, sales, and purchases of financial


instruments

Sales: customer, product, and purchase information

Advantages of DBMS
Reduction in Data Redundancy: eliminates duplication of data, reducing waste
of space

Reduction in Inconsistency: ensures consistency of data by controlling


redundancy

Sharing of Data: allows multiple applications to use the same data

Enforcement of Standards: enforces standards for data naming, formatting,


and security

DBMS NOTES 2
Improvement in Data Security: provides a centralized system for security
checks and enforcement

Maintenance of Data Integrity: ensures accuracy and consistency of data

Better Interaction with Users: provides better service to users through


efficient data retrieval and modification## Advantages of DBMS 📈
The availability of up-to-date information
improves in a DBMS since the data can be shared and the DBMS makes it
easy to respond to unforeseen information requests.

Efficient System:
It is very common to change the content of stored data. These changes
can easily be made in a database management system than in a
conventional system as these do not need to have any impact on
application programs. The cost of developing and maintaining systems is
also lower.

Disadvantages of DBMS 🚨
Problems associated with Centralization
"Centralization increases the security problems and disruption
due to downtime and failures."

Cost of Software and Hardware


The cost of software and hardware is a major drawback.

The cost of the hardware is also one of the major drawbacks.

Complexity of Backup and Recovery

"DBMS provides the centralization of the data,


which requires adequate backups of the data so that in case of

DBMS NOTES 3
failure,
the data can be recovered."

Other Disadvantages
Atomicity and integrating problems are found.

Security of data is not good.

There is no concurrent access and recovery.

Difference between Database and File System 💻


Database File System

Data redundancy Does not exist Exists

Data inconsistency Does not exist Exists

Accessing database Easier Comparatively difficult

Data isolation Does not exist Exists in different formats

Atomicity and integrating Not found Found

Security of data Good Not good

Concurrent Access and Recovery Exists Does not exist

📁
Advantages and Disadvantages of File-Based Systems

Advantages of File-Based Systems


Helps in overall understanding of design complexity of database systems.

Provides a useful historical perspective on how we handle data.

Results in smooth transition from traditional file-based systems to newer


database systems.

Disadvantages of File-Oriented Systems

DBMS NOTES 4
Data redundancy: Since these systems used a decentralized approach,
so each department used its own application programs and files.

Poor data control: There was no centralized control on the fields.

Poor data manipulation capabilities: Does not provide strong connections


between data in different files.

Data dependence: Files and records were described by specific physical


formats that were coded into the application programs.

Security Problems

"Every user of the database system should not be


allowed to access all data. Since application programs are
added to the
file-oriented systems in an ad-hoc manner, it was difficult to
enforce
such security systems."

Who is a DBA? 🤔
A Database Administrator (DBA)
is an individual person or a group of persons with an overview of one
or more databases so that he/she can control the design and the use of
these databases.

Role of DBA
Defining conceptual schema: A DBA creates the conceptual schema
corresponding to the abstract level database design made by data
administrator.

Physical database design: A DBA decides how the data is to be represented in


the stored database.

Security and integrity checks: A DBA is responsible for providing


the authorization and authentication checks so that no malicious users

DBMS NOTES 5
can access the database.

Giving backup and recovery strategies: A DBA must define and


implement an appropriate periodical recovery strategy to recover the
database from all types of failures.

Granting access to users: A DBA regulates the usage of specific parts of the
database by various users.

Characteristics of Database Approach 📊


Self-describing nature of a Database system: A database system is self-
describing, meaning that it contains a
description of itself, including the structure of the data and the
relationships between them.

Insulation between Programs, data, and data abstraction: A database system


provides insulation between programs, data, and data
abstraction, which means that changes to one do not affect the others.

Support of multiple views of data: A database system supports multiple views


of data, which means that different users can see different views of the same
data.

Sharing of Data and Multi-user Transaction Processing: A database system


allows sharing of data and multi-user transaction
processing, which means that multiple users can access and update the
data simultaneously.

Database Models 📚
A database model is a collection of conceptual
tools for describing data, data relationships, data semantics, and
consistency constraints.

Types of Database Models


Model Description

DBMS NOTES 6
Organises data in a tree structure, with each child node having only one
Hierarchical
parent node

Network Allows for many-to-many relationships between data entities

Organises data into tables with rows and columns, with each row
Relational
representing a single record

Object-
Uses objects to represent data and relationships between them
Oriented

Hierarchical Database Model


Organises data in a tree structure, with each child node having only one parent
node

Uses parent-child relationships to link records

Data access is quite predictable in structure, making it efficient for retrieval


and updates

Network Database Model


Allows for many-to-many relationships between data entities

Uses a network structure to represent data relationships

Efficient in space utilisation and query execution times, but


inflexible and difficult to use## 💻 Relational Database Management
System (RDBMS) 📊
The Relational Database Management System (RDBMS)
is based on the relational model developed by E.F. Codd. A relational
database represents all data in the database as simple two-dimensional
tables called relations.
Definition:

"A relational database represents all data in the database as


simple two-dimensional tables called relations."

Relations (Tables)

DBMS NOTES 7
A relation (table) consists of rows (records) and columns (fields).

Table Structure:

Column Description

Author ID Unique identifier for the author

Author Name Name of the author

Author DOB Date of birth of the author

Pub ID Unique identifier for the publisher

Publisher Name of the publisher

Pub Address Address of the publisher

Operations
Three basic operations are used to develop useful sets of data:

Selection: Retrieves certain records from a table based on user-specified


criteria.

Projection: Extracts fields from a table, allowing the user to create new tables
that contain only the required information.

Join: Combines data from multiple tables to create a new table.

These operations are all part of Relational Algebra.

👀 Object-Oriented Database Model (OODBM) 📚


The Object-Oriented Database Model (OODBM) stores
and maintains objects, which can contain both data and procedures that
manipulate the data.
Definition:

"An object-oriented database stores and maintains objects,


which can contain both data and procedures that manipulate
the data."

DBMS NOTES 8
Object-Oriented Database Structure
The class population is the root of a class
hierarchy, which includes the Nation class. The Population class is also
the root of two sub-classes: Men and Women.
Class Hierarchy:

Class Description

Population Root class

Nation Sub-class of Population

Men Sub-class of Population

Women Sub-class of Population

Object Query Language (OQL)


OQL is a query language used to manipulate and retrieve data in an object-
oriented database.

📝 Schema and Instances 📊


Schema:

"The overall design of the database is called the database


schema."

Instance:

"The collection of information stored in the database at a


particular moment is called an instance of the database."

Types of Schema
There are three types of schema:

Physical Schema: Describes the database design at the physical level,


specifying additional storage details.

DBMS NOTES 9
Conceptual Schema: Describes the stored data in terms of the data model of
the DBMS.

External Schema: Allows data access to be customized at the level of


individual users or groups of users.

📈 Data Independence 💻
Definition:

"The ability to modify a schema definition in one


level without affecting a schema definition in the next higher
level is
called Data Independence."

Data independence is of two types:

Physical Data Independence: Enables changes to be made at the physical


level without affecting the conceptual schema.

Logical Data Independence: Enables changes to be made at the conceptual


schema level without affecting the external schema.## ER Model Concepts 📚
Relationships 🔗
A relationship is a meaningful association between one or more entity types.

ISA relationship: a relationship between two entities where one is a subtype


of the other

HASA relationship: a relationship between two entities where one has or owns
the other

Relationship Type
A set of meaningful associations between one or more participating entity types.

Each relationship type is given a name that describes its function.

Relationships with the same attributes fall into one relationship set.

DBMS NOTES 10
Degree of a Relationship
Defined as the number of entities associated with the relationship.

Degree Description

Unary or Recursive A relationship between instances of a single entity type

Binary A relationship between two entities

Ternary A relationship between three entities

n-ary A general form for degree n

Connectivity or Cardinality 💻
Describes the mapping of associated entity instances in a relationship.

One-to-One (1:1): at most one instance of an entity is associated with one


instance of another entity

One-to-Many (1:N): one instance of an entity is associated with zero, one, or


many instances of another entity

Many-to-Many (M:N): one instance of an entity is associated with zero, one,


or many instances of another entity, and vice versa

Attributes 📊
Define the properties of a data object in an entity.

Simple (or Atomic) Attributes: an attribute that is composed of a single


component with an independent existence

Composite Attribute: an attribute composed of multiple components each


with an independent existence

Single-Valued Attribute: an attribute that holds a single value for a single


entity

Multi-Valued Attribute: an attribute that holds multiple values for a single


entity

Derived Attribute: an attribute that represents a value that is derivable from

📜
the value of related attributes or a set of attributes

DBMS NOTES 11
Entity Set 📜
Weak Entity Set: an entity set that does not possess sufficient attributes to
form a primary key

Strong Entity Set: an entity set that has a primary key

Mapping Constraints 🗂️
One-to-One: an entity in A is associated with at most one entity in B, and an
entity in B is associated with at most one entity in A

One-to-Many: an entity in A is associated with any number (zero or more) of


entities in B, and an
entity in B is associated with at most one entity in A

Many-to-One: an entity in A is associated with at most one entity in B, and an


entity in B is
associated with any number (zero or more) of entities in A

Many-to-Many: an entity in A is associated with any number (zero or more) of


entities in B, and an
entity in B is associated with any number (zero or more) of entities in A

Generalization, Specialization, and Aggregation 📈


Generalization

The process of identifying some common


characteristics of a collection of entity sets and creating a new
entity
set that contains entities processing these common features.

Specialization

The process of identifying subsets of an entity (super-class or


super-type) that share some distinguishing characteristic.

DBMS NOTES 12
Aggregation

The process of forming a new entity set by taking a set of


related entities and grouping them together.

Let me know if you need anything else! 😊## Generalization and Specialization 📈
Generalization
is a top-down process of defining super-classes and their related
sub-classes. We first define a super-class, then sub-classes, and their
attributes and relationships.

Advantages of Generalization:

Enables the entity type to share common attributes among different classes

Allows for the creation of a class that can be refined progressively into finer
sub-classes

Enables the inheritance of common attributes among sub-classes

Inheritance 💻
Inheritance is the process by which one class acquires the
properties of one or more other objects.

Key Points:

Involves sharing of attributes and operations or methods among classes


based on a hierarchical structure

A class can be created at a broad level and then refined progressively into
finer sub-classes

Each sub-class incorporates or inherits all the properties of its super-class to


which it can add its own properties

Superclass and Subclass Entity Set 📝


Superclass:

DBMS NOTES 13
An entity type that includes distinct subclasses that share common attributes

Can be created at a broad level and then refined progressively into finer sub-
classes

Subclass:

An entity type that is a subset of a superclass

Inherits all the properties of its superclass to which it can add its own
properties

Examples:
Superclass Subclass Unique Attributes

Job Employee Employee ID, Employee Name

Job Manager Manager ID, Manager Name

Vehicle Car Car Model, Car Year

Vehicle Truck Truck Model, Truck Year

E-R Diagrams 📊
Banking System:
class Bank {
accounts: [
{
accountNumber: string,
accountHolder: string,
balance: number
}
]
}

class Account {
transactions: [
{

DBMS NOTES 14
transactionId: string,
transactionDate: date,
amount: number
}
]
}

Hospital System:
class Hospital {
patients: [
{
patientId: string,
patientName: string,
address: string
}
]
}

class Patient {
appointments: [
{
appointmentId: string,
appointmentDate: date,
doctor: string
}
]
}

Advantages and Disadvantages of Different Models 📊


Hierarchical Model
Advantages:

DBMS NOTES 15
Simpllicity

Data sharing

Data security

Data integrity

Efficiency

Disadvantages:

Implementation complexity

Inflexibility

Operational anomalies

Difficulty in maintaining database and applications

Network Model
Advantages:

Simplicity

Database standards

Disadvantages:

System complexity

Operational anomalies

Not user-friendly

Absence of structural independence

Relational Model
Advantages:

Simplicity

No anomalies

Structural independence

DBMS NOTES 16
Easier design, implementation, maintenance, and usage

Better query capability

Disadvantages:

Hardware overheads

Easier to design, but may lead to poorly designed DBMS## Phenomenon of


Information Islands🌴
Since relational database systems are easy to
implement and use, this will create a situation where too many
people or
departments will create their own databases and applications.
These are
known as information islands, which will prevent the
information
integration that is essential for the smooth and efficient
functioning
of the organization.

Database Users 👥
There are different types of users depending on their need and way of accessing
the database:

Application Programmers:
They are the developers who interact with the database by means of DML
queries. These queries are written in the application programs like C,
C++; Java, etc.

Sophisticated Users: They


are database developers who write special database application programs.
They are the developers who develop complex programs to meet the
requirement.

DBMS NOTES 17
Specialized Users: These users are also sophisticated users, but they write
special database application programs.

Stand-alone Users: These users will have standalone databases designed for
a specific purpose.

Native Users: These are the users who use the existing applications and
interfaces.

File Organization 💻
File Organization: A file organization refers to the way the files are physically
arranged on a storage device.

Types of File Organization 📁


File Organization Description

Sequential File The most basic way to organize a collection of records in a


Organization file is to use sequential organization.

Provides an effective way to access individual records


Relative File Organization
directly.

Indexed Sequential File An effective way of organizing the records when there is a
Organization need to access individual records directly.

Factors Influencing the Choice of File Organization 🤔


Economy of storage

Convenience of updates

Ease of retrieval

Reliability

Security

Integrity

Sequential File Organization 📝


DBMS NOTES 18
In sequential organized files, the records are
written one after another in order when the file is created and
can be
accessed only in that order in which they are written when the
file is
used for input.

Advantages:

Easy to handle

Involves no overhead

Can be sorted on tapes as well as disks

Well suited for batch-oriented applications

Records in a sequential file can be of varying lengths

Disadvantages:

Records can only be accessed in sequence

Does not support updation operation in place

Does not support interactive applications

Relative File Organization 📍


Provides an effective way to access individual
records directly. In relative file organization, there is a
predictable
relationship between the key and the record's location in the
file.

Advantages:

Records can be accessed out of sequence randomly

Well suited for interactive (on-line) applications

DBMS NOTES 19
Supports updation operation in place

Disadvantages:

Can only be stored on disks

Involves more overhead in the form of maintenance

Handling is complex as compared to sequential files

Records can only be of fixed length## Indexed Sequential File Organization 💡


Definition:
An indexed sequential file organization is a combination of sequential
file and relative file organizations. It provides the benefits of both
access methods, allowing for efficient sequential access and direct
access to individual records.
Structure:
The indexed sequential file organization consists of an index with
pointers to a sequential data file. The index is structured as a binary
search tree, allowing for fast lookup and retrieval of records.
Example:
Consider a credit card billing system with a master file of customer
account information. The account number is used as the index key,
allowing for fast retrieval of individual records. The file can be
accessed in batch mode to generate customer invoices and build summary
reports of accounts activity on a monthly basis.
Advantages:

Records can be accessed sequentially and directly.

Supports interactive and batch-oriented applications.

Supports update operations.

Disadvantages:

Can only be stored on disks.

Involves more overhead in maintaining the index.

Records cannot be of variable length.

🔑
DBMS NOTES 20
Multi-Key File Organization 🔑
Definition:
A multi-key file organization is a method of organizing files to
support multiple keys or access paths. It allows for efficient retrieval
of records based on different keys or combinations of keys.
Example:
Consider a banking system with several types of users, including
tellers, loan officers, branch managers, and account holders. Each user
needs to access the same data in different ways. A multi-key file
organization can support multiple access paths, including account ID,
overdraft limit, social security number, and group code.
Approach:
One approach to support multi-key file organization is to use a single
data file and multiple indexes, each providing a different access path
to the data records.

Hashing 🎯
Definition:
Hashing is a technique of storing and retrieving records in a file
using a hash function. The hash function calculates the address of the
page where the record is stored based on one or more fields in the
record.
Hash Function:
A hash function is a mathematical formula that manipulates the keys in
some way to compute the index for the keys in the hash table.
Example:
Consider a hash function that takes the first two characters of the
staff number, converts them to an integer value, and then adds this
value to the remaining digits of the field. The resulting sum is used as
the address of the disk page where the record is stored.

Collision Resolution:

DBMS NOTES 21
Open Addressing: A technique of resolving collisions by probing other slots in
the hash table to find an empty slot.

Chained Overflow: A technique of resolving collisions by storing multiple


records with the same hash value in a linked list.

Collision Resolution Techniques 📊


Technique Description

Open Addressing Probes other slots in the hash table to find an empty slot

Chained Overflow Stores multiple records with the same hash value in a linked list

Separate Chaining Uses a linked list to store all records with the same hash value

Separate Chaining Example


Let's consider the insertion of elements 5, 28,
19, 15, 20, 33, 12, 17, 10 into a chained hash table with 9 slots. The
hash function is
h(k) = k mod 9 .

Initial State:

T0 | T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8
---| ---| ---| ---| ---| ---| ---| ---| ---
null | null | null | null | null | null | null | null | nul
l

Insertion of Elements:

h(5) = 5 mod 9 = 5

h(28) = 28 mod 9 = 1

h(19) = 19 mod 9 = 1

...

T0 | T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8
---| ---| ---| ---| ---| ---| ---| ---| ---

DBMS NOTES 22
null | 28 -> 19 | null | null | null | 5 | null | null | nu
ll

Chained Hash Table After Insertion


T0 | T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8
---| ---| ---| ---| ---| ---| ---| ---| ---
null | 28 -> 19 | null | null | null | 5 -> 15 -> 33 | null

🗂️
| null | null
```## Collision Resolution by Open Addressing

In open addressing, all elements of the dynamic set are store


d in the hash table itself. Each entry of the hash table eith
er contains an element of the dynamic set or a sentinel value
indicating that the slot is free.

### Linear Probing 🔍


Linear Probing uses the following hash function:

h(k, i) = (k mod m + i) mod m

where m is the size of the hash table, k is the key, and i is


the probe number.

**Example:** Consider inserting the keys 16, 26, 37, 59, 21,
65, 88 into a hash table of size m = 11 using linear probing.

| Key | h(k, 0) | h(k, 1) | ... |


| --- | --- | --- | ... |
| 76 | 10 | | |
| 26 | 4 | | |
| 37 | 4 | 5 | |
| 59 | 4 | 6 | 7 |
| 21 | 10 | 0 | |

DBMS NOTES 23
| 65 | 10 | 0 | 1 |
| 88 | 0 | 1 | 2 |

**Primary Clustering:** Linear Probing suffers from primary c


lustering, where a cluster refers to a block of occupied slot
s, and primary clustering refers to many such blocks separate
d by free slots.

### Quadratic Probing 📈


Quadratic Probing uses the following hash function:

h(k, i) = (k mod m + c1 \* i + c2 \* i^2) mod m

where m is the size of the hash table, k is the key, and c1 a


nd c2 are given constants.

**Example:** Consider inserting the keys 76, 26, 37, 59, 21,
65, 88 into a hash table of size m = 11 using quadratic probi
ng with c1 = 1 and c2 = 3.

| Key | h(k, 0) | h(k, 1) | ... |


| --- | --- | --- | ... |
| 76 | 10 | | |
| 26 | 4 | | |
| 37 | 4 | 8 | |
| 59 | 4 | 7 | 10 |
| 21 | 10 | 1 | |
| 65 | 10 | 1 | 4 |
| 88 | 0 | 1 | 4 |

### Double Hashing 🔗


Double Hashing uses the following hash function:

h(k, i) = (h1(k) + i \* h2(k)) mod m

DBMS NOTES 24
where m is the size of the hash table, k is the key, and h1 a
nd h2 are two auxiliary hash functions.

**Example:** Consider inserting the keys 76, 26, 37, 59, 21,
65, 88 into a hash table of size m = 11 using double hashing
with h1(k) = k mod 11 and h2(k) = k mod 9.

| Key | h1(k) | h2(k) | h(k, 0) | h(k, 1) | ... |


| --- | --- | --- | --- | --- | ... |
| 76 | 10 | 4 | 10 | | |
| 26 | 4 | 1 | 4 | | |
| 37 | 4 | 1 | 4 | 5 | |
| 59 | 4 | 5 | 4 | 9 | 14 |
| 21 | 10 | 3 | 10 | 1 | |
| 65 | 10 | 5 | 10 | 1 | 2 |
| 88 | 0 | 1 | 0 | 1 | 2 |

## B-Tree 🌳
A B-tree of order m can be defined as an m-way search tree th
at satisfies the following properties:

> All leaf nodes are at the same level.


> All non-leaf nodes (except the root node) should have at le
ast [m/2] children.
> All nodes (except the root node) should have at least [m/2]
- 1 keys.
> If the root node is a leaf node (only node in the tree), it
will have no children and will have at least one key. If the
root node is a non-leaf node, it will have at least 2 childre
n and at least one key.
> A non-leaf node with n-1 key values should have n children.

**Advantages:**

DBMS NOTES 25
* B-tree is perfectly balanced, so the number of nodes access
ed to find a key becomes less.
* B-tree avoids waste of storage space since any node (except
the root) is at least half full.

**Example:**

The minimum and maximum number of children in any non-root an


d non-leaf node of B-trees of different orders are shown in t
he following table:

| Order (m) | Minimum Children | Maximum Children |


| --- | --- | --- |
| 3 | 2 | 3 |
| 4 | 2 | 4 |

🌳
| 5 | 3 | 5 |
| ... | ... | ... |## B-Trees

A B-tree is a self-balancing search tree that keeps data sort


ed and allows search, insert, and delete operations in logari
thmic time.

### Properties of B-Trees

* **Order**: The maximum number of children a node can have.


* **Minimum Children**: The minimum number of children a node
must have.
* **Maximum Children**: The maximum number of children a node
can have.

### B-Tree of Order 5

In a B-tree of order 5, the maximum number of permissible key


s (MAX) is 4, and the minimum number of permissible keys (MI
N) is 2.

DBMS NOTES 26
### Example of a B-Tree of Order 5

```js
+---------------+
| 40 |
+---------------+
| / \ |
|/ \ |
+---------------+---------------+
| 14 | 68 |
+---------------+---------------+
| / \ / \ / \ |
|/ \| |/ \| |/ \|
+---------------+---------------+---------------+
| 5 | 15 | 35 | 45 | 55 |
+---------------+---------------+---------------+

B+ Trees 🌳
A B+ tree is a variation of a B-tree that is well-suited for disk access.

Properties of B+ Trees
Internal Nodes: Store only keys and child pointers.

Leaf Nodes: Store keys and their corresponding data items.

Linked List: All leaf nodes form a linked list.

Example of a B+ Tree
+---------------+
| 40 |
+---------------+
| / \ |
|/ \ |
+---------------+---------------+

DBMS NOTES 27
| 14 | 68 |
+---------------+---------------+
| / \ / \ / \ |
|/ \| |/ \| |/ \|
+---------------+---------------+---------------+
| Data | Data | Data | Data | Data |
+---------------+---------------+---------------+

📊
Relational Database Management Systems (RDBMS)

A Relational Database Management System (RDBMS) is a database management


system that is based on the relational model.

Properties of Relational Tables


Values are Atomic: Columns in a relational table are not repeating groups or
arrays.

Column Values are of the Same Kind: All values in a column come from the
same domain.

Each Row is Unique: No two rows in a relational table are identical.

Each Column has a Unique Name: Column names are unique.

The Sequence of Rows is Insignificant: Rows can be retrieved in any order.

The Sequence of Columns is Insignificant: Columns can be retrieved in any


order.

RDBMS vs DBMS
RDBMS DBMS

Relationship between
Specified at table creation Programmatically specified
tables

Client/Server Architecture Supports Does not support

Distributed Databases Supports Does not support

DBMS NOTES 28
Security Multiple levels of security Tight security

One database with many Many tables with one


Database
tables extension

Codd's 12 Rules 📜
Dr. E.F. Codd's 12 rules for a Relational Database Management System (RDBMS):

"A relational system must be able to manage


databases of arbitrary complexity, and it must be able to do so
in a way
that is conceptually simple, efficient, and flexible."

Rule 1: The information rule

Rule 2: The guaranteed access rule

Rule 3: Systematic treatment of null values

Rule 4: Active online catalog based on the relational model

Rule 5: Comprehensive data sublanguage rule

Rule 6: View updating rule

Rule 7: High-level insert, update, and delete rule

Rule 8: Physical data independence

Rule 9: Logical data independence

Rule 10: Integrity independence

Rule 11: Distribution independence

DBMS NOTES 29
Rule 12: Non-subversion rule

DBMS NOTES 30

You might also like