01 Introduction
01 Introduction
1.1
Text book
1.2
Weightage Distribution among Assessment
Tools
1.3
Examinations schedule
1.4
Database Applications Examples
Enterprise Information
• Sales: customers, products, purchases
• Accounting: payments, receipts, assets
• Human Resources: Information about employees, salaries, payroll
taxes.
Manufacturing: management of production, inventory, orders, supply
chain.
Banking and finance
• customer information, accounts, loans, and banking transactions.
• Credit card transactions
• Finance: sales and purchases of financial instruments (e.g., stocks
and bonds; storing real-time market data
Universities: registration, grades
1.7
Database Applications Examples (Cont.)
1.8
Purpose of Database Systems
In the early days, database applications were built directly on top of file
systems, which leads to:
Data redundancy and inconsistency: data is stored in multiple file
formats resulting in duplication of information in different files
Difficulty in accessing data
• Need to write a new program to carry out each new task
Data isolation
• Multiple files and formats
Integrity problems
• Integrity constraints (e.g., account balance > 0) become “buried”
in program code rather than being stated explicitly
• Hard to add new constraints or change existing ones
1.9
Purpose of Database Systems (Cont.)
Atomicity of updates
• Failures may leave database in an inconsistent state with partial
updates carried out
• Example: Transfer of funds from one account to another should either
complete or not happen at all
Concurrent access by multiple users
• Concurrent access needed for performance
• Uncontrolled concurrent accesses can lead to inconsistencies
Ex: Two people reading a balance (say 100) and updating it by
withdrawing money (say 50 each) at the same time
Security problems
• Hard to provide user access to some, but not all, data
1.10
Data Models
A collection of tools for describing
• Data
• Data relationships
• Data semantics
• Data constraints
Relational model
Entity-Relationship data model (mainly for database design)
Object-based data models (Object-oriented and Object-relational)
Semi-structured data model (XML)
Other older models:
• Network model
• Hierarchical model
1.13
Relational Model
Columns
Rows
Ted Codd
Turing Award 1981
1.14
A Sample Relational Database
1.15
Levels of Abstraction
1.16
View of Data
1.17
Instances and Schemas
1.18
Physical Data Independence
1.19
Data Definition Language (DDL)
• Authorization
Who can access what
1.20
Data Manipulation Language (DML)
1.21
SQL Query Language
1.22
Database Access from Application Program
1.23
Database Design
1.24
Database Engine
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 divided into
• The storage manager,
• The query processor component,
• The transaction management component.
1.25
Storage Manager
A program module that provides the interface between the low-level data
stored in the database and the application programs and queries
submitted to the system.
The storage manager is responsible to the following tasks:
• Interaction with the OS file manager
• Efficient storing, retrieving and updating of data
The storage manager components include:
• Authorization and integrity manager
• Transaction manager
• File manager
• Buffer manager
1.26
Storage Manager (Cont.)
The storage manager implements several data structures as part of the
physical system implementation:
• Data files -- store the database itself
• Data dictionary -- stores metadata about the structure of the
database, in particular the schema of the database.
• Indices -- can provide fast access to data items. A database index
provides pointers to those data items that hold a particular value.
1.27
Query Processor
1.28
Query Processing
1.29
Transaction Management
1.30
Database Architecture
Centralized databases
• One to a few cores, shared memory
Client-server,
• One server machine executes work on behalf of multiple client
machines.
Parallel databases
• Many core shared memory
• Shared disk
• Shared nothing
Distributed databases
• Geographical distribution
• Schema/data heterogeneity
1.31
Database Architecture
(Centralized/Shared-Memory)
1.32
Database Applications
1.33
Two-tier and three-tier architectures
1.34
Database Users
1.35
Database Administrator
A person who has central control over the system is called a database
administrator (DBA). Functions of a DBA include:
Schema definition
Storage structure and access-method definition
Schema and physical-organization modification
Granting of authorization for data access
Routine maintenance
Periodically backing up the database
Ensuring that enough free disk space is available for normal
operations, and upgrading disk space as required
Monitoring jobs running on the database
1.36
History of Database Systems
1.37
History of Database Systems (Cont.)
1980s:
• Research relational prototypes evolve into commercial systems
SQL becomes industrial standard
• Parallel and distributed database systems
Wisconsin, IBM, Teradata
• Object-oriented database systems
1990s:
• Large decision support and data-mining applications
• Large multi-terabyte data warehouses
• Emergence of Web commerce
1.38
History of Database Systems (Cont.)
2000s
• Big data storage systems
Google BigTable, Yahoo PNuts, Amazon,
“NoSQL” systems.
• Big data analysis: beyond SQL
Map reduce and friends
2010s
• SQL reloaded
SQL front end to Map Reduce systems
Massively parallel database systems
Multi-core main-memory databases
1.39