Database Management
System(DBMS)
Lecture 0
Shikha Gautam
Asst. professor,
CSE
|| Shri Hari ||
“Data is the Future”
SHIKHA GAUTAM
Increasingly many companies see
themselves as data driven.
SHIKHA GAUTAM
The world is increasingly
driven by data…
This class teaches the basics of
how to use & manage data.
SHIKHA GAUTAM
More Data
• Storing all data – including machine generated and sol, Social,
community, demographic data in original format – for ever
To More Effect
• Smarter use of data to achieve competitive or human benefit
More Data
• Storing all data – including machine generated and sol, Social,
community, demographic data in original format – for ever
To More Effect
• Smarter use of data (data science) to achieve competitive or human
benefit
What you will learn in this Lecture
1. Motivation for studying DBMS
2. Overview of Subject
3. Administrative structure
4. Course logistics
SHIKHA GAUTAM
Why should you study databases?
• Make more $$$:
• Startups need DB talent right away = low employee #
• Massive industry…
• Intellectual:
• Science: data poor to data rich
• No idea how to handle the data!
• Fundamental ideas to/from all of CS:
• Systems, theory, AI, logic, stats, analysis….
Many great computer systems ideas started in DB.
SHIKHA GAUTAM
Oracle Internships and Careers
Summer Internship Program
http://www.oracle.com/us/corporate/careers/college/internships/064881.html
Oracle’s College Recruiting Site
http://www.oracle.com/us/corporate/careers/college/index.html
Oracle Careers
http://www.oracle.com/us/corporate/careers/index.html
Why DBMS?
• Used in almost all modern settings involving data management:
• Business
• Research
• Administration
SHIKHA GAUTAM
Database Systems: Today
SHIKHA GAUTAM
Other databases you may use
SHIKHA GAUTAM
What this course is
• Discuss fundamentals of data management
• How to design databases, query databases, build applications with them.
• How to debug them when they go wrong!
• How to tune Oracle 11g.
• We’ll cover how database management systems work
SHIKHA GAUTAM
Lectures
• Lecture slides cover essential material
• This is your best reference.
• Try to cover same thing in many ways: Lecture, lecture notes,
homework, exams
• Attendance makes your life easier…
• All lectures are mandatory!
SHIKHA GAUTAM
Acknowledgements
• NPTEL
• Course
• Internet
SHIKHA GAUTAM
Course details and Text Books
• Text Book:-
1. DATABASE SYSTEM CONCEPTS
by Korth
1. Fundamentals of Database Systems
by Navathe
SHIKHA GAUTAM
What is a DBMS?
• A large, integrated collection of data
• Models a real-world enterprise
• Entities (e.g., Students, Courses)
• Relationships (e.g., Alice is enrolled in 145)
A Database Management System (DBMS) is a
piece of software designed to store and
manage databases
SHIKHA GAUTAM
SHIKHA GAUTAM
Simplified database system environment
A Motivating, Running Example
• Consider building a course management system (CMS):
• Students
• Courses
• Professors
• Who takes what
• Who teaches what
Entities
Relationships
SHIKHA GAUTAM
24
Course Objectives
• Upon completion of this course, the student should be able to:
• Understand different DBMS
• Create their own Tables
• Manipulate data stored in it
• Construct ER Diagram
• Conversion of ER diagram to Table
• Able to normalize the table
• Describe the definitions and properties of Transactions and concurrency
control
• Will able to analyze multiple granularity and recovery
SHIKHA GAUTAM
Syllabus
• Introduction to DBMS
• E-R model concepts
• Reduction of E-R diagrams to tables
• Integrity Constraints
• Relational Algebra and Calculus
• SQL
• Functional Dependencies and Normal Forms
• Transaction System and Serializability
• Deadlock Handling
• Concurrency Control and Recovery
• Case Study
SHIKHA GAUTAM
Overview of DBMS as Subject
SHIKHA GAUTAM
Introduction to DBMS Unit1
• Data,Database,characteristics etc.
• Data model, Data Independence
• Three Schema Architecture
SHIKHA GAUTAM
Unit1
SHIKHA GAUTAM
PSIT COE
Unit1
SHIKHA GAUTAM
Contd.
Overall Structure of DBMS
Unit1
SHIKHA GAUTAM
Relational Data model Concepts Unit 2
• E-R Notations & Diagram
• Eg:
• Mapping Cardinality
PSIT-COESHIKHA GAUTAM
Contd. Unit 2
SQL(Structured Query Language)
SHIKHA GAUTAM
Normalization Unit 3
• Need of Normalization
• Normal Forms
SHIKHA GAUTAM
Transaction Control System Unit 4
• State Transition Diagram
• Acid Properties
Transactions
• A key concept is the transaction (TXN): an atomic
sequence of db actions (reads/writes)
Atomicity: An action
either completes
entirely or not at all
36
Acct Balance
a10 20,000
a20 15,000
Acct Balance
a10 17,000
a20 18,000
Transfer $3k from a10 to a20:
1. Debit $3k from a10
2. Credit $3k to a20
• Crash before 1,
• After 1 but before 2,
• After 2.
Written naively, in
which states is
atomicity preserved?
DB Always
preserves
atomicity!
Unit 4
SHIKHA GAUTAM
Concurrency Control & Locking Unit 5
• Concurrency Control
• Locking Techniques
PSIT-COE
A Well-Designed DBMS makes many people
happy!
• End users and DBMS vendors
• Reduces cost and makes money
• DB application programmers
• Can handle more users, faster, for cheaper, and with better
reliability / security guarantees!
• Database administrators (DBA)
• Easier time of designing logical/physical schema, handling
security/authorization, tuning, crash recovery, and more…
Must still understand
DB internals
SHIKHA GAUTAM
What is expected from you
• Attend lectures
• If you don’t, it’s at your own peril
• Be active and think critically
• Do programming and homework projects
• Start early and be honest
• Study for tests and exams
SHIKHA GAUTAM
Summary of DBMS
• DBMS are used to maintain, query, and manage large datasets.
• Provide concurrency, recovery from crashes, quick application development,
integrity, and security
• Key abstractions give data independence
• DBMS R&D is one of the broadest, most exciting fields in CS. Fact!
SHIKHA GAUTAM
SHIKHA GAUTAM

DBMS

  • 1.
    Database Management System(DBMS) Lecture 0 ShikhaGautam Asst. professor, CSE || Shri Hari ||
  • 2.
    “Data is theFuture” SHIKHA GAUTAM
  • 4.
    Increasingly many companiessee themselves as data driven. SHIKHA GAUTAM
  • 5.
    The world isincreasingly driven by data… This class teaches the basics of how to use & manage data. SHIKHA GAUTAM
  • 6.
    More Data • Storingall data – including machine generated and sol, Social, community, demographic data in original format – for ever To More Effect • Smarter use of data to achieve competitive or human benefit
  • 7.
    More Data • Storingall data – including machine generated and sol, Social, community, demographic data in original format – for ever To More Effect • Smarter use of data (data science) to achieve competitive or human benefit
  • 8.
    What you willlearn in this Lecture 1. Motivation for studying DBMS 2. Overview of Subject 3. Administrative structure 4. Course logistics SHIKHA GAUTAM
  • 9.
    Why should youstudy databases? • Make more $$$: • Startups need DB talent right away = low employee # • Massive industry… • Intellectual: • Science: data poor to data rich • No idea how to handle the data! • Fundamental ideas to/from all of CS: • Systems, theory, AI, logic, stats, analysis…. Many great computer systems ideas started in DB. SHIKHA GAUTAM
  • 11.
    Oracle Internships andCareers Summer Internship Program http://www.oracle.com/us/corporate/careers/college/internships/064881.html Oracle’s College Recruiting Site http://www.oracle.com/us/corporate/careers/college/index.html Oracle Careers http://www.oracle.com/us/corporate/careers/index.html
  • 12.
    Why DBMS? • Usedin almost all modern settings involving data management: • Business • Research • Administration SHIKHA GAUTAM
  • 13.
  • 14.
    Other databases youmay use SHIKHA GAUTAM
  • 16.
    What this courseis • Discuss fundamentals of data management • How to design databases, query databases, build applications with them. • How to debug them when they go wrong! • How to tune Oracle 11g. • We’ll cover how database management systems work SHIKHA GAUTAM
  • 17.
    Lectures • Lecture slidescover essential material • This is your best reference. • Try to cover same thing in many ways: Lecture, lecture notes, homework, exams • Attendance makes your life easier… • All lectures are mandatory! SHIKHA GAUTAM
  • 18.
  • 19.
    Course details andText Books • Text Book:- 1. DATABASE SYSTEM CONCEPTS by Korth 1. Fundamentals of Database Systems by Navathe SHIKHA GAUTAM
  • 20.
    What is aDBMS? • A large, integrated collection of data • Models a real-world enterprise • Entities (e.g., Students, Courses) • Relationships (e.g., Alice is enrolled in 145) A Database Management System (DBMS) is a piece of software designed to store and manage databases SHIKHA GAUTAM
  • 21.
  • 22.
  • 23.
    A Motivating, RunningExample • Consider building a course management system (CMS): • Students • Courses • Professors • Who takes what • Who teaches what Entities Relationships SHIKHA GAUTAM
  • 24.
  • 25.
    Course Objectives • Uponcompletion of this course, the student should be able to: • Understand different DBMS • Create their own Tables • Manipulate data stored in it • Construct ER Diagram • Conversion of ER diagram to Table • Able to normalize the table • Describe the definitions and properties of Transactions and concurrency control • Will able to analyze multiple granularity and recovery SHIKHA GAUTAM
  • 26.
    Syllabus • Introduction toDBMS • E-R model concepts • Reduction of E-R diagrams to tables • Integrity Constraints • Relational Algebra and Calculus • SQL • Functional Dependencies and Normal Forms • Transaction System and Serializability • Deadlock Handling • Concurrency Control and Recovery • Case Study SHIKHA GAUTAM
  • 27.
    Overview of DBMSas Subject SHIKHA GAUTAM
  • 28.
    Introduction to DBMSUnit1 • Data,Database,characteristics etc. • Data model, Data Independence • Three Schema Architecture SHIKHA GAUTAM
  • 29.
  • 30.
  • 31.
    Contd. Overall Structure ofDBMS Unit1 SHIKHA GAUTAM
  • 32.
    Relational Data modelConcepts Unit 2 • E-R Notations & Diagram • Eg: • Mapping Cardinality PSIT-COESHIKHA GAUTAM
  • 33.
    Contd. Unit 2 SQL(StructuredQuery Language) SHIKHA GAUTAM
  • 34.
    Normalization Unit 3 •Need of Normalization • Normal Forms SHIKHA GAUTAM
  • 35.
    Transaction Control SystemUnit 4 • State Transition Diagram • Acid Properties
  • 36.
    Transactions • A keyconcept is the transaction (TXN): an atomic sequence of db actions (reads/writes) Atomicity: An action either completes entirely or not at all 36 Acct Balance a10 20,000 a20 15,000 Acct Balance a10 17,000 a20 18,000 Transfer $3k from a10 to a20: 1. Debit $3k from a10 2. Credit $3k to a20 • Crash before 1, • After 1 but before 2, • After 2. Written naively, in which states is atomicity preserved? DB Always preserves atomicity! Unit 4 SHIKHA GAUTAM
  • 37.
    Concurrency Control &Locking Unit 5 • Concurrency Control • Locking Techniques PSIT-COE
  • 38.
    A Well-Designed DBMSmakes many people happy! • End users and DBMS vendors • Reduces cost and makes money • DB application programmers • Can handle more users, faster, for cheaper, and with better reliability / security guarantees! • Database administrators (DBA) • Easier time of designing logical/physical schema, handling security/authorization, tuning, crash recovery, and more… Must still understand DB internals SHIKHA GAUTAM
  • 39.
    What is expectedfrom you • Attend lectures • If you don’t, it’s at your own peril • Be active and think critically • Do programming and homework projects • Start early and be honest • Study for tests and exams SHIKHA GAUTAM
  • 40.
    Summary of DBMS •DBMS are used to maintain, query, and manage large datasets. • Provide concurrency, recovery from crashes, quick application development, integrity, and security • Key abstractions give data independence • DBMS R&D is one of the broadest, most exciting fields in CS. Fact! SHIKHA GAUTAM
  • 41.