Lecture 4 w3

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 34

Database Systems

Lecture # 4
Summary: Previous Lecture
 ANSI-SPARC three-level architecture
 Schemas, mappings, and instances
 Data independence
Database Languages
 Data sublanguage consist of two parts:
 DDL (Data Definition Language)
 DML (Data Manipulation Language)

 Data sublanguage
 A data sublanguage is a specific language designed to
interact with a database, particularly for defining its
structure and manipulating the data within it.
 Does not include constructs for all computing needs such
as iterations or conditional statements
 Many DBMSs provide embedding the sublanguage in a
high level programming language e.g. C, C++, Java etc.
 In this case , these high level languages are called host
languages
Data Definition Language (DDL)
 Allows the DBA or user to describe name
entities, attributes, and relationships
required for the application
 Plus any associated integrity and security
constraints
 System catalog (data dictionary, data
directory)
 Metadata (data about data, data
description, data definitions)
Data Manipulation Language (DML)
 Provides basic data manipulation
operations on data held in the database
 Procedural DML
 Non-Procedural DML
Procedural DML
 Allows
user to tell system exactly how to
manipulate data
 Operate on records individually
 Typically, embedded in a high level language
 Network or hierarchical DMLs
 More work is done by user (programmer)
Non-Procedural DML
 Allows user to state what data is needed
rather than how it is to be retrieved
 Operate on set of records
 Relational DBMS include e.g. SQL, QBE etc.
 Easy to understand and learn than procedural DML
 More work is done by DBMS than user
 Provides considerable degree of data independence
 Also called declarative languages
Fourth Generation Languages (4GLs)
 No clear consensus
 Forms generators
 Report generators
 Graphics generators
 Application generators
 Examples : SQL and QBE
Functions of a DBMS
 Data storage, retrieval, and update
 A user-accessible catalog
 Transaction support
 Concurrency control services
 Recovery services
Functions of a DBMS..
 Authorization services
 Support for data communication
 Integrity service
 Services to promote data independence
 Utility services
DBMS Environment
 Single user
 Multi-user

 Teleprocessing

 File-Server Architecture

 Client-Server Architecture
Teleprocessing
Teleprocessing
 Traditional architecture
 Single mainframe with a number of
terminals attached
 Trend is now towards downsizing
File-Server Architecture
File-Server Architecture
 DBMS and applications run on each
workstation
 Disadvantages include:
 Significant network traffic
 Copy of DBMS on each workstation
 Concurrency, recovery and integrity control more
complex because multiple DBMSs accessing same files
Client-Server Architecture
Client-Server Architecture
 Client (tier 1) manages user interface and
runs applications
 Server (tier 2) holds database and DBMS
 Advantages include:
 Wider access to existing databases
 Increased performance
 Possible reduction in hardware costs
 Reduction in communication costs
 Increased consistency
Two-Tier Client-Server
Three-Tier Client-Server
 Clientside issues in two-tier client/server
model preventing true scalability:
 ‘Fat’ client, requiring considerable resources on client’s
computer to run effectively
 Significant client side administration overhead

 By 1995, three layers proposed, each


potentially running on a different platform
Three-Tier Client-Server
Three-Tier Client-Server
 Advantages:
 ‘Thin’ client, requiring less expensive hardware
 Application maintenance centralized
 Easier to modify or replace one tier without affecting
others
 Separating business logic from database functions makes
it easier to implement load balancing
 Maps quite naturally to Web environment
Data Model
 Integrated collection of concepts for
describing data, relationships between data,
and constraints on the data in an
organization
Purpose of Data Model
 To represent data in an understandable way
 Represents the organization itself
 Helps in unambiguous and accurate communication
between between database designers and end-users about
their understanding of the organizational data
Components of a Data Model
 A data model comprises:
 A structural part
 A manipulative part
 Possibly a set of integrity rules

 ANSI-SPARC architecture related models


 External data model (Universe of Discourse)
 Conceptual data model (DBMS independent)
 Internal data model
Categories of Data Models
 Categories of data models include:
 Object-based
 Entity-Relationship
 Semantic
 Functional
 Object-Oriented
 Record-based
 Relational Data Model
 Network Data Model
 Hierarchical Data Model
 Physical
Object based Data Models
focus on representing data in a way that mimics real-world objects
1. Entity-Relationship (ER) Model:
The ER model concentrates on entities (real-world things)
and the relationships between them.
2. Semantic Data Model:
This model emphasizes the meaning and relationships
between data elements, aiming to capture the richness of
real-world data concepts.
3. Functional Data Model:
This model prioritizes data manipulation and the functions
(operations) performed on data.
4. Object-Oriented Data Model (OODM):
The OODM heavily borrows from object-oriented
programming concepts. It represents data as objects that
encapsulate data (attributes) and behavior (methods).
Rule based Data Models
RBDS represent data by establishing a set of rules that govern how
data elements are organized, categorized, and interrelated. These
rules can be based on various criteria like data types, values, or
specific conditions.
 Relational Model:

The relational model organizes data into tables, similar to


spreadsheets. Each table represents a specific entity (e.g.,
customers, products, orders) and tables are linked through
relationships.
 Network Model:

The network model organizes data in a more web-like structure. It


allows a record (data entity) to have multiple parent records in
different tables.
 Hierarchical Model:

The hierarchical model organizes data in a tree-like structure, with a


single root record at the top and child records branching out below it.
Each child record can only have one parent record.
Physical Data Models
Physical data model (PDM) is a detailed blueprint that specifies how
data will be structured and stored within a specific database
management system (DBMS). It essentially translates the logical
data model, which focuses on the overall data organization, into the
implementation specifics of a particular database system.
Relational Data Model
Network Data Model
Hierarchical Data Model
Conceptual Modeling
 Conceptual modeling is process of
developing a model of information use in an
enterprise that is independent of
implementation details
 Should be complete and accurate representation of an
organization’s data requirements
 Conceptual schema is the core of a system supporting all
user views
Logical Data Modeling
 This model represents the high-level structure of the data,
focusing on entities (data subjects), attributes (data
characteristics), and relationships between them. It's
independent of any specific database system and portrays
the core data organization.
Summary
 Database languages
 Functions of a DBMS
 DBMS environment
 Data models and their categories

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy