Unit1 DBMS
Unit1 DBMS
CM Suvarna Varma
Assoc Prof
UNIT 1
Syllabus
• UNIT-I: Introduction
DATABASE (DB)
DATABASE
DBMS (Database management
systems)
• DB (database -> collection of data) + MS (management -> set of
programs to store/retrieve the data)
• 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.
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
• 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)
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).
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
Network Client
Client
Client-Server System
DBA & roles
• A person who has overall control over the data system is called
database administrator (DBA).
• 1)Hardware
• 2)software
• 3)data Database
Data
Access Procedures
• 4)procedures Language
• Disadvantage:
DML Compiler D
Query Processor
Query Optimizer DDL Compiler
B
M
Stored Data Manager TCL
DCL S
authorise Integrity Files/Buffer Transac
It interprets requests (queries) received from end user viation program into
instructions.
Its an interface between data stored in the database & queries received. It is
also known as Data Control system.