0% found this document useful (0 votes)
5 views25 pages

DBA - Ch1 - Part1

The document outlines the architecture and components of Database Management Systems (DBMS), including definitions, objectives, and applications across various sectors. It discusses the limitations of file systems, the need for data abstraction, and different data models, as well as the roles of database users and administrators. Additionally, it covers transaction management, database system structure, and application architectures such as client-server models.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views25 pages

DBA - Ch1 - Part1

The document outlines the architecture and components of Database Management Systems (DBMS), including definitions, objectives, and applications across various sectors. It discusses the limitations of file systems, the need for data abstraction, and different data models, as well as the roles of database users and administrators. Additionally, it covers transaction management, database system structure, and application architectures such as client-server models.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Database System Architecture

Outline

 Definition of DBMS
 Objective of DBMS
 Purpose of Databases
 Limitation of the file system based databases
 View of Data in Databases
 Data Models
 Database Users and Administrators
 Centralized Architectures
 Client-Server Architectures
 Parallel Systems
 Distributed Systems
 Network Types
Definition of DBMS

 A database management system (DBMS) is:

a collection of interrelated data (Database) and a set of programs to access


those data

3
Objective of DBMS

 Provide a way for efficient data management

 Storage and retrieval of the information

 Manage large bodies of information

 Defining structures for the storage of information

 Providing the mechanisms for the manipulation of the information

 Ensure the safety of the information stored

 Avoid abnormal results when sharing the DB among several users

4
Database Applications

 Banking: all transactions


 Airlines: 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
 Databases touch all aspects of our lives

5
Purpose of Databases
Limitations of File Systems

 In the early days, database applications were built on top of file systems

 Data is stored in separate files

 Data is manipulated by a set of application programs

 As time goes by, the number of files and application programs increases

 Increasing complexity of database application management

6
Purpose of Databases
Limitations of File Systems

 Drawbacks of using file system to store data


 Data redundancy and inconsistency
 Redundancy: duplication of information in different files
 Inconsistency: the various copies of the same data may be different
 Difficulty in accessing data
 Need to write a new program to carry out each new task
 Data isolation – multiple files and formats
 Because data are scattered in various files, and files may be in different formats,
writing the appropriate information to retrieve the appropriate data is difficult
 Integrity problems
 Data values stored in the database must satisfy certain types of consistency
constraints
 Integrity constraints (e.g. account balance > 0) become part of program code
 Those constraints are forced by the database system developer
 Hard to add new constraints or change existing ones
7
Purpose of Databases
Limitations of File Systems

8
Purpose of Databases
Limitations of File Systems

 Solution: The Database Approach

 Central repository of shared data


 Data is managed by a controlling agent
 Stored a standardized, convenient form

9
Purpose of Databases
Limitations of File Systems

 Drawbacks of using file systems to store data


 Atomicity of updates
 Failures may leave database in an inconsistent state with partial
updates carried out
 E.g. transfer of funds from one account to another should either
complete or not happen at all (solved by Transaction Processing)
 Concurrent access by multiple users
 Concurrent accessed needed for performance
 Uncontrolled concurrent accesses can lead to inconsistencies
• E.g. two people reading a balance and updating it at the same time
 Security problems
 Not every users of the database should be able to access all the data
Database system offer solutions to all previous problems
10
View of Data in a Database

)‫ الصورة التى سوف نرى بها قاعدة البيانات (حسب طبيعة التعامل‬

 Recall that

A database management system (DBMS) is a collection of interrelated data and a


set of programs to access and modify those data.

 A major purpose of a database system is to provide users with an abstract


view of data

 The system hides certain details of how the data are stored and
maintained

‫ النظام يعطي للمستخدم صورة مجردة للبيانات ويخفي عنه التفاصيل التى ال تهمه وال تخصه (مثل عملية تخزين‬
)‫البيانات والتعامل معها‬

11
View of Data in a Database
The need for Data Abstraction

 The objective of data abstraction is to simplify the interaction with the database
from the user perspective

 Most of database users are not computer trained

 However, more complexity from the design perspective

 Complex data structure to represent data

12
View of Data in a Database
Data Abstraction Levels

 Physical Level: describes how the data is actually stored


 Describes low level data structures
 Logical Level: describes what data are stored in the database and what
relationships exist between data
 View Level: describes only part of the entire database to the users.

What to store

How to store

13
View of Data in a Database
Analogy with data types in programming

 Consider high level programming


 Physical Level: block of consecutive storage locations (e.g. bytes)
 The compiler hides this level of details from programmers
 Logical Level: each record is described by a type definition
 Programmers work at this level of abstraction
 Similar to database administrator
 View Level: computer users only see a set of applications without details on data types
 Similar to users of database
 E.g. some database users are not allowed to see the salary of workers for security
reasons.

type customer = record


name: string;
street: string;
city: integer;
end;
14
Data Models

 Definition
 The Data Model: a collection of conceptual tools for describing
 Data
 Data relationship
 Data semantics )‫(دالالت البيانات أو معانيها‬
 Consistency constraints
 A data model provide a way to describe the design of a database at the physical,
logical and view level

15
Data Models

 Definition
 Data models can be classified in four categories
1. Relational model
2. The Entity-Relation model
3. Object-based Data model
4. Other models: network model, hierarchical model

16
Data Models

 The Relational Model: uses a collection of tables to represent both data and
the relationship among those data.

 Each table has multiple column and each column has a unique name (Attribute)

 The most widely used as a data model for databases

 Vast majority of current database systems are based on the relational model

17
Data Models

 The Entity-Relationship (E-R) Model: it is based on the perception of a real


word that consists of a collection basic objects called entities and of
relationships among those objects.

 An entity is a “thing” or “object” from the real world that is distinguishable from other
objects.

 E.g. customers account bank branch

 A relationship is an association among several entities

 E.g. the account Ac1234 is held by the customer Mr. Abdullah

 This model is also widely used in database design

18
Database Users

 People who work with a database can be categorized as

 Database users or

 Database administrators

 Users are differentiated by the way they expect to interact with the system

19
Database Administrators

 The Database Administrators (DBA) Coordinates all the activities of the


database system
 The DBA has a good understanding of the enterprise’s information resources
and needs
 The DBA has central control over the system
 Database administrator’s duties include:
 Schema definition, specifying integrity constraints
 Storage structure and access method definition
 Granting user authority to access the database
 Acting as liaison with users )‫(العمل كحلقة وصل مع المستخدمين‬
 Routine maintenance (DB backup, ensuring free space for the database,
etc….)

20
Transaction Management

 A transaction is a collection of operations that performs a single logical


function in a database application
 E.g. Money transfer from an account to another
 Each transaction must satisfy the following properties:
 Atomicity: all-or-none, which means that the transaction successfully
completes if and only if all the tasks of the transaction are successfully
completed
 E.g. in case of a money transfer, the transaction is valid both debit and
credit operation occur.
 Consistency: the final state of the system must be correct and
compatible with the previous status before the transaction is made.
 E.g. after a credit transaction, the balance must be update accordingly
to the operation
 Durability: the value in the database must persist, even in case of a
system failure

21
Database System Structure

 A database system has several sub-system


 Transaction Manager
 Responsible for ensuring that the database remains in a consistent
(correct) state despite system failure.
 Ensures that concurrent transaction execution proceed without
conflicting
 Query Processor
 Compile and executes DDL and DML statement
 Storage Manager
 Provide the interface between the low-level data stored in the database
and the application programs and queries submitted to the system.

22
Application Architectures

 (Most of) Database systems are accessed remotely through a network


 The Client/Server Model
 Client machines, on which remote database users work
 Server machines, on which the database system runs

23
Application Architectures

 Two-Tiered Architecture
 The application is partitioned into a component that resides at the client machine.
 It remotely invokes the database server machine through query languages statements
 E.g. using ODBC, JDBC for interaction between the client and the server
 Three-Tiered Architecture
 The client machine acts as a front-end and does not contain any direct database calls
 The client machine communication with the application server through an interface of
forms (not direct queries)
 The application server communicate with a database system to access data
‫ أنه عند الحاجة لتعديل‬Two-T ‫• مشاكل الـ‬
‫ فإن التعديل سيتم على كل الـ‬function ‫أي‬
(Update) .clients
‫ يجب‬client ‫• والمشكلة األخرى أن جهاز الـ‬
‫أن يكون بإمكانيات كبيرة (وهذا غير‬
‫ ) ألن المخدم‬THREE-T ‫مطلوب في الـ‬
.‫بإمكانات قوية والعمل يكون عليه‬

24
Instances and Schemas

 Instance of a database
 The collection of information stored in the database at a particular moment
is called an instance )‫(صورة من قاعدة البيانات في لحظة معينة‬
 Schema of database
 The overall design of the database is called schema. ‫(تركيب ووصف قاعدة‬
)‫البيانات‬
 Physical Schema
 Describes the data design at the physical level
 Logical Schema
 Describes the data design at the logical level

25

You might also like