Unit-IV; Professional Sales Representative (PSR).pptx
01 dbms-introduction
1. Database Management Systems
Overview of Database Systems
DBMS: Overview of DB Systems 1 Dr. Kriengkrai Porkaew
2. Overview of DB Systems
• Objectives and Outline
– to study …
• The definition of database systems
• The importance of database systems
• Data abstraction and database models
• Database languages
• Database system components
• Users and creators of database systems
• Database products and applications
• Database research and trends
DBMS: Overview of DB Systems 2 Dr. Kriengkrai Porkaew
3. Database Systems: Definition
• A Database System (DBS) consists of
– A Database (DB) and
– A Database Management System (DBMS)
– A Database is
• a collection of well-organized and interrelated data
– A Database Management System is
• a set of programs to manipulate those data
DBMS: Overview of DB Systems 3 Dr. Kriengkrai Porkaew
4. Goals of DBMSs
• To provide a way to store and retrieve database
information conveniently and efficiently.
• DBMSs must meet the following requirements:
– Data Persistency
• The data must outlast their creators
– System Reliability
• The system must be able to recover correctly and promptly, if
crash
– Scalability
• The system must be able to handle large numbers of data
and lots of users
DBMS: Overview of DB Systems 4 Dr. Kriengkrai Porkaew
5. Management of Data
• DBMSs are responsible for management of data,
which involves
– defining structures for storing information (DDL)
– providing mechanisms for manipulating information (DML)
– ensuring the safety of the information stored, despite
system crashes (System Reliability) or attempts at
unauthorized access (System Security)
– avoiding possible anomalous results if / when data are to
be shared among several users (Concurrency Control)
– supporting large amount of data and concurrent users
(Scalability)
DBMS: Overview of DB Systems 5 Dr. Kriengkrai Porkaew
6. The Importance of DB Systems
• Before the advent of DB Systems
– File systems are used to store data.
– File systems do not provide mechanisms for data
management
– Programmers need to do a lot of data management
tasks
• Defining data structures
• Manipulating data: inserting, searching, updating,
deleting
• Maintaining data consistency and data integrity
• Handling data access permission
• Controlling concurrent data access
DBMS: Overview of DB Systems 6 Dr. Kriengkrai Porkaew
7. File Systems vs. Database Systems
File Systems Database Systems
Data redundancy Data consistency
Difficult data access Simple data access
Integrity problem Integrity constraint
Atomicity problem Ensure atomicity
Concurrent access anomalies Concurrency control
Security problem Authorization mechanism
Long development Short development
Tightly-couple data-program Data independence
relationship
DBMS: Overview of DB Systems 7 Dr. Kriengkrai Porkaew
8. Disadvantages of DB Systems
• Do not use a DB system if • Overhead of using a DB
– the DBMS does not support system
the types of queries or – installation / configuration
functionality required by the
applications overhead
• since the DBMS cannot fulfill • difficult to setup
the needs – operating overhead
• e.g., presentation, calculation • concurrency control,
– transaction support, atomicity and durability
persistent storage, and guarantee, etc.
many other dominant – price
features that the DBMS • hardware, software,
provides are not needed maintenance, and support
• since the DBMS imposes too
high overhead
• e.g., data caching, logging 8
DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew
9. Data Abstraction
• A major purpose of a database system is to
provide users with an abstract view of the data.
• The system hides certain details of how the data
are stored and maintained.
• For ease of use, simple user interfaces are
provided to users.
• For efficiency, complex data structures are
used to represent data in the database.
DBMS: Overview of DB Systems 9 Dr. Kriengkrai Porkaew
10. View of Data
• There are multiple levels of data abstraction.
• E.g., Data of a person can be viewed as …
– High-level: medical records, academic background
– Intermediate-level: name (alphabetic), age (numeric),
gender (enumeration: Male/Female)
– Low-level: sequences of bits, bytes, and blocks
• In 1978, “ANSI/SPARC” architecture defines
three levels of data abstraction
– External Level (View)
– Conceptual Level (Logical)
– Internal Level (Physical)
DBMS: Overview of DB Systems 10 Dr. Kriengkrai Porkaew
11. ANSI/SPARC Architecture
• In ANSI/SPARC Architecture, a database contains
– View schemas
• describe different views of the database (External Level)
– Logical schema
• describes the design at the logical level (Conceptual Level)
– Physical schema
• describes the design at the physical level (Internal Level)
• A Schema of a database
– Is the overall structures of the data in the database and their
relationships
– Schemas change infrequently while data change consistently.
DBMS: Overview of DB Systems 11 Dr. Kriengkrai Porkaew
12. Levels of Data Abstraction
• View Level
– only parts of the entire
database
• Logical Level
– what data are stored in
the database and
– what relationships exist
among those data.
• Physical Level
– how data are actually
stored
DBMS: Overview of DB Systems 12 Dr. Kriengkrai Porkaew
13. DBMS
Data Independence
• Data Independence
– Lower-level schema changes will not effect upper-level
schemas and applications
• Physical Data Independence
– if physical schema changes do not affect application
programs.
– That is, application programs do not depend on physical
schema (but depend on a logical schema or a view schema).
• Logical Data Independence
– if logical schema changes do not affect application programs.
– That is, application programs do not depend on logical
schema (but depend on some views).
DBMS: Overview of DB Systems 13 Dr. Kriengkrai Porkaew
14. DB Models and History
• 1961, Charles Bachman (1973 Turing Award) designed GE’s
Integrated Data Store: IDS – the predecessor of Network Model.
• Late 1960s, IBM built “Information Management System: IMS”
Hierarchical Model.
• Late 1960s, CODASYL group defined/standardized Network Model.
• 1969, Relational Model by Edgar Codd [IBM] (1981 Turing Award).
• 1970s, SEQUEL (SQL), QBE; QUEL, System R (DB2), Ingres
• 1976, Entity-Relationship Model by Peter Chen
• 1980s, DB2, Oracle, Sybase, Informix, DBase, Paradox, …
• 1986, SQL Standard
• 1980s, distributed databases
• 1998, James Gray received Turing Award in Transaction Management.
• 1990s-2000s, OODB, ORDB (Postgres); Data Warehouse, OLAP,
Data Mining, GIS, Mobile DB, Multimedia DB, Web DB, XML DB, …
DBMS: Overview of DB Systems 14 Dr. Kriengkrai Porkaew
15. Data Models
• Hierarchical Model • Object-Oriented Model
– the first DB model – mostly for special purposes
– e.g., IMS, System 2000 – e.g., ObjectStore, Gemstone,
• Network Model Ontos, O2, Jasmine, Cache,
– DBTG standard; after IDS …
– e.g., IDMS, Total, … • Object-Relational Model
• Relational Model – extends the relational model
– the most widely used now – e.g., Postgres, Informix, DB2,
Oracle, …
– e.g., System R, Ingres, …
• *Semi-structured Data*
• Entity-Relationship Model
– focus on data in XML format
– a conceptual model
DBMS: Overview of DB Systems 15 Dr. Kriengkrai Porkaew
16. Data Models – Diagrams
Hierarchical and Network
customer account
own
name address number balance
customer account
name address number balance Network data-structure diagram
customer account
virtual account virtual customer name address number balance
custlink acctlink
Hierarchical tree-structure diagram
dummy
DBTG data-structure diagram
DBMS: Overview of DB Systems 16 Dr. Kriengkrai Porkaew
17. Data Models – Diagrams
Relational, ER, OO
name address number balance
customer own account
customer owner account Entity-Relationship diagram
# name # name # number
address # number balance
Relational schema diagram
customer account
name 1..* 0..*
number
address balance
UML class diagram (OO Model)
DBMS: Overview of DB Systems 17 Dr. Kriengkrai Porkaew
18. Database Languages
• Data Definition Language (DDL)
– to specify the database schema.
– Database schemas are stored in the data dictionary.
– The data dictionary contains metadata.
– Metadata: data about data, e.g. schema.
• Data Manipulation Language (DML)
– to express database queries and updates (include
insertion, deletion, and modification)
– Procedural DMLs -and- Declarative DMLs
DBMS: Overview of DB Systems 18 Dr. Kriengkrai Porkaew
19. DB Languages: Examples
Relational Model (SQL):
Hierarchical Model (DL/I): DDL:
DML: create table customer (
get first customer name char(30),
where customer.name:=“Henry”; address char(60));
DML:
Network Model (DBTG): select address
DDL: from customer
set name is custlink where name likes “Robert”;
owner is customer
member is dummy; Object-Oriented Model (ODMG):
DML: DDL:
customer.name := “Newton”; class customer:public object {
find any customer using name; string name;
get customer; string address;
print(customer.address); set<ref<account>> accounts;
};
DBMS: Overview of DB Systems 19 Dr. Kriengkrai Porkaew
20. Data Manipulation Languages
• Procedural DMLs
– require a user to specify what data are needed and how to get
those data
– e.g., relational algebra; (C, Pascal, Java, etc.)
• Declarative DMLs (nonprocedural DMLs)
– require a user to specify what data are needed without specifying
how to get those data
– e.g. relational tuple calculus, relational domain calculus,
SQL (core), Quel, QBE, Datalog; (Prolog)
• A Query Language
– is a part of DML that involves only retrieval of information (without
updates)
– However, a query language often means DML
DBMS: Overview of DB Systems 20 Dr. Kriengkrai Porkaew
21. What are the components
of DBMSs?
• A database system
– is partitioned into modules that deal with each of the
responsibilities of the overall system.
• The functional components of a database system can be
broadly divided into
– the Query Processor Component: to simplify and facilitate
access to data (convenient and efficient)
– the Storage Manager Component: to minimize the need to
move data between disk and main memory
– the Transaction Manager Component: to handle atomicity
and concurrency of transactions and consistency and
durability of the databases
DBMS: Overview of DB Systems 21 Dr. Kriengkrai Porkaew
22. Query Processor Component
• Query Processor:
– A program module that provides the interface
between the database and the application
programs/queries
• Components include:
– DDL interpreter
• interprets DDL commands and records them in the
data dictionary
– DML compiler
• translates DML commands into query evaluation
plans
– Query evaluation engine
• executes queries according to the plans
DBMS: Overview of DB Systems 22 Dr. Kriengkrai Porkaew
23. Storage Manager Component
• A Storage Manager is
– A program module that provides the interface
between the low-level data stored in the database
and the application programs/queries submitted to the
system
• Components include:
– Authorization and integrity manager
– File manager
– Buffer manager
• Structures maintained:
– data files, data dictionary, indices
DBMS: Overview of DB Systems 23 Dr. Kriengkrai Porkaew
24. Transaction Manager Component
• Transaction:
– a collection of operations that performs as a single logical
function in a database application.
• Transaction Properties: ACID
– A tomicity: either all operations succeed or all of them fail
– C onsistency: the database is changed from one consistent
state to another consistent state
– I solation: no transaction interfere other transactions in the
middle
– D urability: operations of successful transactions must persist
• Components include
– Transaction Manager
– Lock Manager
– Recovery Manager
DBMS: Overview of DB Systems 24 Dr. Kriengkrai Porkaew
25. DB System Structure
application queries schemas
programs
API module DML compiler DDL interpreter
query processor and optimizer
buffer
transaction manager manager
recovery
concurrency control manager
storage
lock manager manager
index
data dictionary
data
DBMS: Overview of DB Systems 25 Dr. Kriengkrai Porkaew
26. Who interact with DBMSs?
• Database Administrators (DBAs)
• Database Operators
• Database Designers
• DB Application Developers/Programmers
• End Users
– Sophisticated End Users
– Naïve End Users
• DB System Designers and Implementers
• Database Tool Developers
DBMS: Overview of DB Systems 26 Dr. Kriengkrai Porkaew
27. DB Administrators (DBAs)
and DB Operators
• DBAs are responsible for
– Starting up and shutting down the databases
– Loading, importing, exporting data to/from the
databases
– Granting of authorization for using resources
– Monitoring the use of the resources
– Backing up the databases periodically and restoring
the databases as needed
– Tuning the system performance
– Considering software and hardware upgrades
• DB Operators are responsible for
– {Helping DBAs maintaining normal DB operations}
DBMS: Overview of DB Systems 27 Dr. Kriengkrai Porkaew
28. DB Designers and
DB Developers / Programmers
• Database Designers are responsible for
– Analyzing data requirements
– Designing the database structures
• View, logical, and physical structures
– Creating the databases
• DB Application Developers / Programmers
– Analyzing functional requirements
– Developing program specifications from the
requirements
– Implementing those application programs
DBMS: Overview of DB Systems 28 Dr. Kriengkrai Porkaew
29. End Users
• Sophisticated End Users
– Writing ad hoc queries to answer their own needs
– Running ad hoc reports for executives/managers
• Naïve End Users
– Using customized applications developed by
developers/programmers
• Data entry operators, …
• Executives, managers, …
DBMS: Overview of DB Systems 29 Dr. Kriengkrai Porkaew
30. Participants on the implementation side
of the database systems
• DB System Designers and Implementers
– Designing the structures and the functions of each
component of the DBMSs
– Implementing database components
• File organizations, index structures, query processing,
transaction management, DB API, user interface, …
• DB Tool Developers
– Designing and implementing tools for databases
• Database design tools, application development tools,
performance tuning tools, database administration tools, …
DBMS: Overview of DB Systems 30 Dr. Kriengkrai Porkaew
31. Very Important Participants
• Leaders in DB Industry Leaders in DB Research
•
– Leading Universities
– Oracle • Stanford U.
• ORACLE, RDB
• UC Berkeley {Ingres, Postgres}
– IBM • U of MD - College Park
• DB2, Informix • U of Wisconsin - Madison
– Microsoft – Research Labs
• SQL Server, Access, FoxPro • IBM {System R, SQL, …}
• ODBC, ADO • Microsoft
• Bell Lab
– Sybase
• Sybase – Conferences/Journals
• SIGMOD/POD, VLDB, EDBT,
ICDE, RIDE, TKDE, …
DBMS: Overview of DB Systems 31 Dr. Kriengkrai Porkaew
32. DBMS Market Share
Windows 1999 2000 2001
New Licenses Revenue 2.4 B 2.5 B
Revenue in Billion USD ORACLE 40.4% 38.1% 34.0%
IBM 15.2% 19.9% 20.7%
1999 2000 2001 Microsoft 35.2% 35.4% 39.9%
Revenue
7.9 B 8.8 B 8.8 B
ORACLE 31.4% 33.8% 32.0% Unix 2000 2001
IBM 29.9% 30.1% 34.6% Revenue 3.6 B 3.0 B
Microsoft 13.1% 14.9% 16.3% ORACLE 66.2% 63.3%
Sybase ? 3.2% 2.6% IBM 14.4% 24.7%
Informix ? 3.0% – Informix 6.7% –
Source: Gartner Dataquest
DBMS: Overview of DB Systems 32 Dr. Kriengkrai Porkaew
33. Some Database Related Products
• Commercial Products
– Relational: Access, DB2, DBASE, FoxPro, Informix, Interbase,
ORACLE, Paradox, RDB, SQL Server, Sybase, ThinkDB,
UniSQL, etc.
– OO: Cachè, Exodus, Gemstone, Iris, Jasmine, O2, Objectivity,
ObjectStore, ODE, ONTOS, Orion, Versant, etc.
– Hierarchical: IMS
• Free/Open Source Products
– Ingres, mSQL, MySQL, Postgres, etc.
• Database APIs
– ODBC, JDBC, ADO, …
DBMS: Overview of DB Systems 33 Dr. Kriengkrai Porkaew
34. Examples of DB System
Applications
• Accounting • Manufacturing
• Airlines • Telecommunication
• Banking • Tourism
• Finance • Transportation
• Hospitals • Sales
• Human Resources • Universities
• Inventory • … (you name it) …
DBMS: Overview of DB Systems 34 Dr. Kriengkrai Porkaew
35. Trends of Database Products
• Present and Future: A Complete
System
• Past and Present: to – multimedia/complex data
management
support large amount of
data and concurrent users – advanced OLTP: workflow
– application development tools
– data management of
well-structured data – data repository: warehouse, data
mart
– on-line transaction
– data analysis tools:
processing (OLTP)
• Online Analytical Processing
(OLAP)
– “Scalability” • Data Mining
– a well-rounded system
• web-enable, network-enable,
• XML-compliant, multi-model
DBMS: Overview of DB Systems 35 Dr. Kriengkrai Porkaew
36. DBMS Architectures
• Based on the number of users:
– Single-user Systems
• Only one user (one session) uses the system at a time
– Multi-user Systems
• Multiple users use the system at the same time
• Based on the locations of the databases and their
users
– Stand-alone DBMSs
• One DBMS supports its user(s) on the same machine
– Client-Server (Centralized) DBMSs
• One database server serves multiple clients
– Distributed DBMSs
• Coordination of multiple DBMSs
DBMS: Overview of DB Systems 36 Dr. Kriengkrai Porkaew
37. Distributed DB Systems
• Distributed DBMSs
– Homogeneous Database Systems
• Multiple subsystems which are of the same
architectures spread around multiple remote sites
– E.g., A system of multiple ORACLE on multiple computers at
multiple remote sites
– Heterogeneous Database Systems
• Multiple systems which are of different architectures
– E.g., A system of one DB2 + one SQL Server
– Federated Database Systems
– Also known as Multidatabase Systems
• A kind of Heterogeneous Database Systems where
each DBMS of the whole system has their own
autonomy
DBMS: Overview of DB Systems 37 Dr. Kriengkrai Porkaew
38. Distributed DBMSs
ORACLE
ORACLE
SQL Server
Federated DBMS
Homogeneous
Heterogeneous
ORACLE
ORACLE DB2
DBMS: Overview of DB Systems 38 Dr. Kriengkrai Porkaew
39. DB Application Architectures
• Client-Server (C/S)
– Client machine: the database users work
– Server machine: the database system runs
• C/S: Two-tier architecture: small systems
– Client: the DB users and the DB application
– Server: the DB system
• C/S: Three-tier architecture: large systems, web
– Client sends requests to the application server
– Application Server runs the application as a server for
the client and as a client of the database server
– Database Server runs the DBMS
DBMS: Overview of DB Systems 39 Dr. Kriengkrai Porkaew
40. Client/Server Architecture
Two-Tier Database Layer Application Layer
Architecture 1
Three-Tier
2
Architecture
Presentation
Database Layer
2 1 Layer
3 4
Business Logic Layer
DBMS: Overview of DB Systems 40 Dr. Kriengkrai Porkaew
41. What architectures are they?
• A DBMS on a mainframe with multiple users; one on
each terminal?
• A DBMS on a PC running a web server that accesses
the DBMS to provide services to its users?
• A system connecting DBMSs of multiple companies
together?
• A system with a java application running on a web
browser that sends requests to the web server which
accesses a database on another machine?
DBMS: Overview of DB Systems 41 Dr. Kriengkrai Porkaew
42. Specialized/Advanced DBMSs
• Active DB Systems • Multimedia DB Systems
• Data Warehouses • Parallel DBMSs
• Deductive DB Systems • Text DB Systems
• Genome DB Systems • Temporal DB Systems
• Geographic Information • Spatial DB Systems
Systems • Spatio-temporal DB
• Main Memory DB Systems
Systems • XML DB Systems
• Mobile DB Systems
DBMS: Overview of DB Systems 42 Dr. Kriengkrai Porkaew
43. Conclusion
Questions and Answers
DBMS: Overview of DB Systems 43 Dr. Kriengkrai Porkaew