0% found this document useful (0 votes)
216 views10 pages

Introduction to Database Management Systems

DBMS content

Uploaded by

garv67740
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
216 views10 pages

Introduction to Database Management Systems

DBMS content

Uploaded by

garv67740
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Chapter 6

Introduction to Database
Management Systems
repository for data. The
modern application, serving as a structured
A database is a crucial component of any maintain information in an organized, efficient, and
manage and
primary objcctive of a database system is to distinguíshes them from
fundamental concepts of databases,
reliable manner. This chapter introduces thecharacteristics and advantages of using a Database Managernent
traditional file systems, and explores the core relational model, it is
most prevalent type of database, the
System (DBMS). While we will focus on the journey
The history of database systems is a fascinating
important to understand that other models exist. effectively.
ever-increasing volumes of data more
of innovation, driven by the need to handle

6.1 What is a Database?


collection of logically related data, designed
to meet the information
A database can be defined as a sharedstructured in such a way that it can be stored, retrieved, and managed
needs of an organization. The data is
database are:
efficiently. The key components of a ID
anything fromn a student's nane and
figures that are stored. This can be
" Data: The raw facts and organized into a logical structure,
Data in a database is typically
to a product's price and description.
making it meaningful and useful.
structure of the data, including table
the database. It describes the
" Schema: The logical design of constraints. For example, a schema
for a university database
data types, and
names, column names, Name (a string), and
table with columns like StudentID (an integer),
might define a STUDENT
StudentID is the primary key. The
schema acts as a blueprint for
Major (a string), and specify that they relate to each other.
information that can be stored and how
the database, defining the types of
moment in time. This is the content
data stored in the database at a particular
" Instance: The actual STUDENT table, an instance would
defined by the schema. For the
that populates the structure (102, 'Bob', 'Physics' ):. The
(101, 'Alice', 'Computer Science')' and the schema remains relatively
be a collection of rows, such as added, updated, or deleted, while
instance changes frequently as data is
static.

Systems
6.1.1 A Brief History of Database to complex, highly
database systems is a story of moving from simple, unstructured storage
The evolution of
structured, and scalable systems,
days of computing, data was stored
Systems (1950s - 1960s): In the early its own programs to manage them.
" Early File Pro cessingapplication had its own set of data files and
in simple flat files, Each inconsistency, and difficulty in managing data
access.
This led to nassive data redundancy,

23
Course: Database Management Systemns Total Lectures: 45-50

" The Hierarchical and Network Models (19608 - 1970s): To address the limitations of file sys
tems, the first generation of DBMSS was developed, The hierarchical model, pioneered by TBM's
Information Management System (IMS), organized data in a tree-like structure. The network model,
developed by the Coference on Data Systems Languages (CODASYL), was a more flexible exten
sion that allowed a child record to have multiple parent records. These models provided better data
management but were complex to implement and maintain.
" The Relational Model (1970s): The modern era of database systems began with the publication
of the seminal paper "A Relational Model of Data for Large Shared Data Banks" by Edgar F. Codd
while he was at IBM. Codd's model introduced a simple, yet powerful, concept: organizing data into
two-dimensional tables. This model was based on a sound mathematical theory of relations and was a
major leap forward in data independence and query flexibility.
Acrucial igure in clariflying and formalizing Codd's work was C. J. Date. An influential author
and researcher, Date's books, particularly "An Introduction to Database Systems," became standard
texts for generations of database professionals. He played a key role in explaining the theoretical
underpinnings of the relational model and its practical application. In his later work, he, along with
Hugh Darwen, also proposed "The Third Manifesto," which aimed to correct perceived deviations from
Codd's original vision.
" Rise of Relational DBMS (1980s): The 1980s saw the comnercialization of Codd's ideas. Oracle
Corporation, founded by Larry Ellison, led this charge by ereating one of the first connercial rela
tional database systems. Other companies, including IBM with its DB2 product, followed suit. The
development of the Structured Query Language (SQL) became the standard for interacting with these
databases.
During this period, the theory of relational database design also saw major developments. William W.
Armstrong made a foundational contribution with his 1974 paper, "Dependency Structures of Data
Base Relations." In this work, he formalized the concept of functional dependencies and provided
a set of inference rules, now known as Armstrong's Axioms. These axions are fundamental to the
theory of normalization, which is a process for designing tables to reduce redundancy and improve data
integrity.
" Object-Oriented and Object-Relational Models (1990s): As applications became more complex.
dealing with rich data types like images and video, new models emerged. The Object-Oriented
Model attempted to bridge the gap between databases and object-oriented progranming. The Object
Relational Model was a hybrid approach, adding object-oriented features
to relational databases.
internet and social media,
" NoSQL and Big Data (2000s - Present): With the explosion of the
"Big Data" challenge of massive, unstructured
a new generation of databases emerged to handle the databases, which often
(Not only SQL) was coined to describe these
data volumes. The term NoSQL scalability and
of horizontal
sacrifice some traditional relational features like strong consistency in favor
databases (like MongoDB), and graph
high availability. Examples include key-value stores, document
databases.
Historical Development of Database Systemns
evolving from rudimentary fle-based
The development of database systems spans multiple decades, databases. This evolution has been
managenent to highly sophisticated distributed and analytical
growing complexity of applications
driven by technological advances, increasing data volumes, and the provides a detailed historical
industrial domains, The following
across scientific, commercial, and types of database structures, and
account, highlighting key milestones, contributors, organizations,
underlying mathematical models,
technology initially emerged to
1960s: Early File-Based and Navigational Systems Database Hierarchical and network models were
address limitations of conventional file-processing systems, Organizations such as IBM and
structured records.
developed to efficiently store, organize, and access
CODASYL (Conference on Data Systems Languages) were pioneers in this era.

24
Course: Database Managenent Systems Total Lectures; 45-50

" Hierarchical Databases: IBM's IMS (Information Management System, 1966) implemented
a tree-like structure where each record type had a single parent and multiple children, providing
cfficient navigational access.
" Network Databases: Charles Bachman developed the Integrated Data Store (|DS), formal
ized later as the CODASYL network model, enabling more flexible many-to-many relationships
between records.

" Mathematical Models: Data relationships were represented using basic set theory and
pointer-based structures, forming the foundation for early query traversal methods and record
linking algorithms.
1970s: Relational Model The relational paradigm, introduced by Edgar F. Codd at IBM in 1970,
provided a formal, declarative approach to database management. By modeling data as relations
(tables) and using relational algebra and relational calculus, Codd established a rigorous foundation
for data integrity, consistency, and querying.
"Organizations: IBM Research and the University of California at Berkeley were key centers
for early research and prototype implementations.
" Database Systems: IBM's System R and UC Berkeley's INGRES became seminal projects
demonstrating the feasibility of relational databases.
" Mathematical Models: Relational algebra and relational calculus allowed precise reasoning
about queries, normalization, and constraint enforcement.
. Contributors: Edgar F. Codd, Raymond Boyce, and Donald D. Chamberlin were instrumental
in developing the theoretical and practical frameworks for relational databases, including the
SQL language.
1980s: Commercial Relational DBMS During this decade, relational databases matured into
robust, commercially viable systems. Widespread adoption was facilitated by standardized query
languages and reliable transaction support.
Commercial Systems: Oracle Database, IBM DB2, Informix, and Sybase introduced
enterprise-grade relational database systems.
. Persons: Donald D. Chamberlin and Raymond F. Boyce, architects of SQL at IBM, played a
pivotal role in standardizing query languages.
. Features: Support or ACID transactions, indexing, views, stored procedures, triggers, and
referential integrity became standard components of relational DBMS.
1990s: Object-Oriented and Object-Relational Extensions The need to manage complex data
types such as multimedia, engineering models, and spatial information led to the emergence of object
oriented DBMS (0ODBMS) and object-relational extensions.
"Organizations: Versant, ObjectStore, and Oracle (with its object-relational extensions) were
leaders in this development.
" Mathematical Models: Type theory, object caleulus, and formal inheritance hierarchies un
derpinned the object-relational mapping and the extension of relational algebra to handle com
plex objects.
. Contributors: Pioneers such as Michael Stonebraker (Ingres, Postgres) and David Maier con
tributed significantly toobject-relational and active database concepts.
2000s: Web, XML, and Semi-Structured Data The explosive growth of the internet and web
applications required databases capable of handling semi-structured and hierarchical data formats like
XML and JSON.

25
Total Lectures: 45-60
Course: Database Management Systems

Tamino, and Oracle provided


. Organizations: Microsoft (SQL Server XML support). eXist-db,
XML-enabled and hybrid relational-semi-structured datalbases.
bierarchical and semi-structured data storage,
" Models: Tree and graph-based models facilitated
enabling lexible querying withont rigid schemas.
platforms drove
portals, and e-commerce
" Applications: Content management systems, web
this trend.
Databases Modern applications, including
2010s-Present: Big Data, NoSQL, and Cloud NoSQL
demanded scalable, distributed database solutions.
social media, loT, and real-time analytics, handle high-velocity, high-volume, and heterogeneous
databases and cloud-native systems emerged to
data.
Foundation (Cas
Spanner), Amazon (DynatnoDB), Apache
" Organizations: Google (Bigtable, Neo4j led the development of these platforms.
sandra, HBase), MongoDB Inc., and
document stores, wide-colunn stores, and
graph databases
" Database Types: Key-value stores, specific access patterns and scalability requirernents.
became prominent, each optimized for
frame
consensus algorithms (Paxos, Raft), map-reduce effi
" Mathematical Models: Distributed graph-theoretic methods enabled robust, consistent, and
works, probabilistic models, and
clusters.
cient data management across large-scale
influenced distributed
Contributors: Pioneers like Jeff Dean and Sanjay Ghenawat (Google)
" protocols.
data storage and consistency
evolved from simple hierarchical
decades, database systems have
Summary: Over more than six object-oriented, semi-structured, and
navigational models to formal relational systems, then to conplexity and scale of data-driven
and evolution reflects the increasing
distributed architectures. This researchers, developers, and organiza
contributions from influential
applications and is shaped by models-set theory, relationalalgebra,
logic, type theory,
of formal mathematical of database
tions. The adoption querying, and optimization
theoryhas consistently underpinned the design, of technology.
and graph consistency, and efficiency across
generations
systems, ensuring correctness,

Relational Model
6.1.2 Core Concepts of the its core
understand
databases, it's essential to
foundation for most modern
Since the relational model is the
terminology.
commonly referred to as a table.
It is a set of records with
formal term for what is composed of rows
" Relation: The two-dimensional structure
structure, defined by a schema. A relation is a
the same
and columns.
domains D,, D2,.., Dn,
subset of the Cartesian product of a set of a
Mathematically, a relation R is a
represents the set of all possible values for
D,: Each domain D,
written as RC D, x D x x
specific attribute.
possible names),
domains Dstudent ID (all possible student IDs), DName (all Cartesian prod
For example, consider the be a subset of the
A relation 'STUDENT' would an ordered list of values, such as
and DMajor (all possible majors).
DMajor: A tuple in this
relation is
uct Dstudent| DX DName X
(101, 'Alice', 'Computer Science').

26
Total Lectures: 45-50
Course: Database Management Systems

Attribute

StudentID Name Major


Computer Science Tuple
101 Alice
Relatiot
102 Bob Physics

103 Charlie Biology

Figure 6.1: Visual representation of a relation


represents a specific property or
" Attribute: The formal term for a column in a table, Each attributeEach attribute has a narne and a
characteristic of the data, such as Name', 'Address', or 'StudentID',
data type (e.g., integer, string, date).
tuple represents a single record or instance of the
" Tuple: The formal term for a row in a table, Each
student's record with all their details is a tuple. The
entity being described. For example, a single
order of tuples within a relation is not considered significant.
to uniquely identify each tuple within a relation.
" Key: A special attribute or a set of attributes used identifies
(or a combination of attributes) that uniquely
A primary key, for example, is an attribute
a row in a table.

6.2 Database vs. File Systems


applications stored their data in fle systems.
While simple, this approach
Before databases became prevalent, was developed to overcome these
drawbacks. A Database Management System (DBMS)
had significant
comparison (see Table 6.1).
limitations. The following table provides a detailed
Database System
Table 6.1: Comparison of File System and
Database System
File System
High. Data redundancy is Low. A central repository of
Feature
Data Redundancy maintained, mininiz
the duplication of data in mul data is The student's
tiple files. For example, a stu ing duplication.
stored address is stored only once in
dent's address may be
the central database, and all
in both the registration file applications refer to this single
and the student financial aid
file, leading to wasted storage copy.
space and potential for error. Low. Data consistency is en
High. Data inconsistency
Data Inconsistency data forced through integrity con
occurs when redundant straints and a single source of
is updated in one location but truth. Any update to a stu
not others. If a student's ad dent's address is made in a sin
dress is changed in the regis
tration file but not in the fi- gle place, ensuring all users see
information.
nancial aid file, the data be the same, correct
comes inconsistent, which can
lead to incorrect decisions.
Continued on next page

27
Course: Database Management Systems Total Lectures: 45-50

Table 6.1 continued from previous page


Feature
File System Database System
Data Integrity Difficult to enforce. Logie Easy to enforce. Integrity
must be embedded in each ap constraints are rules that en
plication program. For exan sure the validity and consis
ple, a program might have to tency of data. They are de
check if astudent ID is unique fned centrally in the scherna
before adding a new student, (e.g., primary keys, foreign
and this check might be miss- keys, not-null constraints).
ing or implemented differently The DBMS automatically en
in other programs. forces these rules, such as pre
venting a duplicate student I[D
from being inserted.
Data Access Programs are required to tra Data is accessed through a
verse and read individual files. high-level query language
Complex queries require man like SQL (Structured Query
ual programming. To find Language). Queries like
a student by name, a pro SELECT * FROM Students
gram must read through every WHERE Name = 'Alice'; are
record in the file, which is in simple, powerful, and do not
efficient. require the user to know the
physical storage details.
Concurrency Difficult to manage. Concur Managed by the DBMS. Con
rency refers to the ability for currency control mecha
multiple users to access and nisms (e.g., locking) ensure
modify data at the same time. consistent access. The DBMS
In fle systems, this can lead to allows nultiple users to work
data corruption. If two users concurrently without interfer
try to update the same record ing with each other's opera
simultaneously, the final state tions, preventing data loss.
of the data may be incorrect.
Security Limited. Security is often tied Robust. The DBMS provides
to the file system's access con fine-grained security, allowing
trols, which are coarse-grained access control at the table,
(e.g., read/write permissions row, or even colunn level. A
for an entire file). All users user might be able to view a
with access to a file can see all student's name but not their
its contents. grade, providing a more secure
environmnent.
Backup and Recovery Manual and cumbersome. Re Automated and systematic.
quires custom scripts to man The DBMS provides built-in
age backups and restoration. mechanisms for backup and
In the event of a system crash, recovery from failures. It
data might be lost or cor uses transaction logs and other
rupted, and recovery is a com techniques to ensure data is re
plex, tine-consuming process. stored to a consistent state af
ter a crash, minimizing data
loss.

28
Course: Database Management Systems Total Leetores: 45-50

Student Filo)
Application 1 Applieation D)
Course File
DBMS) Databa)
Student File)
Application 2 [Application 2)
(Financial Aid File)
File System Approach Database System Approach

Figure 6.2: Comparison of File System vs. Database System

6.3 Characteristics of the Database Approach


The database approach provides several key characteristics that distinguish it fron file processing

1. Self-Describing Nature: A DBMS not only contains the database itself but also(data a complete def
constraints, This metadata about data)
inition or description of the database structure and
or System Catalog. The catalog contains
is stored in the DBMS catalog, or data dictionary, keys, foreign keys, and access
information about relation definitions, data types of attributes, primary
schema information
privileges. This allows the DBMS toprocess queries without needing to hard-code
into application programs.
of data files is stored in the DBMS catalog
2. Insulation between Programs and Data: The structure
concept known as data independence.
separately from the access programs. This is a fundamental
There are two types:
conceptual schema (the logical view af
" Logical Data Independence: The ability to change the For example, if you add a new attribute
the data) without having to change application programs. should not need to be modified. as it is
attribute
to a relation, a prograrn that doesn't use that
insulated from the change.
internal schema (the physical storage
"Physical Data Independence: The ability to change the
For example, you could nove a database
of data) without having to change the conceptual schema.a heap file to a B+ tree without affecting
to a different disk or change the file organization from
the application programs that access the data.
be used by various user groups, each of
3. Support for Multiple Views of Data: A database can provides a mechanism to define multiple
DBMS
which may need a different view of the same data. The
different users, customizing the data they see. A student might have a view that shows their
views for have a different view that shows all courses,
enrolled courses and grades, while an administrator might
without exposing sensitive information.
enroll1ments, and instructor assignments,
access of data by multiple users, ensuring
4. Sharing of Data: The DBMS manages the concurrent mnlti-user
data inconsistencies. This is essential for
that these interactíons do not cause conflicts or
simultaneously. A transaction is a
environments where multiple transactíons might be running
ensure data integrity. Concurrency
logical unit of work that must be completed in its entirety toanother's work.
corrupting
control nechanis1ns prevent one user's changes from
By centrally managing data, the DBMS
5. Control over Data Redundancy and Inconsistency: data inconsistencies, which occur when redundant
ninimizes data redundancy,. This helps to prevent
data is not updated properly, A centralized database [Link] problem by ensuring that each
piece of data is stored only once, making it the single source of

29
Course: Database Management Systens Total Lect ures: 45-50

Users/Programmers

Database
System
Application Programs/Queries

DBMS
Software Software to Process
Queries/Programs

Software to Access
Stored Data

Stored Database
Stored Database
Definition
(Meta-Data)

Representation of database environnent


Pigure 6.3: A Simplified

30
Course: Database Management
Systems Total Lectures: 45-50

6.4 Roles of Database Uscrs and


Administrators
A successful database systemn requires the
collabor ation of several key roles.
" Database Administrator (DBA): The central authority for a database systern. The DBA is a highly
technical role responsible for a wide rance of taske. including schema definition, storage structure and
nroess method definition, seeurity and athorization, and database tuning to optimize performance.
The bsA also manages user accounts, monitors system health, and is responsible for setting up and
testing backup and recovery procedures to ensure data safety.
" Database Designers: Responsible for identifying the data to be stored and for choosing the appro
priate structures to represent this data, They communicate with end-users to understand the data
requirements and create the conceptual, logical, and physical designs of the database. They play a
crucial role in creating an efficient and well-structured database.
"End-Users: The people whose jobs require access to the database, They can be classified into diferent
types:
- Casual End-Users: Access the database occasionally and need diferent information each time.
For example, a manager who runs a few ad-hoc queries a month to generate a report.
Naive End-Users: Use pre-written, user-friendly applications to access the database. For exam
ple, a bank teller using a specific application to check customer account balances,or a retailclerk
using a point-of-sale system.
Sophisticated End-Users: Use the DBMS's full features to develop complex applications and
conduct in-depth analysis. This group includes business analysts, scientists, and engineers who
use powerful tools to interact with the data directly.
" System Analysts and Application Programmers: System analysts determine the requirements
of end-users, especially naive end-users, and develop specifications for the required application programs.
typically by
Application programmers then implenent these programs that access the database,
writing high-level code with embedded DML (Data Manipulation Language) commands.

A simplified diagrammatic representation of this architecture can be as Fig. 6.3:

6.5 Questions
6.5.1 Short Answer Questions
and its instance?
Q1. What is the fundarnental difference between a database's schema

Q2. What is a "tuple" in the relational model?


Q3. What was a major drawback of the early file processing systems?
Q4. What key innovation did the relational model introduce?
Q5. Who is primarily responsible for defining the database schema and managing security?

6.5.2 Long Answer Questions


Q6. How does a DBMS handle data integrity diferently from a file system?
Q7. What benefit does a DBMS offer for concurrent user aCcess?
Q8. What does it mean for a DBMS to be "self-describing"?
Q9. What is the concept of "data independence" ?
Q10. What is the difference between a naive end-user and a sophisticated end-uUser?
31
Total Lectures: 45-50
Course: Database Management Systems

Q1l. What are the primary types of database languages, and what is the purpose of cach?
a Database Ad1ninistrator!
Q12. What is the role of a Database Desiguer, aud how do they differ from
and a single file view in a file-processing
Q13. Explain the difference between multiple views of the data
system.
diference between a "relation" and a "relation
scherna"?
Q14. In the relational model, what is the
integrity constraints in the relational model?
Q15. What are the primary types of

32

You might also like