0% found this document useful (0 votes)
37 views73 pages

Database MNGT System

The document outlines a database management systems course, including basic definitions, types of databases and applications, typical DBMS functionality, an example university database, and recent developments in big data and cloud computing.

Uploaded by

Delina Tedros
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views73 pages

Database MNGT System

The document outlines a database management systems course, including basic definitions, types of databases and applications, typical DBMS functionality, an example university database, and recent developments in big data and cloud computing.

Uploaded by

Delina Tedros
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 73

COURSE : Database

management Systems 1

Lecturer: Wakale Fazali

A Regional University Transcending Boundaries


OUTLINE
 Basic Definitions
 Types of Databases and Database Applications
 Typical DBMS Functionality
 Example of a Database (UNIVERSITY)
 Main Characteristics of the Database Approach
 Types of Database Users
 Advantages of Using the Database Approach
 Historical Development of Database Technology
 Extending Database Capabilities
 When Not to Use Databases
Recent Developments (1)
 Social Networks started capturing a lot of
information about people and about
communications among people-posts, tweets,
photos, videos in systems such as:
- Facebook
- Twitter
- Linked-In
 All of the above constitutes data
 Search Engines- Google, Bing, Yahoo : collect their
own repository of web pages for searching purposes
Recent Developments (2)
 New Technologies are emerging from the so-called non-
database software vendors to manage vast amounts of data
generated on the web:
 Big Data storage systems involving large clusters of distributed
computers
 A large amount of data now resides on the “cloud” which
means it is in huge data centers using thousands of machines.
Basic Definitions
 Database:
A database is an organized collection of logically related data.
A database may be of any size and complexity.

 Data:
Known facts that can be recorded and have an implicit meaning.
 Mini-world:
Some part of the real world about which data is stored in a database.

For example, student grades and transcripts at a university .


 Database System:
A database system (DBS) is a computerized record keeping system with
the overall purpose of maintaining information and making it available
whenever required. The database typically stores related data in a
computer system.
cont
Database Transaction
A database transaction is a sequence of multiple operations performed on a
database, and all served as a single logical unit of work.
Properties of a Database transaction
Atomicity.
When a transaction is committed, The Database either completes the
transaction successfully or rolls it back so that the database returns to its
original state.
Consistency.
Transactions can only alter affected data in a way that is authorized by the
database engine, ensuring that a consistent view of the data is maintained at
all times.
cont
Isolation
With multiple concurrent transactions running at the same time, each
transaction should be kept independent without affecting other transactions
executing simultaneously.
Durability
Every successful transaction committed will survive permanently. To
accomplish this, an entry is added to the database transaction log for each
successful transaction.
Constraints
These are a set of rules implemented on a database to ensure information
Quality. They help to limit the type of data that is input into a database.
Constraints can be applied on the table as a whole or on a particular column
cont
 Database Management System (DBMS):
A database management system (DBMS) is a set of programs that allow for
the management of a database.
 Components of a DBS include:
– Hardware and operating system
– DBMS
– Database
– Related software systems and/or applications
– End users
Simplified Representation of a
DBS
Objectives of a Database System
The primary objectives of a database system include the following:
– Security and protection — prevention of unauthorized users;
protection from inter-process interference
– Reliability — assurance of stable, predictable performance
– Facilitation of multiple users
– Flexibility — the ability to obtain data and effect action via various
methods
– Ease of data access and data change
– Accuracy and consistency
– Clarity — standardization of data to avoid ambiguity
– Ability to service unanticipated requests
– Protection of intellectual Investment
– Availability — data is available to users whenever it is required
Objectives of a Database
System
Among the significant secondary objectives of a database system are the
following:
– Physical data independence — storage hardware and storage
techniques are insulated from application programs
– Logical data independence — data items can be added or subtracted
or the overall logical structure modified without existing programs
being affected
– Control of redundancy
– Integrity controls — range checks and other controls must prevent
invalid data from entering the system
– Clear data definition — a data dictionary is usually kept
– Suitably friendly user interface
– Tunability — easy reorganizing the database to improve performance
without changing the application programs
– Automatic reorganization of migration to improve performance
Clarification on Data
Independence
 Data independence is the immunity of application programs to changes
in structure and access strategy of data. It is necessary for the following
reasons:
– Different applications and users will need to have different logical
views (interpretation) of data.
– The tuning of the system should not affect the application programs.
Physical data independence implies that the user's view is independent of
physical file organization, machine or storage medium.
Logical data independence implies that each user (or application program)
can have his/her (its) own logical view and does not need a global view of the
database.
Types of Databases and
Database Applications
 Traditional Applications:
 Numeric and Textual Databases
 More Recent Applications:
 Multimedia Databases
 Geographic Information Systems (GIS)
 Biological and Genome Databases
 Data Warehouses
 Mobile databases
 Real-time and Active Databases
Impact of Databases and
Database Technology

Businesses: Banking, Insurance, Retail, Transportation, Healthcare,


Manufacturing
Service Industries: Financial, Real-estate, Legal, Electronic Commerce, Small
businesses
Education : Resources for content and Delivery
More recently: Social Networks, Environmental and Scientific Applications,
Medicine and Genetics
Personalized Applications: based on smart mobile devices
Typical DBMS Functionality
Define a particular database in terms of its data types, structures,
and constraints
Construct or Load the initial database contents on a secondary
storage medium
Manipulating the database:
– Retrieval: Querying, generating reports
– Modification: Insertions, deletions and updates to its content
– Accessing the database through Web applications
Processing and Sharing by a set of concurrent users and
application programs – yet, keeping all data valid and consistent
Additional DBMS Functionality
DBMS may additionally provide:
– Protection or Security measures to prevent unauthorized
access
– “Active” processing to take internal actions on data
– Presentation and Visualization of data
– Maintenance of the database and associated programs
over the lifetime of the database application
• Called database, software, and system maintenance
Example of a Database
(with a Conceptual Data Model)

Mini-world for the example:


– Part of a UNIVERSITY environment.
Some mini-world entities:
– STUDENTs
– COURSEs
– SECTIONs (of COURSEs)
– (academic) DEPARTMENTs
– INSTRUCTORs
Example of a Database
(with a Conceptual Data Model)
 Some mini-world relationships:
 SECTIONs are of specific COURSEs
 STUDENTs take SECTIONs
 COURSEs have prerequisite COURSEs
 INSTRUCTORs teach SECTIONs
 COURSEs are offered by DEPARTMENTs
 STUDENTs major in DEPARTMENTs

Note: The above entities and relationships are typically expressed in a


conceptual data model, such as the ENTITY-RELATIONSHIP data model
Example of a simple database
Approaches to Database Design
 Analysis of the management of data via computerized systems reveals
five approaches that have been pursued over the past forty years:
– Instant small system — uses one file
– File processing systems — involve many files
– Other non-relational systems e.g. hierarchical, inverted, and network
approaches
– Relational databases (the focus of this course) — pioneered by
prominent individuals such as Edgar Codd, Ronald Fagin, Christopher
Date, among others
– Object databases — a contemporary approach (also discussed later in
the course)
Database Users
Users may be divided into
– Those who actually use and control the database content, and those
who design, develop and maintain database applications (called
“Actors on the Scene”), and
– Those who design and develop the DBMS software and related tools,
and the computer systems operators (called “Workers Behind the
Scene”).
Database Users – Actors on the Scene

Actors on the scene


– Database administrators:
• Responsible for authorizing access to the database, for
coordinating and monitoring its use, acquiring software and
hardware resources, controlling its use and monitoring efficiency
of operations.
– Database Designers:
• Responsible to define the content, the structure, the constraints,
and functions or transactions against the database. They must
communicate with the end-users and understand their needs.
Database End Users
 Actors on the scene (continued)
 End-users: They use the data for queries, reports and
some of them update the database content. End-users can
be categorized into:
 Casual: access database occasionally when needed
 Naïve or Parametric: they make up a large section of the end-user
population.
 They use previously well-defined functions in the form of
“canned transactions” against the database.
 Users of Mobile Apps mostly fall in this category
 Bank-tellers or reservation clerks are parametric users who do
this activity for an entire shift of operations.
 Social Media Users post and read information from websites
cont
 Sophisticated:
 These include business analysts, scientists, engineers, others
thoroughly familiar with the system capabilities.
 Many use tools in the form of software packages that work
closely with the stored database.
 Stand-alone:
 Mostly maintain personal databases using ready-to-use
packaged applications.
 An example is the user of a tax program that creates its own
internal database.
 Another example is a user that maintains a database of
personal photos and videos.
cont
 System Analysts and Application Developers
This category currently accounts for a very large proportion
of the IT work force.
 System Analysts: They understand the user requirements of
naïve and sophisticated users and design applications
including canned transactions to meet those requirements.
 Application Programmers: Implement the specifications
developed by analysts and test and debug them before
deployment.
 Business Analysts: There is an increasing need for such
people who can analyze vast amounts of business data and
real-time data (“Big Data”) for better decision making related
to planning, advertising, marketing etc.
Database Users – Actors
behind the Scene
 System Designers and Implementors
Design and implement DBMS packages in the form of modules and
interfaces and test and debug them. The DBMS must interface with
applications, language compilers, operating system components, etc.
 Tool Developers: Design and implement software systems called tools
for modeling and designing databases, performance monitoring,
prototyping, test data generation, user interface creation, simulation
etc. that facilitate building of applications and allow using database
effectively.

:
 Operators and Maintenance Personnel They manage the actual
running and maintenance of the database system hardware and
software environment.
Advantages of Using the
Database Approach
Controlling redundancy in data storage and in development and maintenance
efforts.
– Sharing of data among multiple users.
Restricting unauthorized access to data. Only the DBA staff uses privileged
commands and facilities.
Providing persistent storage for program Objects
– E.g., Object-oriented DBMSs make program objects persistent.
Providing Storage Structures (e.g. indexes) for efficient Query Processing.
Cont.
 Providing optimization of queries for efficient processing.
 Providing backup and recovery services.
 Providing multiple interfaces to different classes of users.
 Representing complex relationships among data.
 Enforcing integrity constraints on the database.
 Drawing inferences and actions from the stored data using deductive and
active rules and triggers.
Additional Implications of Using
the Database Approach

Potential for enforcing standards:


– This is very crucial for the success of database applications in large
organizations. Standards refer to data item names, display formats,
screens, report structures, meta-data (description of data), Web page
layouts, etc.
Reduced application development time:
– Incremental time to add each new application is reduced.
cont.
Flexibility to change data structures:
– Database structure may evolve as new requirements are defined.
Availability of current information:
– Extremely important for on-line transaction systems such as shopping,
airline, hotel, car reservations.
Economies of scale:
– Wasteful overlap of resources and personnel can be avoided by
consolidating data and applications across departments.
When not to use a DBMS
 Main inhibitors (costs) of using a DBMS:
 High initial investment and possible need for additional hardware.
 Overhead for providing generality, security, concurrency control,
recovery, and integrity functions.
 When a DBMS may be unnecessary:
 If the database and applications are simple, well defined, and not
expected to change.
 If access to data by multiple users is not required.
 When a DBMS may be infeasible:
 In embedded systems where a general purpose DBMS may not fit in
available storage
When not to use a DBMS
 When no DBMS may suffice:
 If there are stringent real-time requirements that
may not be met because of DBMS overhead (e.g.,
telephone switching systems)
 If the database system is not able to handle the complexity of data
because of modeling limitations (e.g., in complex genome and protein
databases)
 If the database users need special operations not supported by the
DBMS (e.g., GIS and location based services).
Lecture Summary
 Basic Definitions
 Types of Databases and Database Applications
 Typical DBMS Functionality
 Example of a Database (UNIVERSITY)
 Main Characteristics of the Database Approach
 Types of Database Users
 Advantages of Using the Database Approach
 Historical Development of Database Technology
 Extending Database Capabilities
 When Not to Use Databases
Thanks for attending
Database management
Systems

November Semester 1 2023


Lecture 2
Database System Concepts
and Architecture
Outline
 Data Models and Models Their Categories
 History of Data
 Schemas, Instances, and States
 Three-Schema Architecture
 Data Independence
 DBMS Languages and Interfaces
 Database System Utilities and Tools
 Centralized and Client-Server Architectures
 Classification of DBMSs
Data Models
Data Model:
– A set of concepts to describe the structure of a database, the
operations for manipulating these structures, and certain
constraints that the database should obey.
– Data models define how data is connected to each other and how
they are processed and stored inside the system.
Data Model Structure and Constraints:
– Constructs are used to define the database structure
– Const ructs typically include elements (and their data types) as
well as groups of elements (e.g. entity, record, table), and
relationships among such groups
– Constraints specify some restrictions on valid data; these
constraints must be enforced at all times
Data Models (continued)
Data Model Operations:
– These operations are used for specifying database retrievals and
updates by referring to the constructs of the data model.
– Operations on the data model may include
– basic model operations (e.g. generic insert, delete, update) and
– user-defined operations (e.g. compute_student_gpa,
update_inventory)
DBMS Interfaces
Menu-Based Interfaces for Web Clients or Browsing –
These interfaces present the user with lists of options (called
menus) that lead the user through the formation of a request.
Programmer interfaces for embedding DML in programming languages
Forms-Based Interfaces –
A forms-based interface displays a form to each user. Users can fill
out all of the form entries to insert a new data, or they can fill out
only certain entries, in which case the DBMS will redeem same type
of data for other remaining entries.
Mobile Interfaces: interfaces allowing users to perform transactions
using mobile apps
Categories of Data Models
Conceptual Data Model: This Data Model defines WHAT the system contains.
This model is typically created by Business stakeholders and Data Architects.
The purpose is to organize, scope and define business concepts and rules.
Logical Data Model: Defines HOW the system should be implemented
regardless of the DBMS. This model is typically created by Data Architects and
Business Analysts. The purpose is to developed technical map of rules and
data structures.
Physical Data Model: This Data Model describes HOW the system will be
implemented using a specific DBMS system. This model is typically created by
DBA and developers. The purpose is actual implementation of the database.
Schemas versus Instances
Database Schema:
– The description of a database.
– Includes descriptions of the database structure, data
types, and the constraints on the database.
Schema Diagram:
– An illustrative display of (most aspects of) a database
schema.
Schema Construct:
– A component of the schema or an object within the
schema, e.g., STUDENT, COURSE.
Example of a Database Schema
Example of a database state
Three-Schema Architecture

Proposed to support DBMS characteristics of:


– Program-data independence.
– Support of multiple views of the data.
Not explicitly used in commercial DBMS products, but has
been useful in explaining database system organization
The goal of the three-schema architecture, is to separate
the user applications from the physical database.
Three-Schema Architecture
Defines DBMS schemas at three levels:
– Internal schema at the internal level to describe physical
storage structures and access paths (e.g indexes).
• Typically uses a physical data model.
– Conceptual schema at the conceptual level to describe the
structure and constraints for the whole database for a
community of users.
• Uses a conceptual or an implementation data model.
– External schemas or view level at the external level to
describe the various user views.
• Usually uses the same data model as the conceptual schema.
The three-schema architecture
Data Independence
Logical Data Independence:
– The capacity to change the conceptual schema
without having to change the external schemas and
their associated application programs.
Physical Data Independence:
– The capacity to change the internal schema without
having to change the conceptual schema.
– For example, the internal schema may be changed
when certain file structures are reorganized or new
indexes are created to improve database
performance
Data Independence
(continued)
The higher-level schemas themselves are unchanged.
– Hence, the application programs need not be
changed since they refer to the external schemas.
DBMS Languages
Data Definition Language (DDL)
Data Manipulation Language (DML)
– High-Level or Non-procedural Languages: These
include the relational language SQL
• May be used in a standalone way or may be embedded in a
programming language
– Low Level or Procedural Languages:
• These must be embedded in a programming language
DBMS Languages
Data Definition Language (DDL):
– Used by the DBA and database designers to specify the
conceptual schema of a database.
– In many DBMSs, the DDL is also used to define internal
and external schemas (views).
– In some DBMSs, separate storage definition language
(SDL) and view definition language (VDL) are used to
define internal and external schemas.
• SDL is typically realized via DBMS commands provided to the
DBA and database designers
DBMS Languages
Data Manipulation Language (DML):
– Used to specify database retrievals and updates
– DML commands (data sublanguage) can be
embedded in a general-purpose programming
language (host language), such as COBOL, C, C++, or
Java.
• A library of functions can also be provided to access the
DBMS from a programming language
– Alternatively, stand-alone DML commands can be
applied directly (called a query language).
Types of DML
High Level or Non-procedural Language:
– For example, the SQL relational language
– Are “set”-oriented and specify what data to retrieve
rather than how to retrieve it.
– Also called declarative languages.
Low Level or Procedural Language:
– Retrieve data one record-at-a-time;
– Constructs such as looping are needed to retrieve
multiple records, along with positioning pointers.
DBMS Interfaces
Stand-alone query language interfaces
– Example: Entering SQL queries at the DBMS interactive SQL interface
(e.g. SQL*Plus in ORACLE)
Programmer interfaces for embedding DML in programming
languages
User-friendly interfaces
– Menu-based, forms-based, graphics-based, etc.
Mobile Interfaces:interfaces allowing users to perform
transactions using mobile apps
DBMS Programming Language Interfaces

Programmer interfaces for embedding DML in a programming


languages:
– Embedded Approach: e.g embedded SQL (for C, C++, etc.), SQLJ (for
Java)
– Procedure Call Approach: e.g. JDBC for Java, ODBC (Open Databse
Connectivity) for other programming languages as API’s (application
programming interfaces)
– Database Programming Language Approach: e.g. ORACLE has
PL/SQL, a programming language based on SQL; language
incorporates SQL and its data types as integral components
– Scripting Languages: PHP (client-side scripting) and Python (server-
side scripting) are used to write database programs.
User-Friendly DBMS Interfaces

– Menu-based (Web-based), popular for browsing on the


web
– Forms-based, designed for naïve users used to filling in
entries on a form
– Graphics-based
• Point and Click, Drag and Drop, etc.
• Specifying a query on a schema diagram
– Natural language: requests in written English
– Combinations of the above:
• For example, both menus and forms used extensively in Web
database interfaces
Other DBMS Interfaces
– Natural language: free text as a query
– Speech : Input query and Output response
– Web Browser with keyword search
– Parametric interfaces, e.g., bank tellers using
function keys.
– Interfaces for the DBA:
• Creating user accounts, granting authorizations
• Setting system parameters
• Changing schemas or access paths
Database System Utilities
To perform certain functions such as:
– Loading data stored in files into a database.
Includes data conversion tools.
– Backing up the database periodically on tape.
– Reorganizing database file structures.
– Performance monitoring utilities.
– Report generation utilities.
– Other functions, such as sorting, user monitoring,
data compression, etc.
Other Tools
Data dictionary / repository:
– Used to store schema descriptions and other
information such as design decisions, application
program descriptions, user information, usage
standards, etc.
– Active data dictionary is accessed by DBMS
software and users/DBA.
– Passive data dictionary is accessed by users/DBA
only.
Other Tools
Application Development Environments and
CASE (computer-aided software engineering)
tools:
Examples:
– PowerBuilder (Sybase)
– JBuilder (Borland)
– JDeveloper 10G (Oracle)
Typical DBMS Component
Modules
Centralized and
Client-Server DBMS Architectures

Centralized DBMS:
– Combines everything into single system including-
DBMS software, hardware, application programs,
and user interface processing software.
– User can still connect through a remote terminal –
however, all processing is done at centralized site.
A Physical Centralized
Architecture
DBMS Server
Provides database query and transaction services to the clients
Relational DBMS servers are often called SQL servers, query
servers, or transaction servers
Applications running on clients utilize an Application Program
Interface (API) to access server databases via standard
interface such as:
– ODBC: Open Database Connectivity standard
– JDBC: for Java programming access
Two Tier Client-Server
Architecture
Client and server must install appropriate client
module and server module software for ODBC
or JDBC
A client program may connect to several DBMSs,
sometimes called the data sources.
In general, data sources can be files or other
non-DBMS software that manages data.
See Chapter 10 for details on Database
Programming
Three Tier Client-Server
Architecture
Common for Web applications
Intermediate Layer called Application Server or Web Server:
– Stores the web connectivity software and the business logic part of the
application used to access the corresponding data from the database
server
– Acts like a conduit for sending partially processed data between the
database server and the client.
Three-tier Architecture Can Enhance Security:
– Database server only accessible via middle tier
– Clients cannot directly access database server
– Clients contain user interfaces and Web browsers
– The client is typically a PC or a mobile device connected to the Web
Three-tier client-server
architecture
Classification of DBMSs
Based on the data model used
– Legacy: Network, Hierarchical.
– Currently Used: Relational, Object-oriented, Object-relational
– Recent Technologies: Key-value storage systems, NOSQL systems:
document based, column-based, graph-based and key-value based.
Native XML DBMSs.
Other classifications
– Single-user (typically used with personal computers)
vs. multi-user (most DBMSs).
– Centralized (uses a single computer with one database)
vs. distributed (uses multiple computers, multiple databases)
Variations of Distributed
DBMSs (DDBMSs)
Homogeneous DDBMS
Heterogeneous DDBMS
Federated or Multidatabase Systems
– Participating Databases are loosely coupled with high degree of
autonomy.
Distributed Database Systems have now come to be known as
client-server based database systems because:
– They do not support a totally distributed environment, but rather a set
of database servers supporting a set of clients.
Cost considerations for
DBMSs
Cost Range: from free open-source systems to configurations costing
millions of dollars
Examples of free relational DBMSs: MySQL, PostgreSQL, others
Commercial DBMS offer additional specialized modules, e.g. time-
series module, spatial data module, document module, XML
module
– These offer additional specialized functionality when purchased
separately
– Sometimes called cartridges (e.g., in Oracle) or blades
Different licensing options: site license, maximum number of
concurrent users (seat license), single user, etc.
Other Considerations

Type of access paths within database system


– E.g.- inverted indexing based (ADABAS is one such
system).Fully indexed databases provide access by
any keyword (used in search engines)
General Purpose vs. Special Purpose
– E.g.- Airline Reservation systems or many others-
reservation systems for hotel/car etc. Are special
purpose OLTP (Online Transaction Processing
Systems)
Define the following –Submit 23/2/202

Network Model
Hierarchical Model
Relational Model
Object-oriented Data Models
Object-Relational Models
Lecture Summary

Data Models and Their Categories


Schemas, Instances, and States
Three-Schema Architecture
Data Independence
DBMS Languages and Interfaces
Database System Utilities and Tools
Database System Environment
Centralized and Client-Server Architectures
Classification of DBMSs

You might also like