Unit I: Introduction
Dr. Anushree Tripathi
Department of Computer Science and Engineering
National Institute of Technology Patna (NITP)
5th September, 2024
Overview
• Examples of database
• Data Models
• Two tier architecture/ Client server architecture
• Database languages
• Transaction management
• Storage management
• Advantages of DBMS
• Limitations of DBMS
Example of UNIVERSITY Database
Reference: Fundamental of Database Systems. R. Elmasri, S.B. Navathe, Pearson Education, Seventh edition
Data Models
Big data system
Object data model (Document-based,
Relational data model graph-based, column-
Object-relational DBMSs
based and key-value data
models)
Network data model Hierarchical data model
CODASYL DBTG DML: DL/1
Relational data model
• Represents database as collection of tables
• Uses tables for data representation and in-between
relationships
• Data designing in form of rows and columns within a
table
• Uses high level query language SQL
• Example as shown in UNIVERSITY database
Object data model
Object
Object Operations relational
Objects with Predefined Extended
same structure procedures relational
and behaviour called methods systems
belong to a class
Classes organized into hierarchies
• Extension of E-R model including concepts of object and
methods
• Uses methodologies of Unified Modeling Language (UML)
involves class diagrams
• Alternative notion of ER diagram, entity corresponds to object,
entity type corresponds to classes and operations applied to
individual objects
Big data systems/ key-value storage
systems/ NOSQL systems
Models Document-based:
Based on JSON (Java Script Object Notation)
Stores data as documents (represents objects)
MangoDB data model
Graph-based:
Collection of vertices (nodes) and edges
Stores objects as graph nodes and
relationships among objects as directed graph
edges
Neo4j, open source system, implemented in
Java
Big data systems/ key-value storage systems/
NOSQL systems
Models Column-based/ Wide column:
Partition a table by column into column families
(vertical partitioning)
Used in many Google applications such as Gmail
BigTable: Google distributed storage system for big data
Hbase data model: Collection of key-value pairs
Key-value data model:
Stores data in distributed storage system
Associates a unique key with each value
High performance due to fast access to a value
given its key
Network data model
• Represents data as record type (rectangles) and 1:N relationship, called
set type (directed arrows)
• CODASYL DBTG (Conference on Data Systems Languages Database Task
Group)
• Example
Reference: Fundamental of Database Systems. R. Elmasri, S.B. Navathe, Pearson Education, Sixth Edition
Hierarchical data model
• Hierarchical tree structures
• Each hierarchy represents a number of related
records
• DML: DL/1
Two tier architecture/ Client server
architecture
• Open Database Connectivity (ODBC) provides application programming inter-
-face (API), allows client-side programs to call DBMS
• Easy to maintain
• Drawback: Security
Reference: Fundamental of Database Systems. R. Elmasri, S.B. Navathe, Pearson Education, Sixth Edition
Three tier architecture/ Client server
architecture
Reference: Fundamental of Database Systems. R. Elmasri, S.B. Navathe, Pearson Education, Sixth Edition
DBMS Languages
Data Definition
Language
DDL
Data Control Transaction
Language Database Control
Language
DCL
Languages TCL
Data
Manipulation
Language (DML)
DBMS Languages (contd.)
Storage Definition
Language (SDL)
Data Definition
Language
(DDL)
View definition
Language (VDL)
DBMS Languages
High
level/Nonprocedural
Data Manipulation Language DML
Language
(DML) Low-level/
Procedural
Language DML
DBMS Languages (contd.)
Grant
Data Control
Language
DCL
Revoke
DBMS Languages
Commit
Transaction
Control Language
TCL
Rollback
Database Languages (contd.)
DBMS Data Definition language (DDL): Specify
Languages conceptual schema
Storage Definition Language (SDL): Specify
internal schema, early versions of SQL
View definition language (VDL): Specify user
views and their mappings to conceptual schema
Data Manipulation Language (DML):
Manipulates the database
Database Languages
Data definition language (DDL)
• Data definition language (DDL):
➢No strict separation of levels
➢Used by DBA and database designers to define both schemas
➢ In DBMS, where a clear separation is maintained, DDL specify the
conceptual schema only
➢In most DBMSs, DDL is used to define the conceptual and external
schemas
• DDL Commands:
➢CREATE
➢ALTER
➢DROP
➢TRUNCATE
➢Other commands (COMMENT, RENAME)
Database Languages (contd.)
Data Manipulation Language (DML)
• DBMS provides a set of operations or language called data manipulation
language (DML)
• Manipulation includes: retrieval, insertion, deletion and modification of
data.
• Two main types of DML:
➢ High level /Nonprocedural DML: Specify complex database operations
concisely, set at a time or set-oriented DMLs. Specify which data to
retrieve rather than how to retrieve, also called as declarative. Example :
SQL set at-a-time or set-oriented DMLs
➢ Low level/Procedural DML: Retrieves individual records or objects from
the database and processes each separately. Embedded in general-
purpose programming language. Also called as record-at-a-time DMLs
because it needs programming language constructs, looping, to retrieve
and process each record from a set of records
Database Languages (contd.)
Data Manipulation Language (DML)
• DML Commands
➢SELECT
➢INSERT
➢UPDATE
➢DELETE
DBMS Languages (contd.)
Data Control Language (DCL)
• Retrieves the stored data
• DCL commands
➢GRANT: Give user access privileges to a database
➢REVOKE: Withdraw user access privileges
DBMS Languages (contd.)
Transaction Control Language (TCL)
• TCL Commands:
➢COMMIT: Saves the transaction
➢ROLLBACK: Restores the database to original
➢SET TRANSACTION: Specify the characteristics for the
transaction
Transaction management
• Transaction: Executing program or process that includes one
or more databases accesses such as reading or updating
database records.
• Main task is to provide database consistency despite of system
failures
• Concurrency control manager
• ACID Properties
• States related to transaction: Commit and rollback
Storage management
• Provides interfaces between low level data stored in
database and application programs submitted to system
• Interacts with file manager
• Efficient storing , retrieving and updating of data
Advantages of DBMS
Controlling Enforcing integrity
redundancy constraints
Restricting
Providing multiple
unauthorized
user interfaces
access
Representing
complex Providing backup
relationships and recovery
among data
Limitations of DBMS
High initial investment in hardware,
software and training
Overhead for providing
security, concurrency control
and recovery
Overhead for data
processing
Overhead costs