*What is DBMS
*Database System Applications
*The Evolution of a Database
*Drawbacks of File Management System / Purpose of Database Systems
*Advantages of DBMS
*Disadvantages of DBMS
*DBMS Architecture
*types of modules
*Three-Tier and n-Tier Architectures for Web Applications
*different level and types
*Data Abstraction
*Data Independence
*Database State or Snapshot
*Database Schema vs. Database State
*Categories of data models
*Different Users
*Database Languages
*Relational Model
*ER Model
*Object-based model
*Semi-structured data model
2. What is DBMS
• Database
– Is a collection of related Data.
– By data, we mean known facts that can be recorded and
that have implicit meaning. For example, consider the
names, telephone numbers, and addresses of the people
you know.
• Database Management System (DBMS)
– Collection of programs that enables users to create and
maintain a database.
– DBMS contains information about a particular enterprise
– Set of programs to access the data
– An environment that is both convenient and efficient to
use.
3. Database System Applications
– Banking: all transactions
– Airlines and Hotel: reservations, schedules
– Universities: registration, grades
– Sales: customers, products, purchases.
– Online retailers: order tracking, customized
recommendations
– Manufacturing: production, inventory, orders, supply chain
– Human resources: employee records, salaries, tax
deductions
4. • IBM DB2
• Microsoft SQL Server
• Oracle
• MySQL
• MariaDB
• PostgreSQL
• SQLite
• Microsoft Access
• SAP HANA
• Dbase
• FoxPro
• LibreOffice Base
• FireMaker Pro
• InterSystems Cache
5. The Evolution of a Database
Sql server 1.0 1987 (with sybase)
sql server 4.2 for window NT 1992 (with sybase)
sql server 6.0 june 1995 Exclusively
sql server 6.5 april 1996
sql server 7.0 december 1998 Sphnix
sql server 2000 august 2000 shiloh
sql server 2005 Yukon (oracle killer)
sql server 2008 august 2008
sql server 2012 2012 denali
7. • what is DBA
– The function of managing and maintaining
database management systems (DBMS)
• Responsibility of DBA ?
– Installation , Configuring, and upgrading
– Maintain Backup & recovery
– Grant and Revoke Access Permissions.
– Maintenance & performance monitoring.
9. Drawbacks of File Management
System / Purpose of Database Systems
– Data redundancy and inconsistency
• Multiple file formats, 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)
• Hard to add new constraints or change existing ones
10. – 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 accessed needed for performance
• Uncontrolled concurrent accesses can lead to
inconsistencies
– Example: Two people reading a balance and
updating it at the same time
– Security problems
• Hard to provide user access to some, but not all, data
11. Advantages of DBMS
• Controlling Redundancy
• Restricting Unauthorized Access
• Centralized Control
• Backup and Recovery
• Enforcing Integrity Constraints
• Providing Multiple User Interface
• Shared Data
• Representing Complex Relationship among Data
12. Disadvantages of DBMS
• Number of problems are associated with
centralized data.
• Cost of hardware and software
• Complexity of Backup and Recovery
mechanism.
13. DBMS Architecture
• Two Level Architecture
– Client / Server Architecture.
– A standard called Open Database Connectivity
(ODBC) provides an application programming
interface (API), which allows client-side programs to
call the DBMS, as long as both client and server
machines have the necessary software installed.
• Three level Architecture
– The goal is to separate user applications and physical
database
– A major purpose of database system is to provide users
with an abstract view of the data
14. • In a basic client/server DBMS architecture,
two types of modules.
– A client module
• user workstation or personal computer. user interface
and application programs.
– A server module
• Data storage, access, search, and other functions. query
server or transaction server
15. Three-Tier and n-Tier Architectures
for Web Applications
This intermediate layer or middle tier is called the
application server or the Web server,
18. Data Abstraction
• Hiding details of data organization and
storage.
• different users can perceive data at their
preferred level of detail.
19.
20. Mapping
• Process of transforming the request and result
between different level is called as mapping.
– External / conceptual mapping :
– Conceptual / Internal mapping
21. Data Independence
• We can define two types of data independence
– Logical data independence is the capacity to change
the conceptual schema without having to change
external schemas or application programs
– Physical data independence is the capacity to
change the internal schema without having to
change the conceptual schema.
22.
23. Database State or Snapshot
• Actual data in the database may change
frequently
• The data in the database at a particular moment
in time is called a database state or snapshot
• Also called the current set of occurrences or
instances in the database
24. Database Schema vs. Database State
• The distinction is very important
• When we define a database, we specify its database schema
only to the DBMS
– Database state is the empty state (w/ no data)
– Initial state: when the database is first populated or loaded
with initial data
– Current State: State at any point in time. Every time an
update operation is applied to the database, database state
changes
25. • Valid State: A state that satisfies the structure
and the constraints specified in the schema
The DBMS is partly responsible for ensuring that
every state of the database is a valid state
• The schema is sometimes called the intension,
and a database state is called an extension of
the schema
26. Data Models, Schemas, and Instances
• Data model—a collection of concepts that can be
used to describe the structure of a database.
• By structure of a database we mean the data
types, relationships, and constraints that apply to
the data.
– High-level or conceptual data models : users perceive
data. Use concept such as entities, attributes, and
relationships.
– low-level or physical data models: details of how data
is stored.
27. • An entity represents a real-world object or concept.
– such as an employee or a project
• An attribute represents some property of interest
– employee’s name or salary.
• A relationship among two or more entities represents
an association among the entities.
– works-on relationship between an employee and a project.
• Scheme : The description and overall design of a
database is called the database schema.
• Instance : The collection of information stored in the
database at a particular moment is called an instance.
30. DBMS Component Modules
• The top part of the figure refers to the various users of the
database environment and their interfaces.
• The lower part shows the internals of the DBMS
responsible for storage of data and processing of
transactions.
• Access to the disk is controlled primarily by the operating
system (OS), which schedules disk read/write.
• Reducing disk read/write improves performance
considerably.
• Many DBMSs have their own buffer management module
to schedule disk read/write,
• A higher-level stored data manager module of the DBMS
controls access to DBMS information.
31. Different Users
• DBA staff: who define, monitor and Control the
whole Database access and performance.
• Casual users / Sophisticated User: who work with
interactive interfaces to formulate queries.
• Application programmers : who create programs
using some host programming languages.
• Parametric users/ Naive user/ Web user : who do
data entry work by supplying parameters to
predefined transactions.
32. • Storage Data Manager : minimize the movement
of data between the disk and main memory.
– Buffer manager : Fetch data from disk storage into
main memory. And decide what data to cache in main
memory.
– File manager: Manage the allocation of space on disk
storage and data structure used to represent info.
– Authorization and integrity Manager: test for
satisfaction of integrity constraints, and authority of
user to access the data.
– Transaction Manager: ensure that the database
remain in consistent state.
33. • The DDL compiler processes schema definitions and stores descriptions
of the schemas (meta-data) in the DBMS catalog.
• The catalog includes information such as the names and sizes of files,
names and data types of data items, storage details of each file,
mapping information among schemas, and constraints.
• query optimizer is concerned with the rearrangement and possible
reordering of operations, elimination of redundancies, and use of
correct algorithms and indexes during execution.
• Application programmers write programs in host languages such as Java,
C, or C++.
• The Precompiler extracts DML commands from an application program
written in a host programming language.
• These commands are sent to the DML compiler for compilation into
object code for database access.
• The rest of the program is sent to the host language compiler.
• The object codes for the DML commands and the rest of the program
are linked, forming a canned transaction
• Canned transactions are executed repeatedly by parametric users, who
simply supply the parameters to the transactions. Each execution is
considered to be a separate transaction. An example is a bank
withdrawal transaction where the account number and the amount may
be supplied as parameters.
34. • Runtime database processor executes
– (1) the privileged commands, (2) the executable
query plans, and (3) the canned transactions with
runtime parameters. It works with the system
catalog and also works with the stored data
manager.
– The runtime database processor handles other
aspects of data transfer, such as management of
buffers in the main memory.
35. Database Languages
• To perform operations on schema and data.
• DDL : data definition language. Deal with
structure of the database.
• DML : data manipulation language.
• DCL : data control language. Control access to
database.
36. Categories of data models
• Relational Model
• ER Model
• Object based model
• Semi structured data model
37. Representational or implementation
data models
• Entity-Relationship Model
• Relational data model
• Network data model.
• Hierarchical data models.
• Object-Oriented data model.
38. Logical structure (schema) of a
database can be expressed graphically
by an E-R diagram
• Rectangles- which represent entity sets
• Ellipses- which represent attributes
• Diamonds- which represent relationships
among entity sets
• Lines- which link attributes to entity sets and
entity sets to relationships.