0% found this document useful (0 votes)
16 views24 pages

DBMS - Lecture - 2

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)
16 views24 pages

DBMS - Lecture - 2

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/ 24

Database Approach

Emphasises the integration and sharing of


data throughout the organisation (at least
across major segments of the
organisation).
Database Approach
Personnel
Application
File 1
Payroll
DBMS File 2
Application
File 3
Benefit
Application
e.g. Integrated human resources database
Employees: Name, Address, NID number,
Designation
Payroll: Hours worked, Pay rate
Benefit: Insurance, Pension plan
Advantages of Database Approach

• Controlling Data Redundancy

• Elimination of Inconsistency

• Flexibility of the System is Improved

• Integrity can be improved

• Security can be improved

• Provides backup and Recovery


Disadvantages of Database Approach

• Database Complexity

• Substantial hardware and software start-up


costs

• Damage to database affects virtually all


applications programs

• Extensive conversion costs

• Initial training required


Components of DBMS
• Hardware : computer, hard disks, I/O channels
for data, and any other physical component
involved before any data is successfully stored into
the memory.
• Software : provides an easy-to-use interface to
store, access and update data.
• Data : Data is that resource, for which DBMS was
designed.
• Procedures : general instructions to use a
database management system.
• Database Access Language : Database Access
Language is a simple language designed to write
commands to access, insert, update and delete data
stored in any database.
2. Database Management System
Concepts And Architecture
DBMS – Three Level Architecture
1. Physical Level

• It is also known as Internal Level.


• This level is very close to physical storage of data.
• This level describes how the data is actually stored in
the storage devices.
• This level is also responsible for allocating space to
the data.
• This is the lowest level of the architecture.
• The internal schema defines the various stored data
types. It uses a physical data model.
2. Conceptual level
• It is also called logical level. The whole design of the
database such as relationship among data, schema of
data etc. are described in this level.
• Database constraints and security are also
implemented in this level of architecture.

3. External Level
This is the highest level in the three level architecture
and closest to the user. It is also known as the view level.
The external level only shows the relevant database
content to the users in the form of views and hides the
rest of the data. So different users can see the database
as a different view as per their individual requirements.
Data Model & DB Schema
 A data model is a collection of concepts
for describing data in a DB, including
Objects
Relationships among objects
Constraints on objects & relationships
Operations on objects & relationships
 A data model emphasizes on what data is
needed and how it should be organized.
 Data model is like architect’s building plan
which helps to build a conceptual model and
set the relationships between data items.
 A schema is a description of a particular
collection of data, using a given data model.
 An instance is a particular set of data in the
DB.
Database Schema

 Defines a database’s structure


tables - subjects within the database
relationships - one-to-many or 1:N
domains - set of values a column may have
business rules - restrictions on data values

Page 30
Entity-Relationship Model
 A popular conceptual model.
Concepts include entities, relationships,
constraints.

Age Credits
GPA Grade

Students m n Courses
Enrolled

SID Name CID Cname


Relational Model
 The most widely used logical model today.
Concepts include: tables, constraints,
operations, …

Students(sid, name, login, age, gpa)


Courses(cid, cname, credits)
Enrolled(sid, cid, grade)
Abstract levels of DB Schema

 Views describe how View 1 View 2 View 3


users see the data.
 Conceptual schema Conceptual Schema
defines logical
Physical Schema
structure using a data
model
 Physical schema
describes the files and
indices used.
Example: University Database
 A View for registrar office
Course_info(cid:string,enrollment:integer)
 The conceptual schema:
Students(sid: string, name: string, login:string, age:
integer, gpa:real)
Courses(cid: string, cname:string, credits:integer)
Enrolled(sid:string, cid:string, grade:string)
 the physical schema:
Relations stored as unordered files.
Index on first column of Students.
Data Independence
 DBMS is able to hide details of lower level
schema from clients of higher level schema
 Logical data independence: Protects views
from changes in logical (conceptual)
structure of data.
 Physical data independence: Protects
conceptual schema from changes in physical
structure of data.
One of the most important benefits of using a DBMS!
Database Components

Page 26
Types of Data
 User data
 Metadata
 Indexes
 Application Metadata

Page 25
User Data
 A table of data called a relation
 Columns are fields or attributes
 Rows are entities
 Relations must be structured properly

Page 26
Metadata
“A description of the structure of the database”
 System tables store metadata
number of tables and table names
number of fields and field names
primary key fields
field names, data types, and length

Page 27
Indexes
 Improve performance
 Improve accessibility
 (Overhead data)

Page 28
Application Metadata
 Stores the structure and format of
forms
reports
queries
other application components

Page 29

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy