CHPT 2
CHPT 2
Database
Concepts &
Architecture
Department of Computer Science
School of Natural Sciences
University of Zambia
Overview
• The growth in data storage needs has led to the development of distributed
database systems
• operate across thousands of computers,
• aligning with the shift from centralized mainframes to networked workstations
and servers.
• provide concepts that are close to the way many users perceive data
• provide concepts that describe the details of how data is stored on the
computer storage media, typically magnetic disks - meant for computer
specialists
Categories of Data Models
• provide concepts that may be easily understood by end users but that are not
too different from the way data is organized in computer storage
• Examples include the relational model as well as old data models such as the
network and hierarchical models
• The schema and constraints are stored in the DBMS catalog as meta-data,
allowing the DBMS to reference them as needed
• The initial state of a database occurs when it is first populated with data,
and the current state is the database's state at any moment after updates
• The DBMS ensures that every database state is valid by adhering to the
structure and constraints defined in the schema
Three-Schema Architecture
• The DBMS must transform requests between the external, conceptual, and
internal schemas through a process called schema mapping, which can be
complex and time-consuming, especially in systems with user-defined views
• Although many DBMSs do not fully separate these three levels, the three-
schema architecture remains important in database design, helping to clarify
the distinctions between user views, database structure, and physical
storage
Three-Schema Architecture
Data Independence
• Data independence refers to the ability to change the schema at one level
of a database system without affecting the schema at the next higher level,
ensuring stability in user applications and external views
• Mappings between different schema levels are stored in the catalog, and
data independence is maintained by adjusting these mappings when
schema changes occur, without modifying higher-level schemas or
applications
DBMS Languages
• These include:
1. The Data Definition Language (DDL) is used by database administrators
(DBAs) and designers to define both conceptual and internal schemas,
with its description stored in the DBMS catalog
2. The Storage Definition Language (SDL) used to specify the internal
schema
3. The View Definition Language (VDL) is used to define user views and
map them to the conceptual schema
4. The Data Manipulation Language (DML) allows users to manipulate data
through operations like retrieval, insertion, deletion, and modification
• Types of DMLs
1. High-level DMLs (set-oriented, declarative) allow for concise specification of
database operations
2. Low-Level DMLs (procedural) require embedding in a programming
language for record-by-record processing, with the host language serving as
the primary language and the DML as the data sublanguage
• Casual users typically interact with the database using a high-level query
language, while programmers may embed DML in their code;
• User-friendly interfaces are available for those who prefer not to learn the
details of the query language
DBMS Interfaces
• Quite a few:
1. Menu-based Interfaces: Guide users through queries by presenting
options in a step-by-step manner via menus, commonly used in web
clients
2. Mobile Apps Interfaces: Provide users with access to their data on mobile
devices, featuring programmed interfaces for tasks like paying bills, or
making reservations, often tailored to specific industries like banking or
reservations
3. Forms-based Interfaces: Allow users to input or retrieve data by filling
out forms, typically used for canned transactions
4. Graphical User Interfaces (GUIs): Visually represent database schemas in
a diagrammatic form, enabling users to specify queries by interacting with
the diagram, often combining menus and forms for enhanced usability
DBMS Interfaces
• Divided into
1. user interfaces for various
types of users (DBAs, casual
users, application
programmers, and
parametric users)
2. internal modules
responsible for data storage
and transaction processing
DBMS Component Modules
• The System Catalog also stores many other types of information that are
needed by other DBMS component modules such as the Query Optimizer,
the DML Compiler and the Runtime Database Processor, which can then
look up the catalog information when needed
• DBMSs have database utilities that help the manage the database system
1. Loading: Used to load existing data files (e.g., text or sequential files) into the
database, automatically reformatting the data to match the target database
structure, and facilitating data transfer between different DBMSs
1. sorting files
• Servers are systems that provide services to clients, such as file access,
printing, archiving, and database access, typically running server software .
• The server, often called a query server, transaction server, or SQL server,
handles SQL and transaction processing
• n-Tier Architectures
• Further division of layers into finer components creating e.g., four or five
tiers, allowing independent operation and optimization of each layer, often
used in ERP and CRM systems
Three-Tier and n-Tier Architectures for Web Apps
Classification of DBMSs