0% found this document useful (0 votes)
82 views11 pages

Database Management Systems

1) A database is a collection of data stored in an organized format. A database management system is a computer program that allows users to create, access, manage and control databases. 2) There are three main levels of abstraction in a database - the physical level describes how data is stored, the conceptual level describes what data is stored, and the external or view level describes how users view the data. 3) The relational model stores data in tables with rows and columns and allows users to insert, delete and modify data. Relationships between tables are established through primary keys, foreign keys, and other keys.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views11 pages

Database Management Systems

1) A database is a collection of data stored in an organized format. A database management system is a computer program that allows users to create, access, manage and control databases. 2) There are three main levels of abstraction in a database - the physical level describes how data is stored, the conceptual level describes what data is stored, and the external or view level describes how users view the data. 3) The relational model stores data in tables with rows and columns and allows users to insert, delete and modify data. Relationships between tables are established through primary keys, foreign keys, and other keys.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

DATABASE : A collection of data is referred to as

database.
e.g. 1.record of students stored in files
2. information stored over internet

DATABASE MANAGEMENT SYSTEM: It is basically a


computer based record keeping system (program).
e.g. MySQL
Microsoft Access
FileMaker
FoxPro
Purpose of database :

1. It reduces DATA REDUNDANCY to a largeextent.


2. It controls DATAINCONSISTENCY.
3. It facilitate SHARING of data.
4. It ensures DATASECURITY.

Name D.O.B Fees Name D.O.B Fees


Harsh 23/01/1993 Not paid Harsh 23/01/1993 Paid
Amar 04/11/1994 Paid Amar 04/11/1994 Paid
Devendra 14/06/1992 Not paid Devendra 14/06/1992 Paid
Harsh 23/01/1993 Not paid Harsh 23/01/1993 Not paid

Data Redundancy Data Inconsistency


Various levels of database implementation (concept ofabstraction)
1.INTERNAL LEVEL (PHYSICAL LEVEL):
It describes how data are actually stored on the storage
medium.
It is closest to database programmer.
Lowest level of database abstraction.

2. CONCEPTUAL LEVEL:
It describes what data are actually stored in database.
It is closest to the database manager.
It is an intermediate level of database abstraction.

•EXTERNAL LEVEL (VIEW LEVEL):


It describes the way in which the data are viewed by individual
user.
It is the level closest to the users.
Three levels of data abstraction
Account holder M anager

External level View 2


View 1 AC_No
User View 1 View 2 View 3 AC_Name AC_Name
Amount Type
Amount
Database Conceptual
handler level Conceptual
AC_No numeric(15)
AC_Name character(20)
Type character(10)
Physical Amount numeric(15)
level

(DBMS Programmer)
Internal
Stored-acc. length=60
Account # type=bytes(15) offset=0
Name type=bytes(20) offset=15
Type type=bytes(10) offset=35
Amount type=bytes(15) offset=45
DATA MODELS
Table : Items 1.Relational Data Model
Item # Item- Price Table : Shipments
name
Supp# Item# Qty-
I1 Cake 50.00 Supplie
I2 Bread 9.00 d
I3 Biscuits 6.00 S1 I2 20
I4 Snacks 16.00 S1 I3 25
S1 I4 10
Table : Suppliers
S2 I1 5
Supp# Supp-name
S2 I3 10
S1 Britannia
S2 New Bakers

1. RELATIONAL DATA MODEL: In relational data model, the


data is stored in the form of tables (i.e. rows ad columns).
These tables are called relations.
The user of the relational database system may insert new tuples,
delete tuples, and modify tuples.
2. Network DataModel

S1 Britannia

20 25 10

I2 Bread 9.00 I3 Biscui 6.00 I4 Snacks 16.00


ts

2. NETWORK DATA MODEL: The network data model differs


from the relational model.
In this model data is represented by connection of records and
relationships among data are represented by links.
Records are organized as graphs.
3. Hierarchical Data Model

S1 Britannia

I2 Bread 9.00
I3 Biscuits 6.00
I4 Snacks 16.00 20

25
10

3. HIERARCHICAL DATA MODEL: Data is represented by


collection of records and relationships among data by links, similar
to the network model.
Records are organized as trees rather than graphs.
Represents relationship among its records through parent child
relationships.
Relational Data
Model

The relational model was put forward by E.F. Codd of the IBM.
It is considered as a very important concept in DBMS.

Some basic terminologies

Relation : A relation is a table i.e. data is arranged in rows and columns.


Tuple : The rows of tables are generally referred to as tuples.
Attributes : The columns of tables are generally referred to as attributes.
Degree : The number of attributes in a relation determine the degree of
the relation.
Cardinality : The number of tuples in a relation is called the cardinality of
the relation.
Views

A view is a (virtual) table that does not really exist in its own right but is
instead derived from one or more underlying base tables.
It is an excellent way to give people access to some but not all
information (data abstraction).

Database Keys are used to establish and identify relations between


tables.
Primary key: It is a set of one or more attributes that can uniquely
identify the tuples within the relation.
Candidate key : All attribute combinations inside a relation that can
serve as a primary key are candidate keys.
Alternate key: A candidate key that is not the primary key is called the
alternate key.
Foreign key : A foreign key is a non key attribute whose value is derived
from the primary key of another table.
Table : Employee
Empno Name D.O.B. Post Area_code

101 Aakash 13/03/1994 Director 221 Foreign key in


102 Shahrukh 26/11/1993 Director 223 this table
103 Nishank 30/02/1989 Manager 156
104 Shivesh 24/03/1993 Clerk 223
105 Prem 31/05/1992 Clerk 156

Table : Location
Area_code Area State
156 Mumbai Maharashtra
221 Bengaluru Karnataka
223 Pune Maharashtra

Primary Keyin
this table

You might also like