Database Management Systems: Unit - I
Database Management Systems: Unit - I
UNIT - I
Text Books:
(1) DBMS by Raghu Ramakrishnan
(2) Database System Concepts by Sudarshan and Korth
Faculty:
SANDEEP PARAITHAM
E-Mail ID: [email protected]
Ph: +91-9032918676 (WhatsApp Number)
+91-8008885484 (Mobile Number)
Friday, August 20, 2021 An Introduction to DBMS 1
INDEX
UNIT-1 PPT SLIDES
S.No. Module (as per Syllabus) Lecture # Slide
------------------------------------------------------------------------------------------------------
1. DB System Application L1
2. DBMS Vs File Systems L1
3. View of DATA - Data Abstraction L2
4. Instances & Schemas L2
5. Data Models (ER, Relational etc.) L2
6. DB Languages (DDL, DML) – DB Access L2/L3
7. DB Users and Administrator L2/L3
8. Transaction Management
9. DBMS Architecture
10. Storage Manager – Query Processor
• Fraud detection
– Which types of transactions are likely to be fraudulent, given the
demographics and transactional history of a particular customer?
• In computer science,
– data is anything in a form suitable for use with a computer
– Data is often distinguished from programs
– A program is a set of instructions that detail a task for the computer to perform
– In this sense, data is thus everything that is not program code
– They may be 1's and 0's of computer memory, names and addresses in a file
• Entity Set: All related entities are collected together to form an Entity Set
– (Example: A ‘STUDENT ‘Entity Set contains data about students only and not about
employees or customers)
USER
SOFTWARE
HARDWARE
• Custom applications such as data entry forms, reports, queries, blocks and
programs
• Database Applications:
– Banking: all transactions
– Airlines: reservations, schedules
– Universities: registration, grades
– Sales: customers, products, purchases
– Online retailers: order tracking, customized recommendations
– Manufacturing: production, inventory, orders, supply chain
– Human resources: employee records, salaries, tax deductions
• Physical Design
– Internal Storage Structures / Indexes / Access Path / File Organizing for the DB files
– Application Programs / Database Transactions
User Requirements
• Industry / Organization
– Maintaining a User Requirements Documentation
– URD Applicable for ALL projects / applications
– Top Level Meetings with the Client / User / CEO and
who has proposed the project or application
– Meetings include Managers / Project Managers /
Team Leads/ Business Analysts / Data Architects /
Other High Ranked Personnel like Designers / Analysts
(OR)
• OR - Any Other
Data Models
• A collection of tools for describing
– Data
– Data relationships
– Data semantics
– Data constraints
• Relational model
• Types of Keys
– Super Key
– Candidate Key
– Primary Key
– Foreign Key
Friday, August 20, 2021 An Introduction to DBMS 38
Constraints on Relationships
• Constraints on Relationship Types
– ( Also known as ratio constraints )
– Maximum Cardinality
• One-to-one (1:1)
• One-to-many (1:N) or Many-to-one (N:1)
• Many-to-many
– Minimum Cardinality (also called participation
constraint or existence dependency constraints)
• zero (optional participation, not existence-dependent)
• one or more (mandatory, existence-dependent)
Examples:
A department has exactly one manager and an employee can manage at most
one department.
– Specify (0,1) for participation of EMPLOYEE in MANAGES
– Specify (1,1) for participation of DEPARTMENT in MANAGES
An employee can work for exactly one department but a department can
have any number of employees.
– Specify (1,1) for participation of EMPLOYEE in WORKS_FOR
– Specify (0,n) for participation of DEPARTMENT in WORKS_FOR
(0,1) (1,1)
(1,1) (1,N)
since
name dname
ssn lot did budget
Works_In
since
Example:
Suppose that a DEPENDENT entity is identified by the dependent’s first
name and birhtdate, and the specific EMPLOYEE that the dependent is
related to. DEPENDENT is a weak entity type with EMPLOYEE as its
identifying entity type via the identifying relationship type
DEPENDENT_OF
Friday, August 20, 2021 An Introduction to DBMS 46
Weak Entity (Contd…)
• A weak entity can be identified uniquely only by
considering the primary key of another (owner) entity.
– Owner entity set and weak entity set must
participate in a one-to-many relationship set (one
owner, many weak entities).
– Weak entity set must have total participation in this
identifying relationship set.
name
cost pname age
ssn lot
• Issues:
– Storage access
– File organization
– Indexing and hashing
Friday, August 20, 2021 An Introduction to DBMS 68
Storage Manager - Components
• Authorization & Integrity Manager
– Tests for satisfaction of integrity constraints
– Checks the authority of users to access data
• Transaction Manager
– Ensures that the DB remains in consistent (correct) state despite system
failures & also concurrent transaction executions
• File Manager
– Manages the allocation of space on disk storage and data structures
used to represent the information on disk
• Buffer Manager
– Fetches data from disk to main memory and decides what data to cache
in main memory
– Critical component since it enables DB to handle large data sizes which
are much larger than main memory
Friday, August 20, 2021 An Introduction to DBMS 69
Query Processor - Components
• DDL Interpreter
– Interprets DDL statements and records definition in the Data
Dictionary
• DML Compiler
– Translates DML statements into an evaluation plan (low level
instructions) which is understood by Evaluation engine
– Query can be translated into many alternatives which give same
result but DML compiler performs Query Optimization to pick
lowest cost alternative
• Centralized
• Client-server
• Parallel (multiple processors and disks)
• Distributed
(web browser)
Old Modern
Friday, August 20, 2021 An Introduction to DBMS 77
QUERIES???