Data Base Technologies
Day 1
Agenda
•What is a database?
•Disadvantages of File Management Systems
•Data Management system
•Data Abstraction
•Data Independence
•Data Models
-Hierarchal Model
-Network Model
-Relational Model
•Relational Data Base Management System Concepts
Definitions
Data :- It is defined as an information that can be recorded
and that has implicit meaning.
Database : Collection of related data, stored in a
standardized format ,designed to be shared by multiple users.
DBMS(Data Base Management System):-
•It consists of collection of inter related data and a set of
programs to access the data
•It provides a convenient & efficient environment for
inserting, retrieving,modifying and storing database
information.
Database Applications
Banking: all transactions
Airlines: reservations, schedules
Universities: registration, grades
Sales: customers, products, purchases
Manufacturing: production, inventory, orders, supply chain
Human resources:employee records, salaries, tax deductions
FMS & Disadvantages
• Data redundancy and inconsistency
• Difficulty in accessing the data
• Data isolation
• Integrity problems
• Atomicity problems
• Concurrent access anomalies
• Security problems
Database Management System
• Control of data redundancy
• Sharing of data
• Maintenance of Integrity
• Control over Security
• Data abstraction
• Data independence
Data Abstraction
• DBMS provides users with an abstract view of data.
• It hides the complex data structures for the representation
of data in database.
Levels of abstraction
• Physical level : Lowest level of abstraction describes how
data is stored.
• Logical level : Next higher level of abstraction describes
what data is stored and the relationships among the data
• View level : Highest level of abstraction describes only
part of database.
Data Independence
Physical data Logical data
independence Independence
• Ability to modify the • Ability to modify
physical schema logical schema
without causing without causing
application programs application programs
to be rewritten to be rewritten
Data Model
• An integrated collection of concepts for describing
data, relationships between data and constraints on
the data.
• A data model comprises three components:
– a structural part (a set of rules describing how
the database is to be constructed)
– a manipulative part (defines the types of
operations allowed on the data)
– a set of integrity rules (ensures data accuracy)
Types of data models
• Object-based logical models: Based on collection
of objects.
ER-model,object-oriented model
• Record-based logical model:Database is structured
in fixed format record.
Hierarchical,Network,relational models
Entity-Relationship Model
Example of schema in the entity-relationship
model
Hierarchical model
• A Hierarchical database consists of a collection of
records that are connected to each other through
links.
• The hierarchical data model organizes data in a
tree structure
• Parent-child relationship (one-to-one or one-to-
many) among data
Hierarchical data model
Class
Student Instructor
Grade ID Department
Hierarchical data model
• Advantages
easy to search
can add new branches easily
• Disadvantages
All child records are lost with the deletion of
parent record.
Network Model
• A Network database consists of a collection of
records connected to one another through
links,which can be viewed as pointers.
• The records in the database are organized as
collections of arbitrary graphs.
• One-to-one, one-to-many, many-to-one, or many-
to-many relationships possible
.
Network data model
Class
Student Instructor
Grade ID Department
Network data model
Advantages
flexible, fast, efficient
Disadvantages
complex
restructuring can be difficult because of
changing all the pointers
Relational Model
• A relational model consists of relations which
represents data and the relationships among data..
• A relation is a two dimensional table with special
properties.
• A relational table is a collection of columns and
rows
• columns are called attributes and rows are called
tuples.
Properties of Relational Tables
• Table name is distinct from all other table names
in the database.
• Each cell of table contains exactly one atomic
(single) value.
• Each column has a distinct name.
• Values of a column are all from the same domain.
• Each record is distinct; there are no duplicate
records.
• Order of columns has no significance.
• Order of records has no significance.
Relational Model
Columns/
Attributes/
Fields
customer- customer- customer- account-
Customer-
id • Example of tabular data in the relational model
name street city number
192-83-7465 Johnson
Alma Palo Alto A-101
019-28-3746 Smith
North Rye A-215
192-83-7465 Johnson
Alma Palo Alto A-201
321-12-3123 Jones
Main Harrison A-217
019-28-3746 Smith
North Rye A-201
Rows/
Tuples/
Records
Relational Keys
Each record in a table must be unique
•A super key is a column, or a set of columns, that
uniquely identifies a record in a table.
• A minimal super key , with no proper subset that is also a
super key, is called a candidate key.
•A key consisting of more than one column is called a
composite key.
•A primary key is the candidate key that is selected by the
database designer, to uniquely identify records within the
table.
– the candidate keys not selected are called
alternate keys.
•A foreign key is a column or set of columns within a
table that is the candidate key of another table.
Relational Integrity
A set of integrity rules ensure that the data is accurate.
• Domain Integrity:Defines the domain constraint for
each column that restrict the set of values allowed for each
column
• Entity Integrity:In a table, no column of primary key can
be null or duplicate.
• Foreign key and Referential Integrity:If a foreign
key exists in a table its value must
-either match with candidate key value of some record in
the home table
-or be wholly null
Thank you