WINSEM2023-24 BCSE302L TH CH2023240502444 Reference Material I 08-01-2024 MODULE 1
WINSEM2023-24 BCSE302L TH CH2023240502444 Reference Material I 08-01-2024 MODULE 1
SYSTEMS
By
G.Sukanya (Asst. Prof)
SCOPE
Course Objectives
• To understand the concepts of File system and structure of
the database; Designing an Entity-Relationship model for a
real-life application and Mapping a database schema from
the ER model.
• To differentiate various normal forms, evaluate relational
schemas for design qualities and optimize a query.
• To impart the working methodologies of transaction
management, understand concurrency control, recovery,
indexing, access methods and fundamental view on
unstructured data and its management
MODULE 1
Database Systems
Concepts and Architecture
Outline
• Introduction to Database systems-Terminolgies
• Need for Database systems
• Characteristics of DB approach
• Actors on the scene
• Workers behind the scene(DBA)
• Advantages of using DBMS approach
Introduction to Database systems
Terminologies
• Data
• Information
• Database
• DBMS
Data
• Raw facts that are unorganized and can be
recorded-texts, numbers, videos, speech,images
etc.,
• Real Time Examples of DBMS:Flipkart,Ola,uber
• More data=More wealth
• Recommendation of items in amazon shopping
website
What is a database?
• Collection of related data (to solve some
problems/queries)
• Represents real world entities/objects
• Addition/deletion of record should be reflected
in a database
Information
• Meaningful/Processed data from the whole lot
Data or Database?
• Newspaper
• University website
Criterion for a database
• Database should represent real world or so called mini
world so that changes in the real world should be
reflected in the database.
• Database should be a collection of logical and coherent
data and not some random data
• Db should be created with 3 things in mind
–A specific purpose
–An intended group of usera
–A preconceived application that theses intended users
have in mind.
Example 1
Example 2
DBMS
• It’s a collection of programs that enables users to
create and maintain a database.
Drawbacks of File system
Drawbacks of File System cont..
– Atomicity of updates
• Failures may leave database in an inconsistent state with
partial updates carried out
• E.g. transfer of funds from one account to another should
either complete or not happen at all
– Concurrent access by multiple users
• Concurrent accessed needed for performance
• Uncontrolled concurrent accesses can lead to inconsistencies
– E.g. two people reading a balance and updating it at the same time
– Security problems
Limitations of File Management System
with Example
• Customer name with Phone numbers
• For 10 persons its easy to enter,search,update etc,but
for 1000 persons or more?
• File Access problem-Client Server Architecture-Solved
using DBMS
• Redundancy Problem -Eg: Many different views of
same file. Leads to storage problem
• Inconsistency: If redundancy persists,a particular
record may not be updated properly in all those files
Why it is better to use DBMS
• User interacts directly with DB
<Note>
<From> Academia</From>
<To>All Students</To>
<Subject>Thank You</Subject>
<Body>GoodLuck</Body>
</Note>
User defined tags….
Other Data Models
History of data Models
• Hierarchical System was the first generation of DBMS.
The first generation also came with the CODASYL
system. Both of them introduced in 1960s.
• The second generation includes the Relational Model.
Dr. E.F.Codd introduced it in 1970.
• The third generation includes Object-Relational DBMS
and Object-Oriented DBMS.
• File based systems
File based systems came in 1960s and was widely used. It stores
information and organize it into storage devices like a hard disk, a
CD-ROM, USB, SSD, floppy disk, etc.
• Relational Model
Relational Model introduced by E.F.Codd in 1969. The model stated
that data will be represented in tuples.
• Dbase
Database like Dbase went on sale in 1980s. It was one of the first
database management systems for microcomputers. Cecil Wayne
Ratliff developed it.
• Centralized DBMS and Data Warehousing
In 1990s, centralized DBMS server was used. The period also
witnessed the introduction of MS-Access.
• NoSQL
NoSQL, Big Data came in 2008.
• Hadoop
Hadoop and MongoDB launched in 2009. Hadoop use
distributed file system for storing big data, and MapReduce to
process it. Hadoop excels in storing and processing of huge data
of various formats such as arbitrary, semi-, unstructured, etc
• Hbase
It introduced in 2010 and is a database built on top of the
HDFS. HBase provides fast lookups for larger tables.
Schema Versus Instances
Example of a Database schema
Database Instance
Database Schema Versus Database state
Example of a Database State
Three Schema Architecture
• Not explicitly used in commercial DBMS products,but
used in explaining database system organization
• Proposed to support DBMS characteristics of
– Program data independence
– Support of multiple views of the data
Three schema architecture
Three Schema Architecture
Three Schema Architecture
Data Independence
Example: Changing the bricks into wood for constructing a house withuot changing the
DBMS Languages
DBMS Languages
DML
Types of DML
DBMS Classification Systems
DBMS
DBMS is a collection of programs used for
managing data and simultaneously it supports
different types of users to
Create
Manage
Retrieve
Update
Store information
DBMS Classification Criteria
• Based on Data Model
• Relational Model
• Hierarchical Model
• Object Oriented Database Model
• Network Model
• Based on user numbers
• Single User
• Multi User
• Based on Database distribution
• Centralized Database
• Distributed Database
• Based on Purpose/usage
• General purpose
• Specific purpose
Based on data Model
Relational Model
In the above student table Std ID, Name and city are
called as attributes and their values.
Std ID is a primary key attribute which uniquely
identifies each record in the student table.
Hierarchical Model
• Data elements have a one to many relationship
(1: N). Here data is organized like a tree which is
similar to a folder structure in your computer
system.
• The hierarchy starts from the root node,
connecting all the child nodes to the parent node.
• Used in industry on mainframe platforms.
• For example− IMS(IBM), Windows registry
(Microsoft).
EXAMPLE
Object Oriented Database Model
• System where information or data is represented in the
form of objects which is used in object-oriented
programming.
• Combination of relational database concepts and
object-oriented principles.
• Relational database concepts are concurrency control,
transactions, etc.
• OOPs principles are data encapsulation, inheritance,
and polymorphism.
• It requires less code and is easy to maintain.
• For example − Object DB software.
Network database Model
• Data elements maintain one to one
relationship (1: 1) or many to many
relationship (N: N).
• It also has a hierarchical structure, but the
data is organized like a graph and it is allowed
to have more than one parent for one child
record.
EXAMPLE
• Software means the whole thing right from the operating system
(OS) to the application programs that include database
management software like M.S. Access or SQL Server.
The Database System Environment
DB Components
Centralized Architecture
Two Tier Architecture
Three Tier Architecture
Overall architecture of DBMS
DBMS COMPONENT MODULES
DBMS System Utilities
DBMS System Utilities cont..
Other Tools
DBMS architecture
• A Database store a lot of critical information to access
data quickly and securely. Hence it is important to
select a correct Architecture for efficient data
management.
• DBMS architecture depends upon how users are
connected to the database to get their request done.
• Database management systems are divided into
multiple levels of abstraction for proper functioning.
Types of DBMS Architecture
• Centralized Architecture
• Client/Server Architectures
Centralized Architecture
• one in which all data is stored on a single server, and all
clients connect to that server in order to access and
manipulate the data.
• In older systems, most users accessed the DBMS via
computer terminals that did not have processing power
and only provided display capabilities.
Centralized Architecture
Basic Client Server Architecture
Client Server Architectures
Terms-Client,Server
• A client in this framework is typically a user machine that
provides user interface capabilities and local processing.
When a client requires access to additional functionality—
such as database access—that does not exist at the client,
it connects to a server that provides the needed
functionality.
• A server is a system containing both hardware and
software that can provide services to the client machines,
such as file access, printing, archiving, or database access.
• In general, some machines install only client software,
others only server software, and still others may include
both client and server software.
Highlights of 1-Tier Architecture
• Simplest DBMS architecture.
• All the components of DBMS, i.e., the server, database,
and client, reside on a single system.
• The user can directly access the database.
• Used when data isn't changing frequently.
• Suitable for programmers, database designers, and
single-user access.
Two-Tier Client Server Architecture
Two-Tier Client Server Architecture
Highlights of 2-Tier Architecture
• Multiple users can use it at the same time. Hence, it
can be used in an organization.
• It has high processing ability as the database
functionality is handled by the server alone.
• Faster access to the database due to the direct
connection and improved performance.
• Because of the two independent layers, it's easier to
maintain
Disadvantages of 2-Tier
• Scalability - As the number of clients increases, the
load on the server increases. Thereby declining the
performance of the DBMS and, in turn, the client-side
application.