0% found this document useful (0 votes)
12 views

Unit1 DBMS

Uploaded by

nabisoj419
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)
12 views

Unit1 DBMS

Uploaded by

nabisoj419
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/ 57

Introduction to DBMS

CM Suvarna Varma
Assoc Prof
UNIT 1
Syllabus
• UNIT-I: Introduction

• Introduction to Database, Applications of Database, Purpose of Database, View of Data,


Data Independence, Data Models, Users of Database, DBA, Query Processor, Storage
Manager, Database Architecture
DATA

DATABASE (DB)

DATABASE MANAGEMENT SYSTEM (DBMS)


What is Data?
• Data is collection of facts/figures which are stored in a computer
memory.
• Data are units of information collected through observation.
• Data are raw bits and pieces of information with no content.

• Data can be qualitative (numeric) or quantitative (descriptive)


What to do with the Data???

• A data with content is called information.

3.8 million vaccines –covishield


Analysed & implemented 4.2 million vaccines – covaxin shared to AP
Wisdom
(Business Intelligence)
30% of Female (age group 18-45) ,
Context analysed 3.80CRores
Knowledge (Data mining) 35% of male (age group 18-45) registered
for vaccination 4.20Crores

Information Data with content E.g: Covid vaacination


(DBMS) starts from 01/05/21

DATA Raw Bits/ no content E.g: 010521


Database
• A collection of inter related data /information that is organized so that
it can be easily accessed, managed & updated.

• Most databases contain multiple tables which may include several


fields.
• E.g: A company database may have tables for products, employees,
sales & financial records.

DATABASE
DBMS (Database management
systems)
• DB (database -> collection of data) + MS (management -> set of
programs to store/retrieve the data)

• It is a software which is used to manage the database.

• A collection of inter related data & set of programs to store & access
the data in a very easy & effective manner.
History of Data
• Data – word discovered in 1640’s.

• It was first used to mean “transmissible & storable computer


information” in 1946.

• “Data Processing” was first used in 1954

• Latin word -> data is plural of Datum (single value)


History of database
• 1950-1960s: Punch cards, maganetic tapes to store data.
• 1960-1970s: Hard disks came in this era , Data structures(lists, trees), (N/w,
hierarchial models)
• 1970- Edgar Codd – RDBMS
• 1970-1980s: R-prototype led to IBMs first relational database –SQL/DS ,
Ingress, oracle, rdbms
• 1990s – Oodatabases, SQL, WWW.
• 2000s – Semi structured data XML , opemsource-MySQL , Datamining
• Later 2000s – parallel data – mapreduce(big data) , NO SQL
• 2010’s : support to NoSQL , cyber security, risks
Database

Applications USERS

DBMS
C++

Java

store retrieve
Applications of Database
• Banking: Customer Information, Accounts, Loans, Banking
Transactions, Forex

Personal
Dept
Loan Dept
DBMS
Acct Dept BANKING DATABASE

Foreign
Exchnage Dept
More Applications
• Airlines: Reservations and scheduled information.
• Universities: Student information, course registration, grades
• Sales: customer, product, purchase information.
• Telecommunication: Call records, data usage,monthly bills, maintain
balance.
• Social media: user records, connection between users,posts, ratings
• Online-retailers: sales records, orders, tracking, search, best items
recommendation.
• Online advertisements: keep history, product suggestion,new articles,
make online purchase.
• Human Resource: Employees,salaries,payroll,benefits,pay checks.
• Manufacturing: Supply chain,tracking production,inventories in
warehouse,order for items.
Data Characteristics

• 1.Structured & described data: definition, type, format, relationship of


data {meta data} [ metadata : data about the data]
• 2.Seperation of data & application: Application s/w doesn’t need any
knowledge of physical storage of data. It only comm with DBMS s/w
• 3.Data integrity: Maintain quality,reliability of data & protection from
unauthorized users.
• 4.Transaction: Bundle of actions within database to bring it from one
consistent state to new consistent state.
• 5.Data Persistence: DBMS maintains all data for long period of
time(one stored cant be lost)
Purpose of Database systems
contd..file vs dbms
• The main purpose of database systems is to manage the data,
especially with the client-server environment.

• File systems also used to store & retrieve data but it has got its
disadvantages: DBMS helps with this:
• Data storage (less space, remove redundant data, huge volume of
data store)
• Data retrieve(fast retrieval)
• Metadata
File system Vs DBMS
• 1. Data Redundancy & inconsistency : In files, multiple file formats &
duplicate info in different files..[no redundancy & inconsistency in
dbms]
• 2. Difficulty in accessing data: write new program to carry a new task.
[not required in dbms]
• 3. Data isolation: multiple files & formats [ access –location of file,
dbms doesn’t need location]
• 4.Integrity problems(constraints) become part of code & adding new
constraint is hard ( adding constraints is easy)
• 5.Atomocity of updates: failures might leave inconsistent state with
partial update, no concurrency acces [ concurrent & consistent in
dbms]
• 6.Security problems: security not guaranteed in files [dbms provides
role based security]
Types of data (stored)

• 1.User data: table of data , columns fileds, rows records.


• 2. Metadata: description, structure of database, (no of tables, no of
fileds,table name, field name) (DDL)
• 3.Application data: stores structure of queries,reports,other applic
components.
• 4.Hardware: secondary storage devices like magnetic tapes, hard
disks, DVD, optical disk, etc.(stored with help of i/p devices)
• 5.software: Bridge between user and database operation ( SIDU –
DML)
Types of databases

• Traditional databases – TDB ---- Text, numbers


• Multimedia databases – MDB ----Speech, Image, Voice
• Global Information System – GIS ---- Images / Maps
• Real time databases –RTDB – Ongoing transactions
• Datawarehouse – DW – Historical data
Types of users
• Users are the persons who need information from the database.

• 1. Database Administrator (DBA)


• 2.Database Designer [ ER , Normalization]
• 3. Application Programmer [ queries – SQL]
• 4.End users
4. Danger of Over fill
Small & simple application for single user of database system is not advisable

5. Complexity
Several users access dbms and is quite complex & costly affair.

6.Low efficiency
Continuous multiuse slows down the system.
Views of Data ( 3-tier architecture)

mapping
• The three schema architecture defines view of data at three levels.
Level
• 1. Physical level(internal level)
• 2.Logical level(conceptual level)
• 3. View level(external level)
• Physical Level: Close to physical storage of data, stored in the form of bits
with physical address on secondary storage devices. Its highest form of
viewing is a File format (stored datatypes).

• Conceptual Level: structure of database for a group of users. Information


to build relevant extended records & hides internal details of lower level

• External level: data viewd by individual end user. A segment of data is


required by particular user of group and hides rest of database from the
other user groups.
Data independence

• Data Independence is the property of DBMS that helps you to change


the Database schema at one level of a database system without
requiring to change the schema at the next higher level.
• Two levels of data independence are 1) Physical and 2) Logical
• Physical data independence helps you to separate conceptual levels
from the internal/physical levels
• Logical Data Independence is the ability to change the conceptual
scheme without changing
• When compared to Physical Data independence, it is challenging to
achieve logical data independence
• Data Independence Helps you to improve the quality of the data
LDI: It describes Which data to stored in database,
and relationships among the data in database E.g:
Entities, relationships, attributes, integrity, security

Logical Data independence


Logical Schema
( LDI)

Physical Schema
Physical Data
independence ( PDI)
The data at one layer doesn’t affect
the data at another level, the data
is independent but mapped to each
other. PDI: It describes How data to stored in database, and
data structure & organization in database E.g:
Indexes, hasing, different file storage devices, merge,
sort
Relation system
• The data is collected by the user in the form of tables.
• Create new applications, collected data from old tables & derive new
tables.
• SQL – 1970s-80s Oracle 9i from oracle corporation
• And DB2 version from IBM

• Object oriented 1980s-90s Informix


Facultyname Salary Telephone
Anand 45000 9000012385
Uma 18000 9123458901
Raja 24000 9789647647
Rani 40000 9876876474

SELECT * FROM Faculty WHERE salary > 40,000;

Facultyname Salary Telephone


Anand 45000 9000012385
Client-Server System
USER
• The purpose of database system is to support
the development & execution of database
applications. The database system having
simple two parts: backend , frontend
Client /
APPLICATION PROGRAM
• Server – backend [ DBMs s/w DDL, DML, Frontend
DCL,etc]
• Set of clients – front end [Applications on top
of DBMS]
Server /
• User written applications : c, C++, java Backend
DBMS

• Vendor provided applications: Tools (Data


Mining, Data visualisation tools)
DATABASE
Server

Network Client

Client

Client-Server System
DBA & roles
• A person who has overall control over the data system is called
database administrator (DBA).

• Database administrators (DBAs) use specialized software [dbms]


to store and organize data.
• The main reason for using DBMS is to have a central control of both data
& the programs that access the data.
• The role may include capacity planning, installation, configuration,
database design, migration, performance monitoring, security,
troubleshooting, as well as backup and data recovery.
Roles
• i) schema definition:

• The DBA creates the original database schema by writing set of


definitions.
• i.e, translated by DDL compiler to set of tables.
• i.e, stored permanently in data dictionaries.
• ii) Storage structure & Access method definition:

• The programmers contain rare modifications, either to a database


schema (or) the description of physical storage organization by writing
set of definitions that is used by DDL compiler (or) data storage & the
DDL compiler generates modifications to appropriate internal system
tables

• iii) Granting authorization for data access


• Different types of authorisation can be allowed in database by DBA to
regulate various users of database to have authorised information
which is granted as a special system structure.
• iv)Monitoring Performance & Repsonding Requirements:

• DBA is responsible for organizing the system. If we want to change


any requirements about the storage,changes are made by DBA using
the data independence concept.

• V) defining security & integrity constraints:


• Security constraints can be regarded as part of conceptual schema,
The DDL must include facilities for such constraints.
DBMS functions
• Data definition
• Data manipulation
• Data security/integrity
• Data recovery & concurrency
• Data dictionary
• Data independence(performance)
Components of DBMS Software

• There are five major components: Hardware

• 1)Hardware
• 2)software
• 3)data Database
Data
Access Procedures
• 4)procedures Language

• 5)database access language


User
Data models
• 1. hierarchial model
A data model is an abstract • 2. Network model
model that organizes elements • 3.ER model
of data and standardizes how
they relate to one another and • 4.Relational model
to the properties of real-world • 5.object oriented model
entities
• 6. Semi structured model
Hierarchial data model
Hierarchial data model
• A Tree structure
• Parent-child relationship
• One-many relationship

• Disadvantage: Deletion problem


Network data model
Network data model
• A Graph structure
• Inter-connection client-server relationship
• Ability to merge more relationships
• Many paths
• Circular linked list

• Disadvantage: Select, insert, delete, update (SIDU) operations are


complex
ER Model
ER model
• Entities, attributes & relationships. It is a high level data model &
represent real world problem in a pictorial form.
• It is simple,effective & easy conversion to any model.

• Disadvantage: 1) All details cannot be shown, some information might


be hidden.
• 2. No industry standard to develop ER model.
Relational model
Relation Data model:
• Relational Data model is a table structure with rows(tuples) and
columns(attributes)
• Simple , Scalable , Structural Independence

• Disadvantage: 1. Bad design might lead to great problems


• 2) hardware overhead
Object oriented data model
Object oriented model
• Both data & relationship in the same structure known as objects.
• One object is related to another object.

• Disadvantage:

• unfamiliarity and shortage of experienced programmers


• limited consensus on the standards to use
• low efficiency when dealing with simple data
• limited availability of proper tools and support.
Semi structured data model
xml
DBMS Architecture using Stored data manager,
Query Processor, DML compiler
DBA
Application End user DDL

Applic Program Queues Db Schema

DML Compiler D
Query Processor
Query Optimizer DDL Compiler
B

M
Stored Data Manager TCL
DCL S
authorise Integrity Files/Buffer Transac

DATA FILES + DATA DICTIONARY


1. Query Processor:

It interprets requests (queries) received from end user viation program into
instructions.

It also executes user request which is received from DML compiler.


• DML Compiler: DML statements are processed into low-level instructions so
that they can be executed.

*DDL compiler: Processes DDL statements into set of table containing


metadata.

*Query Optimizer: It executes the instructions generated by DML compiler.


• 2.Storage Manager:

Its an interface between data stored in the database & queries received. It is
also known as Data Control system.

• It maintains consistency (transaction), Integrity (constraints), authorization,


SIDU operations (file manager) , file space, data structure & cache memory
transfers of data between secondary storage & main memory.
• Authorization Manager – Role based access control.
• Integrity Manager – checks Integrity Constraints
• Transaction Manager – Controls concurrent access.
• File manager –Manage file space & Data structure.
• Buffer Manager – Cache memory , transfers between secondary Memory &
main memory.
• 3. Disk Storage:

• Data files -- Stores the data.


• Data dictionary – Metadata & its Datastructure.
• Indices – Fast retrieval of data item.

You might also like