SlideShare a Scribd company logo
Prepared & Presented by Asst professor Nandini S R
CSE202 Database Management Systems
Lecture #1
2
Part 1
Data & Database
3
 Explain why humankind’s interest in data goes back to ancient times.
ď‚§ Describe how data needs have historically driven many information technology
developments.
ď‚§ Describe the evolution of data storage media during the last century.
ď‚§ Relate the idea of data as a corporate resource that can be used to gain a
competitive advantage to the development of the database management systems
environment.
ď‚§ Differentiate the types of databases and database applications
ď‚§ Understand the principals of typical DBMS functionality
ď‚§ Explain the main characteristics of the database approach
ď‚§ Know the types of database users
ď‚§ Appraise the advantages of using the database approach
ď‚§ Summarize the historical development of database technology
ď‚§ Know how to extend database capabilities
ď‚§ Estimate when not to use databases
Learning Objectives
4
ď‚§ Data in history
ď‚§ Data storage media (today and in the past)
ď‚§ Types of Databases and Database Applications
ď‚§ Basic Definitions
ď‚§ Typical DBMS Functionality
ď‚§ Example of a Database (UNIVERSITY)
ď‚§ Main Characteristics of the Database Approach
ď‚§ Types of Database Users
ď‚§ Advantages of Using the Database Approach
ď‚§ Historical Development of Database Technology
ď‚§ Extending Database Capabilities
ď‚§ When Not to Use Databases
Outline
5
Data
ď‚— Data - the foundation of technological activity
ď‚— Database - a highly organized collection of
assembled data
ď‚— Database Management System - sophisticated
software that controls the database and the
database environment
2-6
What is Data?
ď‚§ A single piece of data is a single fact about something
that interests us.
ď‚§ A fact can be any characteristic of an object.
7
History of Data
ď‚— People have been interested in data for at
least the past 12,000 years.
ď‚— Non-computer, primitive methods of data
storage and handling.
ď‚§ Shepherds kept track of their flocks with pebbles.
ď‚§ A primitive but legitimate example of data storage
and retrieval.
What is Data? (Cont.)
8
1-9
 Dating back to 8500 B.C., unearthed clay tokens or “counters”
may have been used for record keeping in primitive forms of
accounting.
ď‚§ Tokens, with special markings on them, were sealed in hollow
clay vessels that accompanied commercial goods in transit.
History of Data
10
Data Through the Ages
ď‚— Record-keeping - the recording of data to
keep track of how much a person has
produced and what it can be bartered or sold
for.
ď‚— With time, different kinds of data were kept
ď‚§ calendars, census data, surveys, land ownership
records, marriage records, records of church
contributions, family trees, etc.
ď‚§ Double-entry bookkeeping - originated in the trading
centers of fourteenth century Italy.
ď‚§ The earliest known example is from a merchant in
Genoa and dates to the year 1340.
History of Data
11
12
Early Data Problems Spawn Calculating Devices
ď‚— People interested in devices that could
“automatically” process their data.
ď‚— Blaise Pascal produced an adding machine
that was an early version of today’s
mechanical automobile odometers.
13
Punched Cards - Data Storage
ď‚— Invented in 1805 by Joseph Marie Jacquard of
France.
 Jacquard’s method of storing fabric patterns,
a form of graphic data, as holes in punched
cards was a very clever means of data
storage.
ď‚— Of great importance for computing devices to
follow.
14
Era of Modern Information Processing
ď‚— The 1880 U.S. Census took about seven years to
compile by hand.
 Basing his work on Jacquard’s punched card
concept, Herman Hollerith arranged to have the
census data stored in punched cards and
invented machinery to tabulate them.
ď‚— In 1896 Hollerith formed the Tabulating
Machine Company to produce and commercially
market his devices -- this later became IBM.
15
Era of Modern Information Processing
ď‚— James Powers developed devices to
automatically feed cards into the equipment
and to automatically print results.
ď‚— In 1911 he established the Powers Tabulating
Machine Company -- this later became Unisys
Corporation.
16
The Mid-1950s
ď‚— The introduction of electronic computers.
ď‚— Witnessed a boom in economic development.
ď‚— From this point onward, it would be virtually
impossible to tie advances in computing
devices to specific, landmark data storage
and retrieval needs.
17
Modern Data Storage Media
ď‚— Punched paper tape - The earliest form of
modern data storage, introduced in the 1870s
and 1880s.
ď‚— Punched cards were the only data storage
medium used in the increasingly
sophisticated electromechanical accounting
machines of the 1920s, 1930s, and 1940s.
18
Modern Data Storage Media
ď‚— Middle to late 1930s saw the beginning of the
era of erasable magnetic storage media.
ď‚— By late 1940s, early work was done on the use
of magnetic tape for recording data.
ď‚— By 1950, several companies were developing
the magnetic tape concept for commercial
use.
19
Modern Data Storage Media
ď‚— Magnetic Tape - commercially available units in 1952.
ď‚— Direct Access Magnetic Devices - began to be
developed at MIT in the late 1930s and early 1940s.
ď‚— Magnetic Drum - early 1950s; forerunners of magnetic
disk technology.
ď‚— Magnetic Disk - commercially available in mid 1950s.
 Compact Disk (CD) – introduced as a data storage
medium in 1985.
 Solid-state technology – Flash drives.
20
Using Data for Competitive Advantage
ď‚— Data has become indispensable to every kind of
modern business and government organization.
ď‚— Data, the applications that process the data, and
the computers on which the applications run are
fundamental to every aspect of every kind of
endeavor.
21
Using Data for Competitive Advantage
ď‚— Data is a corporate resource, possibly the most
important corporate resource.
ď‚— Data can give a company a crucial competitive
advantage.
ď‚— e.g., FedEx had a significant competitive
advantage when it first provided access to its
package tracking data on its Web site.
22
Problems in Storing and Accessing Data
ď‚— Difficult to store and to provide efficient,
accurate access to a company’s data.
ď‚— The volume of data that companies have is
massive.
ď‚— Wal-Mart estimates its data warehouse contains
hundreds of terabytes (trillions of characters) of
data.
23
Problems in Storing and Accessing Data
ď‚— Larger number of people want access to data:
ď‚— Employees
ď‚— Customers
ď‚— Trading partners
ď‚— Additional issues include: data security, data
privacy, and backup and recovery.
24
Data Security
ď‚— Involves a company protecting its data from
theft, malicious destruction, deliberate attempts
at making phony changes to the data.
ď‚— e.g., someone trying to increase his own bank
account balance.
25
Data Privacy
ď‚— Ensuring that even employees who normally
have access to the company’s data are given
access only to the specific data that they need in
their work.
26
Backup and Recovery
ď‚— The ability to reconstruct data if it is lost or
corrupted.
ď‚— e.g., following a hardware failure
ď‚— e.g., following a natural disaster
27
Data Accuracy
ď‚— The same data is stored several, sometimes
many, times within a company’s information
system.
ď‚— When a new application is written, new data
files are created to store its data.
ď‚— Data can be duplicated within a single file and
across files.
28
Data as a Corporate Resource
ď‚— Data may be the most difficult corporate
resource to manage.
ď‚— We have tremendous volume, billions, trillions,
and more individual pieces of data, each piece of
which is different from the next.
29
Data as a Corporate Resource
ď‚— A new kind of software is required to help
manage the data.
ď‚— Progressively faster hardware is required to
keep up with the increasing volume of data and
data access demands.
ď‚— Data management specialists need to be
developed and educated.
30
The Database Environment
ď‚— Database Management System (DBMS)
ď‚— New Personnel - database administrator and
data management specialist
ď‚— Fast hardware
ď‚— Massive data storage facilities
31
The Database Environment
ď‚— Encourages data sharing
ď‚— Helps control data redundancy
ď‚— Has important improvements in data accuracy
ď‚— Permits storage of vast volumes of data with
acceptable access.
32
The Database Environment
ď‚— Allows database queries
ď‚— Provides tools to control:
ď‚— data security
ď‚— data privacy
ď‚— backup and recovery
33
Types of Databases and Database Applications
ď‚— Traditional Applications:
ď‚— Numeric and Textual Databases
ď‚— More Recent Applications:
ď‚— Multimedia Databases
ď‚— Geographic Information Systems (GIS)
ď‚— Biological and Genome Databases
ď‚— Data Warehouses
ď‚— Mobile databases
ď‚— Real-time and Active Databases
34
Recent Developments (cont.)
ď‚§ Social Networks started capturing a lot of information
about people and about communications among people-
posts, tweets, photos, videos in systems such as:
- Facebook
- Twitter
- Linked-In
ď‚§ All of the above constitutes data
ď‚§ Search Engines- Google, Bing, Yahoo : collect their own
repository of web pages for searching purposes
35
Recent Developments (cont.)
ď‚§ New Technologies are emerging from the so-called non-
database software vendors to manage vast amounts of data
generated on the web:
ď‚§ Big Data storage systems involving large clusters of
distributed computers (Chapter 25)
ď‚§ NOSQL (Not Only SQL) systems (Chapter 24)
 A large amount of data now resides on the “cloud” which
means it is in huge data centers using thousands of
machines.
36
Basic Definitions
ď‚— Database:
ď‚— A collection of related data.
ď‚— Data:
ď‚— Known facts that can be recorded and have an implicit
meaning.
ď‚— Mini-world:
ď‚— Some part of the real world about which data is stored in a
database. For example, student grades and transcripts at a
university.
ď‚— Database Management System (DBMS):
ď‚— A software package/ system to facilitate the creation and
maintenance of a computerized database.
ď‚— Database System:
ď‚— The DBMS software together with the data itself. Sometimes,
the applications are also included.
37
Impact of Databases and Database Technology
ď‚§ Businesses: Banking, Insurance, Retail, Transportation,
Healthcare, Manufacturing
ď‚§ Service Industries: Financial, Real-estate, Legal,
Electronic Commerce, Small businesses
ď‚§ Education : Resources for content and Delivery
ď‚§ More recently: Social Networks, Environmental and
Scientific Applications, Medicine and Genetics
ď‚§ Personalized Applications: based on smart mobile devices
38
Simplified database system environment
39
Typical DBMS Functionality
ď‚— Define a particular database in terms of its data types,
structures, and constraints
ď‚— Construct or Load the initial database contents on a
secondary storage medium
ď‚— Manipulating the database:
ď‚— Retrieval: Querying, generating reports
ď‚— Modification: Insertions, deletions and updates to its
content
ď‚— Accessing the database through Web applications
ď‚— Processing and Sharing by a set of concurrent users and
application programs – yet, keeping all data valid and
consistent
40
Database Model Requirements
ď‚§ PQRI:
Reactivit
y
Integrity
Quantity
Persistenc
y
Database model
41
Application Activities Against a Database
ď‚§ Applications interact with a database by generating
- Queries: that access different parts of data and formulate
the result of a request
- Transactions: that may read some data and “update” certain
values or generate new data and store that in the database
ď‚§ Applications must not allow unauthorized users to access
data
ď‚§ Applications must keep up with changing user
requirements against the database
42
Additional DBMS Functionality
ď‚— DBMS may additionally provide:
ď‚— Protection or Security measures to prevent
unauthorized access
 “Active” processing to take internal actions on data
ď‚— Presentation and Visualization of data
ď‚— Maintenance of the database and associated
programs over the lifetime of the database
application
ď‚— Called database, software, and system maintenance
43
Example of a Database
(with a Conceptual Data Model)
ď‚— Mini-world for the example:
ď‚— Part of a UNIVERSITY environment.
ď‚— Some mini-world entities:
ď‚— STUDENTs
ď‚— COURSEs
ď‚— SECTIONs (of COURSEs)
ď‚— (academic) DEPARTMENTs
ď‚— INSTRUCTORs
44
Example of a Database
(with a Conceptual Data Model) (cont.)
ď‚— Some mini-world relationships:
ď‚— SECTIONs are of specific COURSEs
ď‚— STUDENTs take SECTIONs
ď‚— COURSEs have prerequisite COURSEs
ď‚— INSTRUCTORs teach SECTIONs
ď‚— COURSEs are offered by DEPARTMENTs
ď‚— STUDENTs major in DEPARTMENTs
ď‚— Note: The above entities and relationships are typically
expressed in a conceptual data model, such as the
ENTITY-RELATIONSHIP data model (see Chapters 3, 4)
45
Example of a simple database
46
Main Characteristics of the Database Approach
ď‚— Self-describing nature of a database system:
ď‚— A DBMS catalog stores the description of a particular database
(e.g. data structures, types, and constraints)
ď‚— The description is called meta-data*.
ď‚— This allows the DBMS software to work with different database
applications.
ď‚— Insulation between programs and data:
ď‚— Called program-data independence.
ď‚— Allows changing data structures and storage organization without
having to change the DBMS access programs.
-----------------------------------------------------------------------------
* Some newer systems such as a few NOSQL systems need no meta-
data: they store the data definition within its structure making it
self describing
47
Example of a simplified database catalog
48
Main Characteristics of the Database Approach (cont.)
ď‚— Data Abstraction:
ď‚— A data model is used to hide storage details and
present the users with a conceptual view of the
database.
ď‚— Programs refer to the data model constructs rather
than data storage details
ď‚— Support of multiple views of the data:
ď‚— Each user may see a different view of the
database, which describes only the data of interest
to that user.
49
Main Characteristics of the Database Approach (cont.)
ď‚— Sharing of data and multi-user transaction
processing:
ď‚— Allowing a set of concurrent users to retrieve from
and to update the database.
ď‚— Concurrency control within the DBMS guarantees that
each transaction is correctly executed or aborted
ď‚— Recovery subsystem ensures each completed
transaction has its effect permanently recorded in the
database
ď‚— OLTP (Online Transaction Processing) is a major part of
database applications. This allows hundreds of
concurrent transactions to execute per second.
50
Database Users
ď‚— Users may be divided into
ď‚— Those who actually use and control the database
content, and those who design, develop and
maintain database applications (called “Actors on
the Scene”), and
ď‚— Those who design and develop the DBMS software
and related tools, and the computer systems
operators (called “Workers Behind the Scene”).
51
Database Users – Actors on the Scene
ď‚— Actors on the scene
ď‚— Database administrators:
ď‚— Responsible for authorizing access to the database, for
coordinating and monitoring its use, acquiring software
and hardware resources, controlling its use and
monitoring efficiency of operations.
ď‚— Database Designers:
ď‚— Responsible to define the content, the structure, the
constraints, and functions or transactions against the
database. They must communicate with the end-users
and understand their needs.
52
Database End Users
ď‚— Actors on the scene (continued)
ď‚— End-users: They use the data for queries, reports and
some of them update the database content. End-users
can be categorized into:
ď‚— Casual: access database occasionally when needed
ď‚— NaĂŻve or Parametric: they make up a large section of the
end-user population.
ď‚— They use previously well-defined functions in the form of
“canned transactions” against the database.
ď‚— Users of Mobile Apps mostly fall in this category
ď‚— Bank-tellers or reservation clerks are parametric users who
do this activity for an entire shift of operations.
ď‚— Social Media Users post and read information from
websites
53
Database End Users (cont.)
ď‚— Sophisticated:
ď‚— These include business analysts, scientists, engineers,
others thoroughly familiar with the system capabilities.
ď‚— Many use tools in the form of software packages that
work closely with the stored database.
ď‚— Stand-alone:
ď‚— Mostly maintain personal databases using ready-to-use
packaged applications.
ď‚— An example is the user of a tax program that creates its
own internal database.
ď‚— Another example is a user that maintains a database of
personal photos and videos.
54
Database Users – Actors on the Scene (cont.)
ď‚— System Analysts and Application Developers
This category currently accounts for a very large
proportion of the IT work force.
ď‚— System Analysts: They understand the user
requirements of naĂŻve and sophisticated users and
design applications including canned transactions to
meet those requirements.
ď‚— Application Programmers: Implement the
specifications developed by analysts and test and debug
them before deployment.
ď‚— Business Analysts: There is an increasing need for
such people who can analyze vast amounts of business
data and real-time data (“Big Data”) for better decision
making related to planning, advertising, marketing etc.
55
Database Users – Actors behind the Scene
ď‚— System Designers and Implementors: Design and
implement DBMS packages in the form of modules and
interfaces and test and debug them. The DBMS must
interface with applications, language compilers, operating
system components, etc.
ď‚— Tool Developers: Design and implement software
systems called tools for modeling and designing databases,
performance monitoring, prototyping, test data generation,
user interface creation, simulation etc. that facilitate
building of applications and allow using database
effectively.
ď‚— Operators and Maintenance Personnel: They manage
the actual running and maintenance of the database
system hardware and software environment.
56
Advantages of Using the Database Approach
ď‚— Controlling redundancy in data storage and in
development and maintenance efforts.
ď‚— Sharing of data among multiple users.
ď‚— Restricting unauthorized access to data. Only the
DBA staff uses privileged commands and
facilities.
ď‚— Providing persistent storage for program Objects
ď‚— E.g., Object-oriented DBMSs make program objects
persistent– see Chapter 12.
ď‚— Providing Storage Structures (e.g. indexes) for
efficient Query Processing – see Chapter 17.
57
Advantages of Using the Database Approach (cont.)
ď‚— Providing optimization of queries for efficient
processing.
ď‚— Providing backup and recovery services.
ď‚— Providing multiple interfaces to different classes
of users.
ď‚— Representing complex relationships among data.
ď‚— Enforcing integrity constraints on the database.
ď‚— Drawing inferences and actions from the stored
data using deductive and active rules and
triggers.
58
Additional Implications of Using the Database Approach
ď‚— Potential for enforcing standards:
ď‚— This is very crucial for the success of database
applications in large organizations. Standards
refer to data item names, display formats, screens,
report structures, meta-data (description of data),
Web page layouts, etc.
ď‚— Reduced application development time:
ď‚— Incremental time to add each new application is
reduced.
59
Additional Implications of Using the Database Approach
(cont.)
ď‚— Flexibility to change data structures:
ď‚— Database structure may evolve as new
requirements are defined.
ď‚— Availability of current information:
ď‚— Extremely important for on-line transaction
systems such as shopping, airline, hotel, car
reservations.
ď‚— Economies of scale:
ď‚— Wasteful overlap of resources and personnel can
be avoided by consolidating data and applications
across departments.
60
Historical Development of Database Technology
ď‚— Early Database Applications:
ď‚— The Hierarchical and Network Models were introduced
in mid 1960s and dominated during the seventies.
ď‚— A bulk of the worldwide database processing still
occurs using these models, particularly, the
hierarchical model using IBM’s IMS system.
ď‚— Relational Model based Systems:
ď‚— Relational model was originally introduced in 1970,
was heavily researched and experimented within IBM
Research and several universities.
ď‚— Relational DBMS Products emerged in the early 1980s.
61
ď‚— Object-oriented and emerging applications:
ď‚— Object-Oriented Database Management Systems
(OODBMSs) were introduced in late 1980s and early
1990s to cater to the need of complex data processing
in CAD and other applications.
ď‚— Their use has not taken off much.
ď‚— Many relational DBMSs have incorporated object
database concepts, leading to a new category called
object-relational DBMSs (ORDBMSs)
ď‚— Extended relational systems add further capabilities
(e.g. for multimedia data, text, XML, and other data
types)
Historical Development of Database Technology (cont.)
62
Historical Development of Database Technology (cont.)
ď‚— Data on the Web and E-commerce Applications:
ď‚— Web contains data in HTML (Hypertext markup
language) with links among pages.
ď‚— This has given rise to a new set of applications and
E-commerce is using new standards like XML
(eXtended Markup Language). (see Ch. 13).
ď‚— Script programming languages such as PHP and
JavaScript allow generation of dynamic Web pages
that are partially generated from a database (see
Ch. 11).
ď‚— Also allow database updates through Web pages
63
Extending Database Capabilities
ď‚— New functionality is being added to DBMSs in the following
areas:
 Scientific Applications – Physics, Chemistry, Biology -
Genetics
ď‚— Earth and Atmospheric Sciences and Astronomy
ď‚— XML (eXtensible Markup Language)
ď‚— Image Storage and Management
ď‚— Audio and Video Data Management
 Data Warehousing and Data Mining – a very major area for
future development using new technologies (see Chapters
28-29)
ď‚— Spatial Data Management and Location Based Services
ď‚— Time Series and Historical Data Management
ď‚— The above gives rise to new research and development in
incorporating new data types, complex data structures, new
operations and storage and indexing schemes in database
64
Extending Database Capabilities (cont.)
ď‚— Background since the advent of the 21st
Century:
ď‚— First decade of the 21st
century has seen
tremendous growth in user generated data and
automatically collected data from applications and
search engines.
ď‚— Social Media platforms such as Facebook and
Twitter are generating millions of transactions a
day and businesses are interested to tap into this
data to “understand” the users
ď‚— Cloud Storage and Backup is making unlimited
amount of storage available to users and
65
Extending Database Capabilities (cont.)
ď‚— Emergence of Big Data Technologies and NOSQL databases
ď‚— New data storage, management and analysis technology was
necessary to deal with the onslaught of data in petabytes a
day (10**15 bytes or 1000 terabytes) in some applications –
this started being commonly called as “Big Data”.
ď‚— Hadoop (which originated from Yahoo) and Mapreduce
Programming approach to distributed data processing
(which originated from Google) as well as the Google file
system have given rise to Big Data technologies (Chapter 25).
Further enhancements are taking place in the form of Spark
based technology.
ď‚— NOSQL (Not Only SQL- where SQL is the de facto standard
language for relational DBMSs) systems have been designed
for rapid search and retrieval from documents, processing of
huge graphs occurring on social networks, and other forms
of unstructured data with flexible models of transaction
processing (Chapter 24).
66
When not to use a DBMS
ď‚— Main inhibitors (costs) of using a DBMS:
ď‚— High initial investment and possible need for
additional hardware.
ď‚— Overhead for providing generality, security,
concurrency control, recovery, and integrity functions.
ď‚— When a DBMS may be unnecessary:
ď‚— If the database and applications are simple, well
defined, and not expected to change.
ď‚— If access to data by multiple users is not required.
ď‚— When a DBMS may be infeasible:
ď‚— In embedded systems where a general purpose DBMS
may not fit in available storage
67
When not to use a DBMS
ď‚— When no DBMS may suffice:
ď‚— If there are stringent real-time
requirements that may not be met because
of DBMS overhead (e.g., telephone
switching systems)
ď‚— If the database system is not able to handle the
complexity of data because of modeling limitations
(e.g., in complex genome and protein databases)
ď‚— If the database users need special operations not
supported by the DBMS (e.g., GIS and location
based services).
68
Part 2
Database System Concepts
and Architecture
69
ď‚§ List data models and their categories
ď‚§ Interpret the history of data models
ď‚§ Understand schemas, instances, and states
ď‚§ Evaluate the Three-Schema Architecture
ď‚§ Appraise data independence
ď‚§ Name DBMS languages and interfaces
ď‚§ Identify database system utilities and tools
ď‚§ Know the difference between centralized and client-server
architectures
ď‚§ Classify DBMSs
Learning Objectives
70
ď‚§ Data Models and Their Categories
ď‚§ History of Data Models
ď‚§ Schemas, Instances, and States
ď‚§ Three-Schema Architecture
ď‚§ Data Independence
ď‚§ DBMS Languages and Interfaces
ď‚§ Database System Utilities and Tools
ď‚§ Centralized and Client-Server Architectures
ď‚§ Classification of DBMSs
Outline
71
Data Models
ď‚— Data Model:
ď‚— A set of concepts to describe the structure of a
database, the operations for manipulating these
structures, and certain constraints that the database
should obey.
ď‚— Data Model Structure and Constraints:
ď‚— Constructs are used to define the database structure
ď‚— Constructs typically include elements (and their data
types) as well as groups of elements (e.g. entity,
record, table), and relationships among such groups
ď‚— Constraints specify some restrictions on valid data;
these constraints must be enforced at all times
72
Data Models (continued)
ď‚— Data Model Operations:
ď‚— These operations are used for specifying database
retrievals and updates by referring to the
constructs of the data model.
ď‚— Operations on the data model may include basic
model operations (e.g. generic insert, delete,
update) and user-defined operations (e.g.
compute_student_gpa, update_inventory)
73
Categories of Data Models
ď‚— Conceptual (high-level, semantic) data models:
ď‚— Provide concepts that are close to the way many users perceive
data.
ď‚— (Also called entity-based or object-based data models.)
ď‚— Physical (low-level, internal) data models:
ď‚— Provide concepts that describe details of how data is stored in
the computer. These are usually specified in an ad-hoc manner
through DBMS design and administration manuals
ď‚— Implementation (representational) data models:
ď‚— Provide concepts that fall between the above two, used by
many commercial DBMS implementations (e.g. relational data
models used in many commercial systems).
ď‚— Self-Describing Data Models:
ď‚— Combine the description of data with the data values. Examples
include XML, key-value stores and some NOSQL systems.
74
Schemas versus Instances
ď‚— Database Schema:
ď‚— The description of a database.
ď‚— Includes descriptions of the database structure,
data types, and the constraints on the database.
ď‚— Schema Diagram:
ď‚— An illustrative display of (most aspects of) a
database schema.
ď‚— Schema Construct:
ď‚— A component of the schema or an object within
the schema, e.g., STUDENT, COURSE.
75
Schemas versus Instances
ď‚— Database State:
ď‚— The actual data stored in a database at a
particular moment in time. This includes the
collection of all the data in the database.
ď‚— Also called database instance (or occurrence or
snapshot).
ď‚— The term instance is also applied to individual database
components, e.g. record instance, table instance, entity
instance
76
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 state when it is initially
loaded into the system.
ď‚— Valid State:
ď‚— A state that satisfies the structure and constraints
of the database.
77
ď‚— Distinction
ď‚— The database schema changes very infrequently.
ď‚— The database state changes every time the
database is updated.
ď‚— Schema is also called intension.
ď‚— State is also called extension.
Database Schema vs. Database State (cont.)
78
Example of a Database Schema
79
Example of a database state
80
Three-Schema Architecture
ď‚— Proposed to support DBMS characteristics of:
ď‚— Program-data independence.
ď‚— Support of multiple views of the data.
ď‚— Not explicitly used in commercial DBMS
products, but has been useful in explaining
database system organization
81
Three-Schema Architecture
ď‚— Defines DBMS schemas at three levels:
ď‚— Internal schema at the internal level to describe
physical storage structures and access paths (e.g
indexes).
ď‚— Typically uses a physical data model.
ď‚— Conceptual schema at the conceptual level to describe
the structure and constraints for the whole database
for a community of users.
ď‚— Uses a conceptual or an implementation data model.
ď‚— External schemas at the external level to describe the
various user views.
ď‚— Usually uses the same data model as the conceptual
schema.
82
Three-Schema Architecture (cont.)
83
Three-Schema Architecture (cont.)
ď‚— Mappings among schema levels are needed to
transform requests and data.
ď‚— Programs refer to an external schema, and are
mapped by the DBMS to the internal schema for
execution.
ď‚— Data extracted from the internal DBMS level is
reformatted to match the user’s external view (e.g.
formatting the results of an SQL query for display
in a Web page)
84
Data Independence
ď‚— Logical Data Independence:
ď‚— The capacity to change the conceptual schema
without having to change the external schemas
and their associated application programs.
ď‚— Physical Data Independence:
ď‚— The capacity to change the internal schema
without having to change the conceptual schema.
ď‚— For example, the internal schema may be changed
when certain file structures are reorganized or
new indexes are created to improve database
performance
85
Data Independence (cont.)
ď‚— When a schema at a lower level is changed, only
the mappings between this schema and higher-
level schemas need to be changed in a DBMS that
fully supports data independence.
ď‚— The higher-level schemas themselves are
unchanged.
ď‚— Hence, the application programs need not be
changed since they refer to the external schemas.
86
DBMS Languages
ď‚— Data Definition Language (DDL)
ď‚— Data Manipulation Language (DML)
ď‚— High-Level or Non-procedural Languages: These
include the relational language SQL
ď‚— May be used in a standalone way or may be embedded
in a programming language
ď‚— Low Level or Procedural Languages:
ď‚— These must be embedded in a programming language
87
DBMS Languages (cont.)
ď‚— Data Definition Language (DDL):
ď‚— Used by the DBA and database designers to specify
the conceptual schema of a database.
ď‚— In many DBMSs, the DDL is also used to define
internal and external schemas (views).
ď‚— In some DBMSs, separate storage definition
language (SDL) and view definition language
(VDL) are used to define internal and external
schemas.
ď‚— SDL is typically realized via DBMS commands provided
to the DBA and database designers
88
DBMS Languages (cont.)
ď‚— Data Manipulation Language (DML):
ď‚— Used to specify database retrievals and updates
ď‚— DML commands (data sublanguage) can be
embedded in a general-purpose programming
language (host language), such as COBOL, C,
C++, or Java.
ď‚— A library of functions can also be provided to access the
DBMS from a programming language
ď‚— Alternatively, stand-alone DML commands can be
applied directly (called a query language).
89
Types of DML
ď‚— High Level or Non-procedural Language:
ď‚— For example, the SQL relational language
 Are “set”-oriented and specify what data to
retrieve rather than how to retrieve it.
ď‚— Also called declarative languages.
ď‚— Low Level or Procedural Language:
ď‚— Retrieve data one record-at-a-time;
ď‚— Constructs such as looping are needed to retrieve
multiple records, along with positioning pointers.
90
DBMS Interfaces
ď‚— Stand-alone query language interfaces
ď‚— Example: Entering SQL queries at the DBMS
interactive SQL interface (e.g. SQL*Plus in
ORACLE)
ď‚— Programmer interfaces for embedding DML in
programming languages
ď‚— User-friendly interfaces
ď‚— Menu-based, forms-based, graphics-based, etc.
ď‚— Mobile Interfaces:interfaces allowing users to
perform transactions using mobile apps
91
DBMS Programming Language Interfaces
ď‚— Programmer interfaces for embedding DML in a
programming languages:
ď‚— Embedded Approach: e.g embedded SQL (for C, C++, etc.),
SQLJ (for Java)
ď‚— Procedure Call Approach: e.g. JDBC for Java, ODBC (Open
Databse Connectivity) for other programming languages as
API’s (application programming interfaces)
ď‚— Database Programming Language Approach: e.g. ORACLE
has PL/SQL, a programming language based on SQL;
language incorporates SQL and its data types as integral
components
ď‚— Scripting Languages: PHP (client-side scripting) and Python
(server-side scripting) are used to write database programs.
92
User-Friendly DBMS Interfaces
ď‚— Menu-based (Web-based), popular for browsing on
the web
ď‚— Forms-based, designed for naĂŻve users used to
filling in entries on a form
ď‚— Graphics-based
ď‚— Point and Click, Drag and Drop, etc.
ď‚— Specifying a query on a schema diagram
ď‚— Natural language: requests in written English
ď‚— Combinations of the above:
ď‚— For example, both menus and forms used extensively in
Web database interfaces
93
Other DBMS Interfaces
ď‚— Natural language: free text as a query
ď‚— Speech : Input query and Output response
ď‚— Web Browser with keyword search
ď‚— Parametric interfaces, e.g., bank tellers using
function keys.
ď‚— Interfaces for the DBA:
ď‚— Creating user accounts, granting authorizations
ď‚— Setting system parameters
ď‚— Changing schemas or access paths
94
Database System Utilities
ď‚— To perform certain functions such as:
ď‚— Loading data stored in files into a database.
Includes data conversion tools.
ď‚— Backing up the database periodically on tape.
ď‚— Reorganizing database file structures.
ď‚— Performance monitoring utilities.
ď‚— Report generation utilities.
ď‚— Other functions, such as sorting, user monitoring,
data compression, etc.
95
Other Tools
ď‚— Data dictionary / repository:
ď‚— Used to store schema descriptions and other
information such as design decisions, application
program descriptions, user information, usage
standards, etc.
ď‚— Active data dictionary is accessed by DBMS
software and users/DBA.
ď‚— Passive data dictionary is accessed by users/DBA
only.
96
Other Tools
ď‚— Application Development Environments and
CASE (computer-aided software engineering)
tools:
ď‚— Examples:
ď‚— PowerBuilder (Sybase)
ď‚— JBuilder (Borland)
ď‚— JDeveloper 10G (Oracle)
97
Typical DBMS Component Modules
98
Centralized and
Client-Server DBMS Architectures
ď‚— Centralized DBMS:
ď‚— Combines everything into single system including-
DBMS software, hardware, application programs,
and user interface processing software.
 User can still connect through a remote terminal –
however, all processing is done at centralized site.
99
A Physical Centralized Architecture
100
Basic 2-tier Client-Server Architectures
ď‚— Specialized Servers with Specialized functions
ď‚— Print server
ď‚— File server
ď‚— DBMS server
ď‚— Web server
ď‚— Email server
ď‚— Clients can access the specialized servers as
needed
101
Logical two-tier client server architecture
102
Clients
ď‚— Provide appropriate interfaces through a client
software module to access and utilize the various
server resources.
ď‚— Clients may be diskless machines or PCs or
Workstations with disks with only the client
software installed.
ď‚— Connected to the servers via some form of a
network.
ď‚— (LAN: local area network, wireless network, etc.)
103
DBMS Server
ď‚— Provides database query and transaction services to
the clients
ď‚— Relational DBMS servers are often called SQL
servers, query servers, or transaction servers
ď‚— Applications running on clients utilize an Application
Program Interface (API) to access server databases
via standard interface such as:
ď‚— ODBC: Open Database Connectivity standard
ď‚— JDBC: for Java programming access
104
Two Tier Client-Server Architecture
ď‚— Client and server must install appropriate client
module and server module software for ODBC or
JDBC
ď‚— A client program may connect to several DBMSs,
sometimes called the data sources.
ď‚— In general, data sources can be files or other non-
DBMS software that manages data.
ď‚— See Chapter 10 for details on Database
Programming
105
Three Tier Client-Server Architecture
ď‚— Common for Web applications
ď‚— Intermediate Layer called Application Server or Web
Server:
ď‚— Stores the web connectivity software and the business logic
part of the application used to access the corresponding data
from the database server
ď‚— Acts like a conduit for sending partially processed data
between the database server and the client.
ď‚— Three-tier Architecture Can Enhance Security:
ď‚— Database server only accessible via middle tier
ď‚— Clients cannot directly access database server
ď‚— Clients contain user interfaces and Web browsers
ď‚— The client is typically a PC or a mobile device connected to the
Web
106
Three-tier client-server architecture
107
Classification of DBMSs
ď‚— Based on the data model used
ď‚— Legacy: Network, Hierarchical.
ď‚— Currently Used: Relational, Object-oriented, Object-
relational
ď‚— Recent Technologies: Key-value storage systems,
NOSQL systems: document based, column-based,
graph-based and key-value based. Native XML DBMSs.
ď‚— Other classifications
ď‚— Single-user (typically used with personal computers)
vs. multi-user (most DBMSs).
ď‚— Centralized (uses a single computer with one database)
vs. distributed (multiple computers, multiple DBs)
108
Variations of Distributed DBMSs (DDBMSs)
ď‚— Homogeneous DDBMS
ď‚— Heterogeneous DDBMS
ď‚— Federated or Multidatabase Systems
ď‚— Participating Databases are loosely coupled with
high degree of autonomy.
ď‚— Distributed Database Systems have now come to
be known as client-server based database
systems because:
ď‚— They do not support a totally distributed
environment, but rather a set of database servers
supporting a set of clients.
109
Cost considerations for DBMSs
ď‚— Cost Range: from free open-source systems to
configurations costing millions of dollars
ď‚— Examples of free relational DBMSs: MySQL,
PostgreSQL, others
ď‚— Commercial DBMS offer additional specialized
modules, e.g. time-series module, spatial data
module, document module, XML module
ď‚— These offer additional specialized functionality when
purchased separately
ď‚— Sometimes called cartridges (e.g., in Oracle) or blades
ď‚— Different licensing options: site license, maximum
number of concurrent users (seat license), single
user, etc.
110
Other Considerations
ď‚§ Type of access paths within database system
ď‚— E.g.- inverted indexing based (ADABAS is one such
system).Fully indexed databases provide access by any
keyword (used in search engines)
ď‚§ General Purpose vs. Special Purpose
ď‚— E.g.- Airline Reservation systems or many others-
reservation systems for hotel/car etc. Are special purpose
OLTP (Online Transaction Processing Systems)
111
Additional Material
History of Data Models
112
ď‚— Network Model
ď‚— Hierarchical Model
ď‚— Relational Model
ď‚— Object-oriented Data Models
ď‚— Object-Relational Models
History of Data Models
113
History of Data Models
ď‚— Network Model:
ď‚— The first network DBMS was implemented by
Honeywell in 1964-65 (IDS System).
ď‚— Adopted heavily due to the support by CODASYL
(Conference on Data Systems Languages)
(CODASYL - DBTG report of 1971).
ď‚— Later implemented in a large variety of systems -
IDMS (Cullinet - now Computer Associates), DMS
1100 (Unisys), IMAGE (H.P. (Hewlett-Packard)), VAX
-DBMS (Digital Equipment Corp., next COMPAQ,
now H.P.).
114
Network Model
ď‚— Advantages:
ď‚— Network Model is able to model complex
relationships and represents semantics of
add/delete on the relationships.
ď‚— Can handle most situations for modeling using
record types and relationship types.
ď‚— Language is navigational; uses constructs like
FIND, FIND member, FIND owner, FIND NEXT
within set, GET, etc.
ď‚— Programmers can do optimal navigation through the
database.
115
Network Model
ď‚— Disadvantages:
ď‚— Navigational and procedural nature of processing
ď‚— Database contains a complex array of pointers that
thread through a set of records.
 Little scope for automated “query optimization”
116
History of Data Models
ď‚— Hierarchical Data Model:
ď‚— Initially implemented in a joint effort by IBM and
North American Rockwell around 1965. Resulted
in the IMS family of systems.
 IBM’s IMS product had (and still has) a very large
customer base worldwide
ď‚— Hierarchical model was formalized based on the
IMS system
ď‚— Other systems based on this model: System 2k (SAS
inc.)
117
Hierarchical Model
ď‚— Advantages:
ď‚— Simple to construct and operate
ď‚— Corresponds to a number of natural hierarchically
organized domains, e.g., organization (“org”) chart
ď‚— Language is simple:
ď‚— Uses constructs like GET, GET UNIQUE, GET NEXT, GET
NEXT WITHIN PARENT, etc.
ď‚— Disadvantages:
ď‚— Navigational and procedural nature of processing
ď‚— Database is visualized as a linear arrangement of
records
ď‚— Little scope for "query optimization"
118
History of Data Models
ď‚— Relational Model:
ď‚— Proposed in 1970 by E.F. Codd (IBM), first commercial
system in 1981-82.
ď‚— Now in several commercial products (e.g. DB2,
ORACLE, MS SQL Server, SYBASE, INFORMIX).
ď‚— Several free open source implementations, e.g. MySQL,
PostgreSQL
ď‚— Currently most dominant for developing database
applications.
ď‚— SQL relational standards: SQL-89 (SQL1), SQL-92
(SQL2), SQL-99, SQL3, …
ď‚— Chapters 5 through 11 describe this model in detail
119
History of Data Models
ď‚— Object-oriented Data Models:
ď‚— Several models have been proposed for implementing
in a database system.
ď‚— One set comprises models of persistent O-O
Programming Languages such as C++ (e.g., in
OBJECTSTORE or VERSANT), and Smalltalk (e.g., in
GEMSTONE).
ď‚— Additionally, systems like O2, ORION (at MCC - then
ITASCA), IRIS (at H.P.- used in Open OODB).
ď‚— Object Database Standard: ODMG-93, ODMG-version
2.0, ODMG-version 3.0.
ď‚— Chapter 12 describes this model.
120
History of Data Models
ď‚— Object-Relational Models:
ď‚— The trend to mix object models with relational was
started with Informix Universal Server.
ď‚— Relational systems incorporated concepts from object
databases leading to object-relational.
ď‚— Exemplified in the versions of Oracle, DB2, and SQL
Server and other DBMSs.
ď‚— Current trend by Relational DBMS vendors is to extend
relational DBMSs with capability to process XML, Text
and other data types.
 The term “Object-relational” is receding in the
marketplace.
121
Next Lecture
Data Modeling & ER Model
122
References
 Ramez Elmasri, Shamkant Navathe; “Fundamentals of
Database Systems”, 6th
Ed., Pearson, 2014.
 Mark L. Gillenson; “Fundamentals of Database
Management Systems”, 2nd
Ed., John Wiley, 2012.
 Universität Hamburg, Fachbereich Informatik, Einführung
in Datenbanksysteme, Lecture Notes, 1999

More Related Content

PPTX
lecture-1-1487765601.pptx
PriyadharshiniG41
 
PPTX
DataBaseManagementSystems OVERVIEW and introduction
ramtech111
 
PPT
data as the new corporate resource
Fadhilah Mat Yamin
 
PDF
Big Data: A Rescue Plan
professionalpanorama
 
PDF
Big data a rescue plan
Tapasya123
 
PDF
History of Big Data
HEXANIKA
 
lecture-1-1487765601.pptx
PriyadharshiniG41
 
DataBaseManagementSystems OVERVIEW and introduction
ramtech111
 
data as the new corporate resource
Fadhilah Mat Yamin
 
Big Data: A Rescue Plan
professionalpanorama
 
Big data a rescue plan
Tapasya123
 
History of Big Data
HEXANIKA
 

Similar to Database management system chap1 ppt.pptx (20)

PDF
Database History
Majong DevJfu
 
DOCX
Datamining
greenstarvijay
 
PPTX
Big Data
ROSHAN SHAJI
 
PPT
Information system
John Pros Valencia
 
PPTX
Nature and Development of Information systems
John Pros Valencia
 
PPTX
Data: A Timeline - How Data Came To Rule The World
Ribbonfish
 
PPTX
Module 1 Introduction to Big and Smart Data- Online
caniceconsulting
 
PDF
Intro dm
Sushma Shetty
 
PDF
Intro dm
udit singh
 
PPTX
Overview of dbms
Dabbal Singh Mahara
 
PPTX
Introduction to Business Intelligence definition and types
shobyscms
 
PDF
INT 1010 02.pdf
Luis R Castellanos
 
PDF
Information technology
Apie248
 
PDF
SWOT of Bigdata Security Using Machine Learning Techniques
ijistjournal
 
PPTX
Nature and Development of Indexing system
John Pros Valencia
 
PPT
01Intro(1).ppt Introduction In computer science
HaiderAli84963
 
PDF
Dm unit i r16
Kishore Kumar
 
PPTX
Big Data and Data Science: The Technologies Shaping Our Lives
Rukshan Batuwita
 
DOCX
COM6905 Research Methods And Professional Issues.docx
write31
 
PDF
Big Data And Analytics: A Summary Of The X 4.0 Era
JohnWilson47710
 
Database History
Majong DevJfu
 
Datamining
greenstarvijay
 
Big Data
ROSHAN SHAJI
 
Information system
John Pros Valencia
 
Nature and Development of Information systems
John Pros Valencia
 
Data: A Timeline - How Data Came To Rule The World
Ribbonfish
 
Module 1 Introduction to Big and Smart Data- Online
caniceconsulting
 
Intro dm
Sushma Shetty
 
Intro dm
udit singh
 
Overview of dbms
Dabbal Singh Mahara
 
Introduction to Business Intelligence definition and types
shobyscms
 
INT 1010 02.pdf
Luis R Castellanos
 
Information technology
Apie248
 
SWOT of Bigdata Security Using Machine Learning Techniques
ijistjournal
 
Nature and Development of Indexing system
John Pros Valencia
 
01Intro(1).ppt Introduction In computer science
HaiderAli84963
 
Dm unit i r16
Kishore Kumar
 
Big Data and Data Science: The Technologies Shaping Our Lives
Rukshan Batuwita
 
COM6905 Research Methods And Professional Issues.docx
write31
 
Big Data And Analytics: A Summary Of The X 4.0 Era
JohnWilson47710
 
Ad

Recently uploaded (20)

PDF
CAD-CAM U-1 Combined Notes_57761226_2025_04_22_14_40.pdf
shailendrapratap2002
 
PDF
top-5-use-cases-for-splunk-security-analytics.pdf
yaghutialireza
 
PDF
AI-Driven IoT-Enabled UAV Inspection Framework for Predictive Maintenance and...
ijcncjournal019
 
PPT
Understanding the Key Components and Parts of a Drone System.ppt
Siva Reddy
 
PPTX
Victory Precisions_Supplier Profile.pptx
victoryprecisions199
 
PPTX
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
PDF
2025 Laurence Sigler - Advancing Decision Support. Content Management Ecommer...
Francisco Javier Mora Serrano
 
PPTX
Civil Engineering Practices_BY Sh.JP Mishra 23.09.pptx
bineetmishra1990
 
PDF
FLEX-LNG-Company-Presentation-Nov-2017.pdf
jbloggzs
 
PDF
Construction of a Thermal Vacuum Chamber for Environment Test of Triple CubeS...
2208441
 
PDF
Zero carbon Building Design Guidelines V4
BassemOsman1
 
PDF
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
PDF
EVS+PRESENTATIONS EVS+PRESENTATIONS like
saiyedaqib429
 
PDF
Advanced LangChain & RAG: Building a Financial AI Assistant with Real-Time Data
Soufiane Sejjari
 
PPTX
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
PDF
Introduction to Ship Engine Room Systems.pdf
Mahmoud Moghtaderi
 
PPTX
Online Cab Booking and Management System.pptx
diptipaneri80
 
PDF
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
PDF
All chapters of Strength of materials.ppt
girmabiniyam1234
 
PPTX
quantum computing transition from classical mechanics.pptx
gvlbcy
 
CAD-CAM U-1 Combined Notes_57761226_2025_04_22_14_40.pdf
shailendrapratap2002
 
top-5-use-cases-for-splunk-security-analytics.pdf
yaghutialireza
 
AI-Driven IoT-Enabled UAV Inspection Framework for Predictive Maintenance and...
ijcncjournal019
 
Understanding the Key Components and Parts of a Drone System.ppt
Siva Reddy
 
Victory Precisions_Supplier Profile.pptx
victoryprecisions199
 
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
2025 Laurence Sigler - Advancing Decision Support. Content Management Ecommer...
Francisco Javier Mora Serrano
 
Civil Engineering Practices_BY Sh.JP Mishra 23.09.pptx
bineetmishra1990
 
FLEX-LNG-Company-Presentation-Nov-2017.pdf
jbloggzs
 
Construction of a Thermal Vacuum Chamber for Environment Test of Triple CubeS...
2208441
 
Zero carbon Building Design Guidelines V4
BassemOsman1
 
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
EVS+PRESENTATIONS EVS+PRESENTATIONS like
saiyedaqib429
 
Advanced LangChain & RAG: Building a Financial AI Assistant with Real-Time Data
Soufiane Sejjari
 
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
Introduction to Ship Engine Room Systems.pdf
Mahmoud Moghtaderi
 
Online Cab Booking and Management System.pptx
diptipaneri80
 
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
All chapters of Strength of materials.ppt
girmabiniyam1234
 
quantum computing transition from classical mechanics.pptx
gvlbcy
 
Ad

Database management system chap1 ppt.pptx

  • 1. Prepared & Presented by Asst professor Nandini S R CSE202 Database Management Systems Lecture #1
  • 2. 2 Part 1 Data & Database
  • 3. 3 ď‚§ Explain why humankind’s interest in data goes back to ancient times. ď‚§ Describe how data needs have historically driven many information technology developments. ď‚§ Describe the evolution of data storage media during the last century. ď‚§ Relate the idea of data as a corporate resource that can be used to gain a competitive advantage to the development of the database management systems environment. ď‚§ Differentiate the types of databases and database applications ď‚§ Understand the principals of typical DBMS functionality ď‚§ Explain the main characteristics of the database approach ď‚§ Know the types of database users ď‚§ Appraise the advantages of using the database approach ď‚§ Summarize the historical development of database technology ď‚§ Know how to extend database capabilities ď‚§ Estimate when not to use databases Learning Objectives
  • 4. 4 ď‚§ Data in history ď‚§ Data storage media (today and in the past) ď‚§ Types of Databases and Database Applications ď‚§ Basic Definitions ď‚§ Typical DBMS Functionality ď‚§ Example of a Database (UNIVERSITY) ď‚§ Main Characteristics of the Database Approach ď‚§ Types of Database Users ď‚§ Advantages of Using the Database Approach ď‚§ Historical Development of Database Technology ď‚§ Extending Database Capabilities ď‚§ When Not to Use Databases Outline
  • 5. 5 Data ď‚— Data - the foundation of technological activity ď‚— Database - a highly organized collection of assembled data ď‚— Database Management System - sophisticated software that controls the database and the database environment
  • 6. 2-6 What is Data? ď‚§ A single piece of data is a single fact about something that interests us. ď‚§ A fact can be any characteristic of an object.
  • 7. 7 History of Data ď‚— People have been interested in data for at least the past 12,000 years. ď‚— Non-computer, primitive methods of data storage and handling.
  • 8. ď‚§ Shepherds kept track of their flocks with pebbles. ď‚§ A primitive but legitimate example of data storage and retrieval. What is Data? (Cont.) 8
  • 9. 1-9 ď‚§ Dating back to 8500 B.C., unearthed clay tokens or “counters” may have been used for record keeping in primitive forms of accounting. ď‚§ Tokens, with special markings on them, were sealed in hollow clay vessels that accompanied commercial goods in transit. History of Data
  • 10. 10 Data Through the Ages ď‚— Record-keeping - the recording of data to keep track of how much a person has produced and what it can be bartered or sold for. ď‚— With time, different kinds of data were kept ď‚§ calendars, census data, surveys, land ownership records, marriage records, records of church contributions, family trees, etc.
  • 11. ď‚§ Double-entry bookkeeping - originated in the trading centers of fourteenth century Italy. ď‚§ The earliest known example is from a merchant in Genoa and dates to the year 1340. History of Data 11
  • 12. 12 Early Data Problems Spawn Calculating Devices ď‚— People interested in devices that could “automatically” process their data. ď‚— Blaise Pascal produced an adding machine that was an early version of today’s mechanical automobile odometers.
  • 13. 13 Punched Cards - Data Storage ď‚— Invented in 1805 by Joseph Marie Jacquard of France. ď‚— Jacquard’s method of storing fabric patterns, a form of graphic data, as holes in punched cards was a very clever means of data storage. ď‚— Of great importance for computing devices to follow.
  • 14. 14 Era of Modern Information Processing ď‚— The 1880 U.S. Census took about seven years to compile by hand. ď‚— Basing his work on Jacquard’s punched card concept, Herman Hollerith arranged to have the census data stored in punched cards and invented machinery to tabulate them. ď‚— In 1896 Hollerith formed the Tabulating Machine Company to produce and commercially market his devices -- this later became IBM.
  • 15. 15 Era of Modern Information Processing ď‚— James Powers developed devices to automatically feed cards into the equipment and to automatically print results. ď‚— In 1911 he established the Powers Tabulating Machine Company -- this later became Unisys Corporation.
  • 16. 16 The Mid-1950s ď‚— The introduction of electronic computers. ď‚— Witnessed a boom in economic development. ď‚— From this point onward, it would be virtually impossible to tie advances in computing devices to specific, landmark data storage and retrieval needs.
  • 17. 17 Modern Data Storage Media ď‚— Punched paper tape - The earliest form of modern data storage, introduced in the 1870s and 1880s. ď‚— Punched cards were the only data storage medium used in the increasingly sophisticated electromechanical accounting machines of the 1920s, 1930s, and 1940s.
  • 18. 18 Modern Data Storage Media ď‚— Middle to late 1930s saw the beginning of the era of erasable magnetic storage media. ď‚— By late 1940s, early work was done on the use of magnetic tape for recording data. ď‚— By 1950, several companies were developing the magnetic tape concept for commercial use.
  • 19. 19 Modern Data Storage Media ď‚— Magnetic Tape - commercially available units in 1952. ď‚— Direct Access Magnetic Devices - began to be developed at MIT in the late 1930s and early 1940s. ď‚— Magnetic Drum - early 1950s; forerunners of magnetic disk technology. ď‚— Magnetic Disk - commercially available in mid 1950s. ď‚— Compact Disk (CD) – introduced as a data storage medium in 1985. ď‚— Solid-state technology – Flash drives.
  • 20. 20 Using Data for Competitive Advantage ď‚— Data has become indispensable to every kind of modern business and government organization. ď‚— Data, the applications that process the data, and the computers on which the applications run are fundamental to every aspect of every kind of endeavor.
  • 21. 21 Using Data for Competitive Advantage ď‚— Data is a corporate resource, possibly the most important corporate resource. ď‚— Data can give a company a crucial competitive advantage. ď‚— e.g., FedEx had a significant competitive advantage when it first provided access to its package tracking data on its Web site.
  • 22. 22 Problems in Storing and Accessing Data ď‚— Difficult to store and to provide efficient, accurate access to a company’s data. ď‚— The volume of data that companies have is massive. ď‚— Wal-Mart estimates its data warehouse contains hundreds of terabytes (trillions of characters) of data.
  • 23. 23 Problems in Storing and Accessing Data ď‚— Larger number of people want access to data: ď‚— Employees ď‚— Customers ď‚— Trading partners ď‚— Additional issues include: data security, data privacy, and backup and recovery.
  • 24. 24 Data Security ď‚— Involves a company protecting its data from theft, malicious destruction, deliberate attempts at making phony changes to the data. ď‚— e.g., someone trying to increase his own bank account balance.
  • 25. 25 Data Privacy ď‚— Ensuring that even employees who normally have access to the company’s data are given access only to the specific data that they need in their work.
  • 26. 26 Backup and Recovery ď‚— The ability to reconstruct data if it is lost or corrupted. ď‚— e.g., following a hardware failure ď‚— e.g., following a natural disaster
  • 27. 27 Data Accuracy ď‚— The same data is stored several, sometimes many, times within a company’s information system. ď‚— When a new application is written, new data files are created to store its data. ď‚— Data can be duplicated within a single file and across files.
  • 28. 28 Data as a Corporate Resource ď‚— Data may be the most difficult corporate resource to manage. ď‚— We have tremendous volume, billions, trillions, and more individual pieces of data, each piece of which is different from the next.
  • 29. 29 Data as a Corporate Resource ď‚— A new kind of software is required to help manage the data. ď‚— Progressively faster hardware is required to keep up with the increasing volume of data and data access demands. ď‚— Data management specialists need to be developed and educated.
  • 30. 30 The Database Environment ď‚— Database Management System (DBMS) ď‚— New Personnel - database administrator and data management specialist ď‚— Fast hardware ď‚— Massive data storage facilities
  • 31. 31 The Database Environment ď‚— Encourages data sharing ď‚— Helps control data redundancy ď‚— Has important improvements in data accuracy ď‚— Permits storage of vast volumes of data with acceptable access.
  • 32. 32 The Database Environment ď‚— Allows database queries ď‚— Provides tools to control: ď‚— data security ď‚— data privacy ď‚— backup and recovery
  • 33. 33 Types of Databases and Database Applications ď‚— Traditional Applications: ď‚— Numeric and Textual Databases ď‚— More Recent Applications: ď‚— Multimedia Databases ď‚— Geographic Information Systems (GIS) ď‚— Biological and Genome Databases ď‚— Data Warehouses ď‚— Mobile databases ď‚— Real-time and Active Databases
  • 34. 34 Recent Developments (cont.) ď‚§ Social Networks started capturing a lot of information about people and about communications among people- posts, tweets, photos, videos in systems such as: - Facebook - Twitter - Linked-In ď‚§ All of the above constitutes data ď‚§ Search Engines- Google, Bing, Yahoo : collect their own repository of web pages for searching purposes
  • 35. 35 Recent Developments (cont.) ď‚§ New Technologies are emerging from the so-called non- database software vendors to manage vast amounts of data generated on the web: ď‚§ Big Data storage systems involving large clusters of distributed computers (Chapter 25) ď‚§ NOSQL (Not Only SQL) systems (Chapter 24) ď‚§ A large amount of data now resides on the “cloud” which means it is in huge data centers using thousands of machines.
  • 36. 36 Basic Definitions ď‚— Database: ď‚— A collection of related data. ď‚— Data: ď‚— Known facts that can be recorded and have an implicit meaning. ď‚— Mini-world: ď‚— Some part of the real world about which data is stored in a database. For example, student grades and transcripts at a university. ď‚— Database Management System (DBMS): ď‚— A software package/ system to facilitate the creation and maintenance of a computerized database. ď‚— Database System: ď‚— The DBMS software together with the data itself. Sometimes, the applications are also included.
  • 37. 37 Impact of Databases and Database Technology ď‚§ Businesses: Banking, Insurance, Retail, Transportation, Healthcare, Manufacturing ď‚§ Service Industries: Financial, Real-estate, Legal, Electronic Commerce, Small businesses ď‚§ Education : Resources for content and Delivery ď‚§ More recently: Social Networks, Environmental and Scientific Applications, Medicine and Genetics ď‚§ Personalized Applications: based on smart mobile devices
  • 39. 39 Typical DBMS Functionality ď‚— Define a particular database in terms of its data types, structures, and constraints ď‚— Construct or Load the initial database contents on a secondary storage medium ď‚— Manipulating the database: ď‚— Retrieval: Querying, generating reports ď‚— Modification: Insertions, deletions and updates to its content ď‚— Accessing the database through Web applications ď‚— Processing and Sharing by a set of concurrent users and application programs – yet, keeping all data valid and consistent
  • 40. 40 Database Model Requirements ď‚§ PQRI: Reactivit y Integrity Quantity Persistenc y Database model
  • 41. 41 Application Activities Against a Database ď‚§ Applications interact with a database by generating - Queries: that access different parts of data and formulate the result of a request - Transactions: that may read some data and “update” certain values or generate new data and store that in the database ď‚§ Applications must not allow unauthorized users to access data ď‚§ Applications must keep up with changing user requirements against the database
  • 42. 42 Additional DBMS Functionality ď‚— DBMS may additionally provide: ď‚— Protection or Security measures to prevent unauthorized access ď‚— “Active” processing to take internal actions on data ď‚— Presentation and Visualization of data ď‚— Maintenance of the database and associated programs over the lifetime of the database application ď‚— Called database, software, and system maintenance
  • 43. 43 Example of a Database (with a Conceptual Data Model) ď‚— Mini-world for the example: ď‚— Part of a UNIVERSITY environment. ď‚— Some mini-world entities: ď‚— STUDENTs ď‚— COURSEs ď‚— SECTIONs (of COURSEs) ď‚— (academic) DEPARTMENTs ď‚— INSTRUCTORs
  • 44. 44 Example of a Database (with a Conceptual Data Model) (cont.) ď‚— Some mini-world relationships: ď‚— SECTIONs are of specific COURSEs ď‚— STUDENTs take SECTIONs ď‚— COURSEs have prerequisite COURSEs ď‚— INSTRUCTORs teach SECTIONs ď‚— COURSEs are offered by DEPARTMENTs ď‚— STUDENTs major in DEPARTMENTs ď‚— Note: The above entities and relationships are typically expressed in a conceptual data model, such as the ENTITY-RELATIONSHIP data model (see Chapters 3, 4)
  • 45. 45 Example of a simple database
  • 46. 46 Main Characteristics of the Database Approach ď‚— Self-describing nature of a database system: ď‚— A DBMS catalog stores the description of a particular database (e.g. data structures, types, and constraints) ď‚— The description is called meta-data*. ď‚— This allows the DBMS software to work with different database applications. ď‚— Insulation between programs and data: ď‚— Called program-data independence. ď‚— Allows changing data structures and storage organization without having to change the DBMS access programs. ----------------------------------------------------------------------------- * Some newer systems such as a few NOSQL systems need no meta- data: they store the data definition within its structure making it self describing
  • 47. 47 Example of a simplified database catalog
  • 48. 48 Main Characteristics of the Database Approach (cont.) ď‚— Data Abstraction: ď‚— A data model is used to hide storage details and present the users with a conceptual view of the database. ď‚— Programs refer to the data model constructs rather than data storage details ď‚— Support of multiple views of the data: ď‚— Each user may see a different view of the database, which describes only the data of interest to that user.
  • 49. 49 Main Characteristics of the Database Approach (cont.) ď‚— Sharing of data and multi-user transaction processing: ď‚— Allowing a set of concurrent users to retrieve from and to update the database. ď‚— Concurrency control within the DBMS guarantees that each transaction is correctly executed or aborted ď‚— Recovery subsystem ensures each completed transaction has its effect permanently recorded in the database ď‚— OLTP (Online Transaction Processing) is a major part of database applications. This allows hundreds of concurrent transactions to execute per second.
  • 50. 50 Database Users ď‚— Users may be divided into ď‚— Those who actually use and control the database content, and those who design, develop and maintain database applications (called “Actors on the Scene”), and ď‚— Those who design and develop the DBMS software and related tools, and the computer systems operators (called “Workers Behind the Scene”).
  • 51. 51 Database Users – Actors on the Scene ď‚— Actors on the scene ď‚— Database administrators: ď‚— Responsible for authorizing access to the database, for coordinating and monitoring its use, acquiring software and hardware resources, controlling its use and monitoring efficiency of operations. ď‚— Database Designers: ď‚— Responsible to define the content, the structure, the constraints, and functions or transactions against the database. They must communicate with the end-users and understand their needs.
  • 52. 52 Database End Users ď‚— Actors on the scene (continued) ď‚— End-users: They use the data for queries, reports and some of them update the database content. End-users can be categorized into: ď‚— Casual: access database occasionally when needed ď‚— NaĂŻve or Parametric: they make up a large section of the end-user population. ď‚— They use previously well-defined functions in the form of “canned transactions” against the database. ď‚— Users of Mobile Apps mostly fall in this category ď‚— Bank-tellers or reservation clerks are parametric users who do this activity for an entire shift of operations. ď‚— Social Media Users post and read information from websites
  • 53. 53 Database End Users (cont.) ď‚— Sophisticated: ď‚— These include business analysts, scientists, engineers, others thoroughly familiar with the system capabilities. ď‚— Many use tools in the form of software packages that work closely with the stored database. ď‚— Stand-alone: ď‚— Mostly maintain personal databases using ready-to-use packaged applications. ď‚— An example is the user of a tax program that creates its own internal database. ď‚— Another example is a user that maintains a database of personal photos and videos.
  • 54. 54 Database Users – Actors on the Scene (cont.) ď‚— System Analysts and Application Developers This category currently accounts for a very large proportion of the IT work force. ď‚— System Analysts: They understand the user requirements of naĂŻve and sophisticated users and design applications including canned transactions to meet those requirements. ď‚— Application Programmers: Implement the specifications developed by analysts and test and debug them before deployment. ď‚— Business Analysts: There is an increasing need for such people who can analyze vast amounts of business data and real-time data (“Big Data”) for better decision making related to planning, advertising, marketing etc.
  • 55. 55 Database Users – Actors behind the Scene ď‚— System Designers and Implementors: Design and implement DBMS packages in the form of modules and interfaces and test and debug them. The DBMS must interface with applications, language compilers, operating system components, etc. ď‚— Tool Developers: Design and implement software systems called tools for modeling and designing databases, performance monitoring, prototyping, test data generation, user interface creation, simulation etc. that facilitate building of applications and allow using database effectively. ď‚— Operators and Maintenance Personnel: They manage the actual running and maintenance of the database system hardware and software environment.
  • 56. 56 Advantages of Using the Database Approach ď‚— Controlling redundancy in data storage and in development and maintenance efforts. ď‚— Sharing of data among multiple users. ď‚— Restricting unauthorized access to data. Only the DBA staff uses privileged commands and facilities. ď‚— Providing persistent storage for program Objects ď‚— E.g., Object-oriented DBMSs make program objects persistent– see Chapter 12. ď‚— Providing Storage Structures (e.g. indexes) for efficient Query Processing – see Chapter 17.
  • 57. 57 Advantages of Using the Database Approach (cont.) ď‚— Providing optimization of queries for efficient processing. ď‚— Providing backup and recovery services. ď‚— Providing multiple interfaces to different classes of users. ď‚— Representing complex relationships among data. ď‚— Enforcing integrity constraints on the database. ď‚— Drawing inferences and actions from the stored data using deductive and active rules and triggers.
  • 58. 58 Additional Implications of Using the Database Approach ď‚— Potential for enforcing standards: ď‚— This is very crucial for the success of database applications in large organizations. Standards refer to data item names, display formats, screens, report structures, meta-data (description of data), Web page layouts, etc. ď‚— Reduced application development time: ď‚— Incremental time to add each new application is reduced.
  • 59. 59 Additional Implications of Using the Database Approach (cont.) ď‚— Flexibility to change data structures: ď‚— Database structure may evolve as new requirements are defined. ď‚— Availability of current information: ď‚— Extremely important for on-line transaction systems such as shopping, airline, hotel, car reservations. ď‚— Economies of scale: ď‚— Wasteful overlap of resources and personnel can be avoided by consolidating data and applications across departments.
  • 60. 60 Historical Development of Database Technology ď‚— Early Database Applications: ď‚— The Hierarchical and Network Models were introduced in mid 1960s and dominated during the seventies. ď‚— A bulk of the worldwide database processing still occurs using these models, particularly, the hierarchical model using IBM’s IMS system. ď‚— Relational Model based Systems: ď‚— Relational model was originally introduced in 1970, was heavily researched and experimented within IBM Research and several universities. ď‚— Relational DBMS Products emerged in the early 1980s.
  • 61. 61 ď‚— Object-oriented and emerging applications: ď‚— Object-Oriented Database Management Systems (OODBMSs) were introduced in late 1980s and early 1990s to cater to the need of complex data processing in CAD and other applications. ď‚— Their use has not taken off much. ď‚— Many relational DBMSs have incorporated object database concepts, leading to a new category called object-relational DBMSs (ORDBMSs) ď‚— Extended relational systems add further capabilities (e.g. for multimedia data, text, XML, and other data types) Historical Development of Database Technology (cont.)
  • 62. 62 Historical Development of Database Technology (cont.) ď‚— Data on the Web and E-commerce Applications: ď‚— Web contains data in HTML (Hypertext markup language) with links among pages. ď‚— This has given rise to a new set of applications and E-commerce is using new standards like XML (eXtended Markup Language). (see Ch. 13). ď‚— Script programming languages such as PHP and JavaScript allow generation of dynamic Web pages that are partially generated from a database (see Ch. 11). ď‚— Also allow database updates through Web pages
  • 63. 63 Extending Database Capabilities ď‚— New functionality is being added to DBMSs in the following areas: ď‚— Scientific Applications – Physics, Chemistry, Biology - Genetics ď‚— Earth and Atmospheric Sciences and Astronomy ď‚— XML (eXtensible Markup Language) ď‚— Image Storage and Management ď‚— Audio and Video Data Management ď‚— Data Warehousing and Data Mining – a very major area for future development using new technologies (see Chapters 28-29) ď‚— Spatial Data Management and Location Based Services ď‚— Time Series and Historical Data Management ď‚— The above gives rise to new research and development in incorporating new data types, complex data structures, new operations and storage and indexing schemes in database
  • 64. 64 Extending Database Capabilities (cont.) ď‚— Background since the advent of the 21st Century: ď‚— First decade of the 21st century has seen tremendous growth in user generated data and automatically collected data from applications and search engines. ď‚— Social Media platforms such as Facebook and Twitter are generating millions of transactions a day and businesses are interested to tap into this data to “understand” the users ď‚— Cloud Storage and Backup is making unlimited amount of storage available to users and
  • 65. 65 Extending Database Capabilities (cont.) ď‚— Emergence of Big Data Technologies and NOSQL databases ď‚— New data storage, management and analysis technology was necessary to deal with the onslaught of data in petabytes a day (10**15 bytes or 1000 terabytes) in some applications – this started being commonly called as “Big Data”. ď‚— Hadoop (which originated from Yahoo) and Mapreduce Programming approach to distributed data processing (which originated from Google) as well as the Google file system have given rise to Big Data technologies (Chapter 25). Further enhancements are taking place in the form of Spark based technology. ď‚— NOSQL (Not Only SQL- where SQL is the de facto standard language for relational DBMSs) systems have been designed for rapid search and retrieval from documents, processing of huge graphs occurring on social networks, and other forms of unstructured data with flexible models of transaction processing (Chapter 24).
  • 66. 66 When not to use a DBMS ď‚— Main inhibitors (costs) of using a DBMS: ď‚— High initial investment and possible need for additional hardware. ď‚— Overhead for providing generality, security, concurrency control, recovery, and integrity functions. ď‚— When a DBMS may be unnecessary: ď‚— If the database and applications are simple, well defined, and not expected to change. ď‚— If access to data by multiple users is not required. ď‚— When a DBMS may be infeasible: ď‚— In embedded systems where a general purpose DBMS may not fit in available storage
  • 67. 67 When not to use a DBMS ď‚— When no DBMS may suffice: ď‚— If there are stringent real-time requirements that may not be met because of DBMS overhead (e.g., telephone switching systems) ď‚— If the database system is not able to handle the complexity of data because of modeling limitations (e.g., in complex genome and protein databases) ď‚— If the database users need special operations not supported by the DBMS (e.g., GIS and location based services).
  • 68. 68 Part 2 Database System Concepts and Architecture
  • 69. 69 ď‚§ List data models and their categories ď‚§ Interpret the history of data models ď‚§ Understand schemas, instances, and states ď‚§ Evaluate the Three-Schema Architecture ď‚§ Appraise data independence ď‚§ Name DBMS languages and interfaces ď‚§ Identify database system utilities and tools ď‚§ Know the difference between centralized and client-server architectures ď‚§ Classify DBMSs Learning Objectives
  • 70. 70 ď‚§ Data Models and Their Categories ď‚§ History of Data Models ď‚§ Schemas, Instances, and States ď‚§ Three-Schema Architecture ď‚§ Data Independence ď‚§ DBMS Languages and Interfaces ď‚§ Database System Utilities and Tools ď‚§ Centralized and Client-Server Architectures ď‚§ Classification of DBMSs Outline
  • 71. 71 Data Models ď‚— Data Model: ď‚— A set of concepts to describe the structure of a database, the operations for manipulating these structures, and certain constraints that the database should obey. ď‚— Data Model Structure and Constraints: ď‚— Constructs are used to define the database structure ď‚— Constructs typically include elements (and their data types) as well as groups of elements (e.g. entity, record, table), and relationships among such groups ď‚— Constraints specify some restrictions on valid data; these constraints must be enforced at all times
  • 72. 72 Data Models (continued) ď‚— Data Model Operations: ď‚— These operations are used for specifying database retrievals and updates by referring to the constructs of the data model. ď‚— Operations on the data model may include basic model operations (e.g. generic insert, delete, update) and user-defined operations (e.g. compute_student_gpa, update_inventory)
  • 73. 73 Categories of Data Models ď‚— Conceptual (high-level, semantic) data models: ď‚— Provide concepts that are close to the way many users perceive data. ď‚— (Also called entity-based or object-based data models.) ď‚— Physical (low-level, internal) data models: ď‚— Provide concepts that describe details of how data is stored in the computer. These are usually specified in an ad-hoc manner through DBMS design and administration manuals ď‚— Implementation (representational) data models: ď‚— Provide concepts that fall between the above two, used by many commercial DBMS implementations (e.g. relational data models used in many commercial systems). ď‚— Self-Describing Data Models: ď‚— Combine the description of data with the data values. Examples include XML, key-value stores and some NOSQL systems.
  • 74. 74 Schemas versus Instances ď‚— Database Schema: ď‚— The description of a database. ď‚— Includes descriptions of the database structure, data types, and the constraints on the database. ď‚— Schema Diagram: ď‚— An illustrative display of (most aspects of) a database schema. ď‚— Schema Construct: ď‚— A component of the schema or an object within the schema, e.g., STUDENT, COURSE.
  • 75. 75 Schemas versus Instances ď‚— Database State: ď‚— The actual data stored in a database at a particular moment in time. This includes the collection of all the data in the database. ď‚— Also called database instance (or occurrence or snapshot). ď‚— The term instance is also applied to individual database components, e.g. record instance, table instance, entity instance
  • 76. 76 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 state when it is initially loaded into the system. ď‚— Valid State: ď‚— A state that satisfies the structure and constraints of the database.
  • 77. 77 ď‚— Distinction ď‚— The database schema changes very infrequently. ď‚— The database state changes every time the database is updated. ď‚— Schema is also called intension. ď‚— State is also called extension. Database Schema vs. Database State (cont.)
  • 78. 78 Example of a Database Schema
  • 79. 79 Example of a database state
  • 80. 80 Three-Schema Architecture ď‚— Proposed to support DBMS characteristics of: ď‚— Program-data independence. ď‚— Support of multiple views of the data. ď‚— Not explicitly used in commercial DBMS products, but has been useful in explaining database system organization
  • 81. 81 Three-Schema Architecture ď‚— Defines DBMS schemas at three levels: ď‚— Internal schema at the internal level to describe physical storage structures and access paths (e.g indexes). ď‚— Typically uses a physical data model. ď‚— Conceptual schema at the conceptual level to describe the structure and constraints for the whole database for a community of users. ď‚— Uses a conceptual or an implementation data model. ď‚— External schemas at the external level to describe the various user views. ď‚— Usually uses the same data model as the conceptual schema.
  • 83. 83 Three-Schema Architecture (cont.) ď‚— Mappings among schema levels are needed to transform requests and data. ď‚— Programs refer to an external schema, and are mapped by the DBMS to the internal schema for execution. ď‚— Data extracted from the internal DBMS level is reformatted to match the user’s external view (e.g. formatting the results of an SQL query for display in a Web page)
  • 84. 84 Data Independence ď‚— Logical Data Independence: ď‚— The capacity to change the conceptual schema without having to change the external schemas and their associated application programs. ď‚— Physical Data Independence: ď‚— The capacity to change the internal schema without having to change the conceptual schema. ď‚— For example, the internal schema may be changed when certain file structures are reorganized or new indexes are created to improve database performance
  • 85. 85 Data Independence (cont.) ď‚— When a schema at a lower level is changed, only the mappings between this schema and higher- level schemas need to be changed in a DBMS that fully supports data independence. ď‚— The higher-level schemas themselves are unchanged. ď‚— Hence, the application programs need not be changed since they refer to the external schemas.
  • 86. 86 DBMS Languages ď‚— Data Definition Language (DDL) ď‚— Data Manipulation Language (DML) ď‚— High-Level or Non-procedural Languages: These include the relational language SQL ď‚— May be used in a standalone way or may be embedded in a programming language ď‚— Low Level or Procedural Languages: ď‚— These must be embedded in a programming language
  • 87. 87 DBMS Languages (cont.) ď‚— Data Definition Language (DDL): ď‚— Used by the DBA and database designers to specify the conceptual schema of a database. ď‚— In many DBMSs, the DDL is also used to define internal and external schemas (views). ď‚— In some DBMSs, separate storage definition language (SDL) and view definition language (VDL) are used to define internal and external schemas. ď‚— SDL is typically realized via DBMS commands provided to the DBA and database designers
  • 88. 88 DBMS Languages (cont.) ď‚— Data Manipulation Language (DML): ď‚— Used to specify database retrievals and updates ď‚— DML commands (data sublanguage) can be embedded in a general-purpose programming language (host language), such as COBOL, C, C++, or Java. ď‚— A library of functions can also be provided to access the DBMS from a programming language ď‚— Alternatively, stand-alone DML commands can be applied directly (called a query language).
  • 89. 89 Types of DML ď‚— High Level or Non-procedural Language: ď‚— For example, the SQL relational language ď‚— Are “set”-oriented and specify what data to retrieve rather than how to retrieve it. ď‚— Also called declarative languages. ď‚— Low Level or Procedural Language: ď‚— Retrieve data one record-at-a-time; ď‚— Constructs such as looping are needed to retrieve multiple records, along with positioning pointers.
  • 90. 90 DBMS Interfaces ď‚— Stand-alone query language interfaces ď‚— Example: Entering SQL queries at the DBMS interactive SQL interface (e.g. SQL*Plus in ORACLE) ď‚— Programmer interfaces for embedding DML in programming languages ď‚— User-friendly interfaces ď‚— Menu-based, forms-based, graphics-based, etc. ď‚— Mobile Interfaces:interfaces allowing users to perform transactions using mobile apps
  • 91. 91 DBMS Programming Language Interfaces ď‚— Programmer interfaces for embedding DML in a programming languages: ď‚— Embedded Approach: e.g embedded SQL (for C, C++, etc.), SQLJ (for Java) ď‚— Procedure Call Approach: e.g. JDBC for Java, ODBC (Open Databse Connectivity) for other programming languages as API’s (application programming interfaces) ď‚— Database Programming Language Approach: e.g. ORACLE has PL/SQL, a programming language based on SQL; language incorporates SQL and its data types as integral components ď‚— Scripting Languages: PHP (client-side scripting) and Python (server-side scripting) are used to write database programs.
  • 92. 92 User-Friendly DBMS Interfaces ď‚— Menu-based (Web-based), popular for browsing on the web ď‚— Forms-based, designed for naĂŻve users used to filling in entries on a form ď‚— Graphics-based ď‚— Point and Click, Drag and Drop, etc. ď‚— Specifying a query on a schema diagram ď‚— Natural language: requests in written English ď‚— Combinations of the above: ď‚— For example, both menus and forms used extensively in Web database interfaces
  • 93. 93 Other DBMS Interfaces ď‚— Natural language: free text as a query ď‚— Speech : Input query and Output response ď‚— Web Browser with keyword search ď‚— Parametric interfaces, e.g., bank tellers using function keys. ď‚— Interfaces for the DBA: ď‚— Creating user accounts, granting authorizations ď‚— Setting system parameters ď‚— Changing schemas or access paths
  • 94. 94 Database System Utilities ď‚— To perform certain functions such as: ď‚— Loading data stored in files into a database. Includes data conversion tools. ď‚— Backing up the database periodically on tape. ď‚— Reorganizing database file structures. ď‚— Performance monitoring utilities. ď‚— Report generation utilities. ď‚— Other functions, such as sorting, user monitoring, data compression, etc.
  • 95. 95 Other Tools ď‚— Data dictionary / repository: ď‚— Used to store schema descriptions and other information such as design decisions, application program descriptions, user information, usage standards, etc. ď‚— Active data dictionary is accessed by DBMS software and users/DBA. ď‚— Passive data dictionary is accessed by users/DBA only.
  • 96. 96 Other Tools ď‚— Application Development Environments and CASE (computer-aided software engineering) tools: ď‚— Examples: ď‚— PowerBuilder (Sybase) ď‚— JBuilder (Borland) ď‚— JDeveloper 10G (Oracle)
  • 98. 98 Centralized and Client-Server DBMS Architectures ď‚— Centralized DBMS: ď‚— Combines everything into single system including- DBMS software, hardware, application programs, and user interface processing software. ď‚— User can still connect through a remote terminal – however, all processing is done at centralized site.
  • 100. 100 Basic 2-tier Client-Server Architectures ď‚— Specialized Servers with Specialized functions ď‚— Print server ď‚— File server ď‚— DBMS server ď‚— Web server ď‚— Email server ď‚— Clients can access the specialized servers as needed
  • 101. 101 Logical two-tier client server architecture
  • 102. 102 Clients ď‚— Provide appropriate interfaces through a client software module to access and utilize the various server resources. ď‚— Clients may be diskless machines or PCs or Workstations with disks with only the client software installed. ď‚— Connected to the servers via some form of a network. ď‚— (LAN: local area network, wireless network, etc.)
  • 103. 103 DBMS Server ď‚— Provides database query and transaction services to the clients ď‚— Relational DBMS servers are often called SQL servers, query servers, or transaction servers ď‚— Applications running on clients utilize an Application Program Interface (API) to access server databases via standard interface such as: ď‚— ODBC: Open Database Connectivity standard ď‚— JDBC: for Java programming access
  • 104. 104 Two Tier Client-Server Architecture ď‚— Client and server must install appropriate client module and server module software for ODBC or JDBC ď‚— A client program may connect to several DBMSs, sometimes called the data sources. ď‚— In general, data sources can be files or other non- DBMS software that manages data. ď‚— See Chapter 10 for details on Database Programming
  • 105. 105 Three Tier Client-Server Architecture ď‚— Common for Web applications ď‚— Intermediate Layer called Application Server or Web Server: ď‚— Stores the web connectivity software and the business logic part of the application used to access the corresponding data from the database server ď‚— Acts like a conduit for sending partially processed data between the database server and the client. ď‚— Three-tier Architecture Can Enhance Security: ď‚— Database server only accessible via middle tier ď‚— Clients cannot directly access database server ď‚— Clients contain user interfaces and Web browsers ď‚— The client is typically a PC or a mobile device connected to the Web
  • 107. 107 Classification of DBMSs ď‚— Based on the data model used ď‚— Legacy: Network, Hierarchical. ď‚— Currently Used: Relational, Object-oriented, Object- relational ď‚— Recent Technologies: Key-value storage systems, NOSQL systems: document based, column-based, graph-based and key-value based. Native XML DBMSs. ď‚— Other classifications ď‚— Single-user (typically used with personal computers) vs. multi-user (most DBMSs). ď‚— Centralized (uses a single computer with one database) vs. distributed (multiple computers, multiple DBs)
  • 108. 108 Variations of Distributed DBMSs (DDBMSs) ď‚— Homogeneous DDBMS ď‚— Heterogeneous DDBMS ď‚— Federated or Multidatabase Systems ď‚— Participating Databases are loosely coupled with high degree of autonomy. ď‚— Distributed Database Systems have now come to be known as client-server based database systems because: ď‚— They do not support a totally distributed environment, but rather a set of database servers supporting a set of clients.
  • 109. 109 Cost considerations for DBMSs ď‚— Cost Range: from free open-source systems to configurations costing millions of dollars ď‚— Examples of free relational DBMSs: MySQL, PostgreSQL, others ď‚— Commercial DBMS offer additional specialized modules, e.g. time-series module, spatial data module, document module, XML module ď‚— These offer additional specialized functionality when purchased separately ď‚— Sometimes called cartridges (e.g., in Oracle) or blades ď‚— Different licensing options: site license, maximum number of concurrent users (seat license), single user, etc.
  • 110. 110 Other Considerations ď‚§ Type of access paths within database system ď‚— E.g.- inverted indexing based (ADABAS is one such system).Fully indexed databases provide access by any keyword (used in search engines) ď‚§ General Purpose vs. Special Purpose ď‚— E.g.- Airline Reservation systems or many others- reservation systems for hotel/car etc. Are special purpose OLTP (Online Transaction Processing Systems)
  • 112. 112 ď‚— Network Model ď‚— Hierarchical Model ď‚— Relational Model ď‚— Object-oriented Data Models ď‚— Object-Relational Models History of Data Models
  • 113. 113 History of Data Models ď‚— Network Model: ď‚— The first network DBMS was implemented by Honeywell in 1964-65 (IDS System). ď‚— Adopted heavily due to the support by CODASYL (Conference on Data Systems Languages) (CODASYL - DBTG report of 1971). ď‚— Later implemented in a large variety of systems - IDMS (Cullinet - now Computer Associates), DMS 1100 (Unisys), IMAGE (H.P. (Hewlett-Packard)), VAX -DBMS (Digital Equipment Corp., next COMPAQ, now H.P.).
  • 114. 114 Network Model ď‚— Advantages: ď‚— Network Model is able to model complex relationships and represents semantics of add/delete on the relationships. ď‚— Can handle most situations for modeling using record types and relationship types. ď‚— Language is navigational; uses constructs like FIND, FIND member, FIND owner, FIND NEXT within set, GET, etc. ď‚— Programmers can do optimal navigation through the database.
  • 115. 115 Network Model ď‚— Disadvantages: ď‚— Navigational and procedural nature of processing ď‚— Database contains a complex array of pointers that thread through a set of records. ď‚— Little scope for automated “query optimization”
  • 116. 116 History of Data Models ď‚— Hierarchical Data Model: ď‚— Initially implemented in a joint effort by IBM and North American Rockwell around 1965. Resulted in the IMS family of systems. ď‚— IBM’s IMS product had (and still has) a very large customer base worldwide ď‚— Hierarchical model was formalized based on the IMS system ď‚— Other systems based on this model: System 2k (SAS inc.)
  • 117. 117 Hierarchical Model ď‚— Advantages: ď‚— Simple to construct and operate ď‚— Corresponds to a number of natural hierarchically organized domains, e.g., organization (“org”) chart ď‚— Language is simple: ď‚— Uses constructs like GET, GET UNIQUE, GET NEXT, GET NEXT WITHIN PARENT, etc. ď‚— Disadvantages: ď‚— Navigational and procedural nature of processing ď‚— Database is visualized as a linear arrangement of records ď‚— Little scope for "query optimization"
  • 118. 118 History of Data Models ď‚— Relational Model: ď‚— Proposed in 1970 by E.F. Codd (IBM), first commercial system in 1981-82. ď‚— Now in several commercial products (e.g. DB2, ORACLE, MS SQL Server, SYBASE, INFORMIX). ď‚— Several free open source implementations, e.g. MySQL, PostgreSQL ď‚— Currently most dominant for developing database applications. ď‚— SQL relational standards: SQL-89 (SQL1), SQL-92 (SQL2), SQL-99, SQL3, … ď‚— Chapters 5 through 11 describe this model in detail
  • 119. 119 History of Data Models ď‚— Object-oriented Data Models: ď‚— Several models have been proposed for implementing in a database system. ď‚— One set comprises models of persistent O-O Programming Languages such as C++ (e.g., in OBJECTSTORE or VERSANT), and Smalltalk (e.g., in GEMSTONE). ď‚— Additionally, systems like O2, ORION (at MCC - then ITASCA), IRIS (at H.P.- used in Open OODB). ď‚— Object Database Standard: ODMG-93, ODMG-version 2.0, ODMG-version 3.0. ď‚— Chapter 12 describes this model.
  • 120. 120 History of Data Models ď‚— Object-Relational Models: ď‚— The trend to mix object models with relational was started with Informix Universal Server. ď‚— Relational systems incorporated concepts from object databases leading to object-relational. ď‚— Exemplified in the versions of Oracle, DB2, and SQL Server and other DBMSs. ď‚— Current trend by Relational DBMS vendors is to extend relational DBMSs with capability to process XML, Text and other data types. ď‚— The term “Object-relational” is receding in the marketplace.
  • 122. 122 References ď‚§ Ramez Elmasri, Shamkant Navathe; “Fundamentals of Database Systems”, 6th Ed., Pearson, 2014. ď‚§ Mark L. Gillenson; “Fundamentals of Database Management Systems”, 2nd Ed., John Wiley, 2012. ď‚§ Universität Hamburg, Fachbereich Informatik, EinfĂĽhrung in Datenbanksysteme, Lecture Notes, 1999