Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
DATA
DATABASE
DBMS/RDBMS
Information
Application
Programs
(Programs
Written in C
Pascal etc.)
File System
(Data
Structure
File Handling)
Database
(Information in
Files Format)
Disadvantages of FPS
Data Redundancy and Inconsistency
Difficulty in accessing data
Data isolation
Integrity Problems
Atomicity Problems
Concurrent-access anomalies
Security Problems
Name
ABC
DEF
Address
Bhiwani
Delhi
Customer Information
AccNo Name
1002
ABC
1005
DEF
Address
Bhiwani
Jaipur
Saving Account
Manager
Requirement
Application
Programs
(Programs
Written in C
Pascal etc.)
File System
(Data Structure
File Handling)
Database
(Information Storage
in Files Format)
Requirements of a DBMS
A mechanism for specification of data and its dependencies
D
B
M
S
File
Manager
Secondary
Storage
Data Independence
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 Models
A Data Model is a mechanism for describing the data, their interrelationships
and the constraints.
Record-based models.
Relational Model
Network Model
Hierarchical Model
Acc_No
Book
Title
Acc_No
Borrowed_By
____
Name
Card_No
USERS
Hierarchical Model
This is special kind of a network model where the relationship is
essentially a tree-like structure.
Hospital
Wards
Patient
Doctors
Units
Nurses
Cardiology
Skin
Database Languages
Database Languages
Data-Definition
Data-Manipulation
Data-Control
Update
Insert
Delete
Query
GRANT Connect,
Resource TO x
User
Database Administrator
Roles of DBA
Schema Definition
Storage structure and access-method definition
Terms
Simple and Composite Attributes
Single-valued and Multivalued Attributes
Null Attributes
Derived Attributes
Existence Dependencies
Keys
Keys
Candidate Key
Primary Key
Alternate Key
Composite Key
Secondary Key
Foreign Key
Mapping Cardinalities
Mapping cardinalities, or cardinality ratios, express the number of entities to which
another entity can be associated via a relationship set. For a binary relationship set R
between entity sets A and B, the mapping Cardinality must be one of the following
One to One
One to Many
Many to One
Many to Many
Company
Owns
Leased
Vehicle
Staff
Manager
Subordinate
Circular Relationship
Reports to
Fundamental Operations
select (unary)
project (unary)
rename (unary)
Fundamental Operations
cartesian product (binary)
union (binary)
set-difference (binary)
Relational Calculus
Relational Calculus is a nonprocedural Query language
Normalization
Normalization is a process of removing redundancy using functional Dependencies.
Name
F_name
C_addr
L_name
City
State
Zip
s_name, item
price
Price
gift_item
Here al prime attributes are ful y functional dependent on candidate
keys, the
Non-prime attribute gift-item is also ful y functional dependent on the
non-prime
Attribute price. This create redundancy because every price value
there is a fixed
Gift item.
We shal have to impose the additional restriction that no non-prime
attribute can
Be functional y dependent on another non-prime attributes.