2. 2DBMS
Basic Concepts – Data , information, database and DBMS
Data
o. Data are raw facts. The word raw indicate that the facts
have not yet been processed to reveal meaning
Information
o. Information is the result of processing raw data to reveal
its meaning.
o A data is known as the row fact which is stored in
computers memory and used by the user as the output.
o Collection of data its called information.
Example-House no 21C-S-1,Sch No 78 Indore
o Meaningful form of Data
3. 3DBMS
Basic Concepts – Data , information, database and DBMS
Database:
oA collection of inter related data its called database.
o A database is a shared , integrated computer structure
that store a collection of end-user data and metadata
o A database is a collection of related data and data is
known as facts that can be recorded and that have implicit
meaning
oA database can be of any size and complexity
oA database may be generated and maintained manually or
it may be computerized.
Logically related and similar data
4. 4DBMS
Basic Concepts – Data , information, database and DBMS
What is DBMS
o. A Database Management System is a collection of
programs that manage the database structure and controls
access to the data stored in the database
o Its allows to
o create databases
o insert , update and delete data
o sort and query data
o create form and reports
5. 5DBMS
Basic Concepts – Data , information, database and DBMS
Schema
o The description of a database is called database schema.
o A database schema is specified during database design and
is not expected to change frequently
Instance
oThe data in the database at a particular moment in time is
called database state.
oA database is generally used by many users where insertion
and deletion of data occurs frequently. Overall information
stored in a database at a particular moment is called the
instance of the database.
6. 6DBMS
Basic Concepts – Data , information, database and DBMS
Role and Advantages of DBMS
Improved Data Sharing
Improved Data security
Minimized data inconsistency
Improved Data Access
Improved decision making
Increased end-user productivity .
Reduce application development time
7. 7DBMS
Basic Concepts – Data , information, database and DBMS
Superkey
o An attribute that uniquely identifies each row in a table.
o E.g. :- cust_name and cust_id.
Candidate key
o A minimal superkey. A superkey that does not contain a
subset of attributes that is itself a superkey. E.g. :- cust_id
Primary Key
o A candidate key selected to uniquely identify all other
attribute values in any given row. Cannot contain null entries
Unique Key
o A candidate key selected to uniquely identify all other
attribute values in any given row
o Can accept unique or null values.
8. 8DBMS
Basic Concepts – Data , information, database and DBMS
Foreign key
o An attribute in one table whose values must either match
the primary key in another table or be null.
Field
o A character or group of characters that has a specific
meaning. A filed is used to define and store data.
Record
o A logically connected set of one or more fields that
describes a person, place, or thing
File
o A collection of related record.
9. 9DBMS
Basic Concepts – Data , information, database and DBMS
Database Applications
Railway Reservation
Library Management System
Banking
Schools and colleges
Social media sites
Telecommunication
Finance
Online shopping
10. 1
0DBMS
What is data abstraction? Describe the levels briefly.
Data Abstraction Levels (i.e 2)
11. DBMS
What is data abstraction? Describe the levels briefly.
1
1
Physical Level:
Conceptual Level:
View Level:
End-user View
(
(
Highest level.
Describes part of the
database for a particular
group of users.
Can be many different
views of a database.
E.g. tellers in a bank
get a view of customer
accounts, but not of
payroll data.
How the data are
stored.
E.g. index, B-tree,
hashing.
Lowest level of
abstraction.
Complex low-level
structures described in
detail.
Next highest level of
abstraction.
Describes what data
are stored.
Describes the
relationships among
data.
Database
administrator level.
This level represents
only a part of the entire
database
12. 1
2DBMS
What is data abstraction? Describe the levels briefly.
Data Abstraction Levels
13. DBMS
Data Models and Types of Data Models
1
3
Data Model
A database model shows the logical structure
of a database, including the relationships and
constraints that determine how data can be stored
and accessed
Definition - What does Database Model mean?
A database model refers to the logical structure,
representation or layout of a database and how the data
will be stored, managed and processed within it. It helps
in designing a database and serves as blueprint for
application developers and database administrators in
creating a database
A Database model defines the logical design of
data. The model also describe the relationships between
different parts of the data.
14. DBMS
Data Models and Types of Data Models
1
4
• in the hierarchical model, data is organized as an inverted tree,
Each entity has only one parent but can have several children. At
the top of the hierarchy , there is one entity, which is called the root
• The hierarchical data model organizes data in a tree structure
Hierarchical Model
PROFESSORS
PROFESSORS
No Name
ID Name CourseNo Name Unit
ID Name
DEPARTMENT
COURSES STUDENTS
ID Name
15. DBMS
Data Models and Types of Data Models
1
5
Hierarchical Model
The hierarchical model was the first database model developed to
overcome the limitations of the traditional file system
Deletion of parent results in deletion of child records
The hierarchical models was developed in the 1960 to manage
large amount of data for complex manufacturing projects such as
the Apollo rocket that landed on the moon in 1969.
Its basic logical structure is represented by an upside-down tree
The hierarchical structure contains levels or segments.
The hierarchical model depicts a set of one-tomany relational ship
between a parents and its children segments
tree like structure
one parent may have multiple child but
the child will have only parent
16. DBMS
Data Models and Types of Data Models
1
6
Hierarchical Model
The hierarchical model was the first database model developed to
overcome the limitations of the traditional file system
Deletion of parent results in deletion of child records
The hierarchical models was developed in the 1960 to manage
large amount of data for complex manufacturing projects such as
the Apollo rocket that landed on the moon in 1969.
Its basic logical structure is represented by an upside-down tree
The hierarchical structure contains levels or segments.
The hierarchical model depicts a set of one-tomany relational ship
between a parents and its children segments
tree like structure
one parent may have multiple child but
the child will have only parent
17. 1
7DBMS
Basic Concepts – Data , information, database and DBMS
Disadvantages of hierarchical model
complex implementation
difficult to manage
lack of structure independence
complex application programing
limitation in implementation
Data depended on parent or root element
18. Data Models and Types of Data Models
1
8
• In the network model, the entities are organized in a graph, in which
some entities can be accessed through several paths
• this model was developed to overcome the problems of hierarchical
model
Network model
DBMS
Network model
No Name ID Name Course
No Name Unit ID Name
DEPARTMENT
COURSES
STUDENTS
PROFESSORS
19. DBMS
Data Models and Types of Data Models
1
9
Network model
Graph structure
Many-to-many relationships between linked records,
Some data might have multiple parents
Allow more connation between nodes
ex. A employee work for two department is not possible in
hierarchical mode, but here it is possible
The network model is a database model conveyed as a flexible
way of representing objects and their relationships
20. 2
0DBMS
Data Models and Types of Data Models
Advantages of network model
Simple design
Ability to handle many relationship
Easy to access
Data integrity ( current data, specify , fixed )
Data independence
-Application programmers work independently of the data
-Any change made to the data do not affect application
programme
21. Data Models and Types of Data Models
2
1
• In relational model, the data and relationships are represented by
collection of inter-related tables. Each table is a group of column and
rows, where column represents attribute of an entity and rows
represents records.
Relational model in DBMS
DBMS
Relational model
22. Data Models and Types of Data Models
2
2
Relational model in DBMS
DBMS
Relational model
Attribute
Title Year Length
Star Wars 1977 124
Might Ducks 1991 104
Wayne’s World 1992 95
Table = relation.
Column headers = attributes
Tuple
Title Year Length
Star Wars 1977 124
Might
Ducks
1991 104
Wayne’s
World
1992 95
Table = relation.
Rows = tuple
• A relational database is a collection of one or more relations
where each relation is a table with rows and columns
23. Data Models and Types of Data Models
2
3
Relational model in DBMS
DBMS
Relational model
First proposed by Dr. E.F Codd of IBM Research in 1970
Implemented through Relational DBMS (RDBMS)
Represent database as a collection of relation
Informally, each relation look like a table of values
Represent database as a collections of relations
Relation database matches data by using common
characteristics found within the data set
The resulting groups of data are organized and are much easier
for people to understand.
24. Data Models and Types of Data Models
2
4
• An entity relationship model, also called an entity-relationship (ER)
diagram, is a graphical representation of entities and their relationships
to each other, typically used in computing in regard to the organization
of data within databases or information systems. An entity is a piece of
data-an object or concept about which data is stored.
Entity Relationship Model
DBMS
ER model
title
year
length
name address
name
address
Studios
Star
MoviesOwns
Stars-in
filmType
25. Data Models and Types of Data Models
2
5
ER Model is based on
DBMS • Entities and their attributes.
• Relationships among entities
Person
name
Is-insured
Entity Type
Attribute
Relationship
Type
Entity – An object that exists or abstraction of similar things,
e.g. cars, students or people
Or – Distinguishable “thing” in the real world
Attributes – common properties of the entities in a entity sets
e.g. students and people have names and addresses
Or – Each entity has certain characteristics known as attributes.
Relationship – specify the relations among entities from two or more
entity sets
26. Data Models and Types of Data Models
2
6
ER Model Diagram
DBMS
customer has
cust-street
cust-id
cust-name
cust-city
account
balance
number
access-date
27. Data Models and Types of Data Models
2
7
ER Model Diagram , (Mapping)
DBMS
Many-to-Many1-to-1 1-to Many Many-to-1
One to One(1:1) Relationship: and EMPLOYEE mangers one STORE;
each STORE is managed by one EMPLOYEE
One to many (1:M) relationship: A PAINTER can paint many PAINTINGs;
each Painting is painted by one PAINTER
Many to Many(M:N) Relationship: and EMPLOYEE can learn many SKILLs;
each SKILL can be learned by many EMPLYEEs.
28. Data Models and Types of Data Models
2
8
Object Oriented Model
DBMS
Object Oriented model
• Data Stored in the form of objects, the structure which are called
“Classes” that display data within it.
• Defines database as a collection of objects that contains both data
members values and operations that are allowed on the data.
• Inter-relationship and constraints are implemented through objects and
links.
• The DBMS developed using this mode is called OODBMS
• Combine the capabilities of object oriented programming language
• Evolved to handle more complex applications such as database for
scientific experiments, geographic information system, CAD (computer
Aided Design)
29. Data Models and Types of Data Models
2
9DBMS
Object Oriented model
Object Oriented Model
• In a below diagram customer and account are considered as a object
30. 3
0DBMS
DDL, DML , DCL
DDL - Data Definition Language
o. Used by DB designers to define schema
DML - Data Manipulation Language
o. For accessing and manipulation the data
o. DDL compile converts DDL statements and generate a set
of tables which are stored in.
o. e.g - SQL, ORCALE
o. DML also known as query language
o. Procedural :- user specifies what data is required and how
to get those data.
o. Data dictionary contains metadata