01 - intro
DESCRIPTION
DBMS INTRODUNCTIONTRANSCRIPT
-
Database Management Systems (DBMS)
Dr. Subrat K Dash
LNMIIT
-
Course Information
Database Management Systems (DBMS) Credit: 3
4 slots per week TUE (12-1pm), WED (11-12noon), THU (10-11am), FRI
(8-9am)
DBMS Lab Credit: 2
1 lab (3 hours duration) per week
Dr. Subrat K Dash
-
Course content: DBMS
Introduction
Data Models, E-R Model, Relational Data Model, Relational Algebra, SQL
Relational Database Design
Transaction Management
Data Storage and Indexes
Query Processing
Advanced Topics
Dr. Subrat K Dash
-
Books
Ramez Elmasri and Shamkant B Navathe, Fundamentals of Database Systems, Addison Wesley.
Raghu Ramakrishnan and Johannes Gehrke, Database Management Systems, McGraw Hill.
A Silberschatz, H F Korth and S Sudarshan, Database System Concepts, McGraw Hill.
H Garcia-Molina, J D Ullman, and Jennifer Widom, Database Systems-The Complete Book, Pearson Education.
Dr. Subrat K Dash
-
Grading
Regular assessment 30%
Midterm 25%
Endterm 45%
Any change to this will be communicated well in advance.
Dr. Subrat K Dash
-
INTRODUCTION
Dr. Subrat K Dash
-
Database
Dr. Subrat K Dash
-
Journey to Database!
Evolution of Data Systems
Manual, Sequential, Databases
Technology Explosion
Data Storage Devices
Computer Applications
DP, MIS, DSS, DW&DM
Demand for Information
Inadequacy of earlier Data Systems
Dr. Subrat K Dash
-
Database
A database is a collection of related data. Data: Facts that can be recorded and have implicit meaning
Properties Represents some aspects of the real world Logically coherent collection of data with some inherent
meaning Designed, built and populated with data for a specific purpose
A database is an ordered collection of related data
elements intended to meet the information needs of an organization and designed to be shared by multiple users.
Dr. Subrat K Dash
userHighlight
userHighlight
-
Database Management System (DBMS)
DBMS A collection of programs that enables to create and maintain a database.
DBMS is a general-purpose software system that facilitates the processes of defining, constructing, manipulating, and sharing databases among various users and applications.
Dr. Subrat K Dash
userHighlight
-
A simplified database system
Dr. Subrat K Dash
-
An example
University Database
Data about students, faculty members, courses, laboratories etc.
Reflects the state of affairs of the academic aspects of the university.
Purpose: To keep an accurate track of the academic activities of the university.
Dr. Subrat K Dash
-
File System based storage
Files of records Used for data storage Data redundancy Wastage of space
Maintaining consistency becomes difficult
Record Structure Hard coded into the programs Structure modifications hard to perform
Query of varying nature
Managing concurrent access and failure recovery are difficult
Dr. Subrat K Dash
-
DBMS Approach
Separation of Data and Metadata
Flexibility of changing metadata
Program-data independence
Data access language SQL
Properties
Controlling Redundancy
Dr. Subrat K Dash
userSticky NoteMetadata is data that describes other data. Meta is a prefix that in most information technology usages means "an underlying definition or description."
-
DBMS Properties
Control Redundancy Reduces duplication and thus wastage of space is avoided Checks inconsistencies
Authorized access Control retrieval and update
Persistent storage For program objects and data structures
Storage structure for efficient query processing Backup and recovery
Recovery from hardware and software failures
Enforcing integrity constraint
Dr. Subrat K Dash
userHighlight
-
Three aspects of studying DBMS
Modeling and design of databases
Explore issues before implementation
Programming: Queries and DB operations
SQL (Structured Query Language)
DBMS implementation
Transaction management, Storage, Indexes etc.
Dr. Subrat K Dash
-
Data Models
Data Model: A set of concepts to describe the structure of a database at a certain level of abstraction.
Helps in communication and application development
Data Model Operations: Operations for specifying database retrievals and updates by referring to the concepts of the data model. Operations on the data model may include basic operations and user-defined operations.
Dr. Subrat K Dash
userHighlight
-
Categories of data models
Conceptual (high-level, semantic) Provide concepts that are close to the way many users
perceive data. Useful for requirements understanding. Uses entities, attributes, relationships.
Implementation (representational, record-based) Describe the logical representation of the data
without giving details of physical representation.
Physical (low-level, internal) Provide concepts that describe details of how data is
stored in the computer, like record-format, record ordering, access paths, file structure.
Dr. Subrat K Dash
-
E-R (Entity-Relationship) Model
A conceptual level data model. Provides the concepts of entities, relationships and
attributes. Example: University Database
Entities: student, faculty member, course, departments etc.
Relationships: enrollment relationship between student & course, employment relationship between faculty member, department etc.
Attributes: name, rollNumber, address etc., of student entity; name, empNumber, phoneNumber etc., of faculty entity etc.
Subrat K Dash, LNMIIT
-
Types of Data Model
Relational Data model Based on relation (table) a set of records
Hierarchical Data Model Records, Parent-child relationship (1:N) Tree like structure
Network Data Model Records, Sets A record can have more than one parent records.
Dr. Subrat K Dash
-
Schemas versus Instances
Database Schema: The description of a database in a formal language. Includes descriptions of the database structure and the constraints that should hold on the database.
Schema Diagram: A diagrammatic display of (some aspects of) a database schema.
Schema Construct: A component of the schema or an object within the schema, e.g., STUDENT, COURSE.
Database Instance: The actual data stored in a database at a particular moment in time. Also called database state (or occurrence).
Dr. Subrat K Dash
userHighlight
-
Database Schema Vs. Database State
Database State: Refers to the content of a database at a moment in time.
Initial Database State: Refers to the database when it is loaded
Valid State: A state that satisfies the structure and constraints of the database.
Distinction The database schema changes very infrequently. The
database state changes every time the database is updated.
Schema is also called intension, whereas state is called extension.
Dr. Subrat K Dash
-
Three-Schema Architecture (Abstraction levels in a DBMS)
Dr. Subrat K Dash
V1 V2 Vm
R1 R2 Rn
F1 F2 Fp
VL LL Mapping
LL PL Mapping
View Level (VL) Schema
Logical Level (LL) Schema
Physical Level (VL) Schema
Set of views
Set of relations
Data: Set of files/ index files
LDI
PDI
-
Three-Schema Architecture
View Level Schema Each view describes an aspect of the database
relevant to a particular group of users. Example: Library Database
Books Purchase Section Issue/Returns Management Section Users Management Section
Each section views/uses a portion of the entire data. Views can be set up for each section of users.
Dr. Subrat K Dash
-
Three-Schema Architecture
Logical Level Schema
Describes the logical structure of the entire database.
No physical level details are given.
Physical Level Schema
Describes the physical structure of data in terms of record formats, file structures, indexes etc.
Dr. Subrat K Dash
-
Database schema based on relational data model
External (View level) Schema
Conceptual (Logical) Schema
Physical Schema
Database Schema: The description of a database in a formal language. Includes descriptions of the database structure and the constraints that should hold on the database.
Dr. Subrat K Dash
-
Database schema based on relational data model
Conceptual (Logical) Schema
Describes all relations in the database
Dr. Subrat K Dash
-
Database schema based on relational data model
Physical Schema
Describes additional storage details (secondary storage devices)
Which file organization and auxiliary data structure (indexes)
Examples: Store all relations as unsorted files of records
Create indexes on first column of Students, Faculty, Courses
Dr. Subrat K Dash
-
Database schema based on relational data model
External (View) Schema
Allows customized data access for different group of users
A database can have more than one external schema, but only one conceptual and physical schema
Views are not stored explicitly
Dr. Subrat K Dash
userHighlight
-
Data Independence
Physical Data Independence (PDI) The ability to modify physical level schema without
affecting the logical or view level schema.
Performance tuning modification at physical level creating a new index etc.
Logical Data Independence (LDI) The ability to change the logical level schema without
affecting the view level schemas or application programs Adding a new attribute to some relation
Deleting an attribute
Dr. Subrat K Dash
-
Data Independence
Only the mappings need to be changed
Dr. Subrat K Dash
V1 V2 Vm
R1 R2 Rn
VL LL Mapping
-
Development Process of a Database System (1/2)
Step 1. Requirements collection Data model requirements
various pieces of data to be stored and the interrelationships.
presented using a conceptual data model such as E/R model.
Functional requirements various operations that need to be performed as part
of running the enterprise. acquiring a new book, enrolling a new user, issuing a book to
the user, recording the return of a book etc.
Dr. Subrat K Dash
-
Development Process of a Database System (2/2)
Step 2. Convert the data model into a representational level model typically relational data model.
choose an RDBMS system and create the database.
Step 3. Convert the functional requirements into application programs programs in a high-level language that use
embedded SQL to interact with the database and carry out the required tasks.
Dr. Subrat K Dash