Sunteți pe pagina 1din 59

CHAPTER 1:

FUNDAMENTALS OF
DATABASE
MANAGEMENT SYSTEM

DFC2033 Database System


Course Learning Outcome
CLO1:  Apply  the  fundamentals  concepts  of  database  
management  and  rela:onal  data  model  to  create  a  
database  based  on  an  organiza:on’s  requirements.  
(C3,  PLO1)
Learning Outcome
¨  Define  Database  Management  System  (DBMS)  
¨  Describe  the  proper:es  of  database  
¨  Iden:fy  various  common  DBMS  
¨  Common  features  of  DBMS  
¨  DBMS  architecture  
•  Three-­‐scheme    
•  Client-­‐server  
 
Terminologies of database
4

¨  Data
¤  Knownfacts that can be recorded and have implicit
meaning
¨  Database
¤  A collection of related data.
¨  Database System
¤  Composed of 5 major parts: Hardware, Software (DBMS),
People, Procedures and Data
¨  Database Management System (DBMS)
¤  Collection
of components that support data acquisition,
dissemination, storage, maintenance, retrieval, and
formatting
Database Management System (DBMS)
5

¨  A set of software programs that allows users to create, edit


and update data in database files, and store and retrieve
data from those database files.
¨  Data in a database can be added, deleted, changed, sorted
or searched all using a DBMS.
¨  Example usage of Database System:
¤  Membership and subscription mailing lists
¤  Accounting and bookkeeping information
¤  The data obtained from scientific research
¤  Customer information and Inventory information
¤  Personal records
¤  Library information
Database System Environment
6

Figure 1: Simplified database system environment


E
(ElMasri & Navathe, 2011)
Properties of databases
1.  Completeness
2.  Integrity
3.  Flexibility
4.  Efficiency
5.  Usability
Completeness
¨  Ensures that users can access the data they want
includes ad hoc queries, which would not be
explicitly given as part of a statement of data
requirements.
¨  Database has to support the requirements

¨  It requires the complete understanding of database


structure, relationship and constraint.
Integrity
¨  Ensures that data is both consistent (no contradictory
data) and correct (no invalid data), and ensures
that users trust the database.
¨  Database integrity ensures that data entered into

the database is accurate, valid, and consistent.


¨  Any applicable integrity constraint and data
validation rules must be satisfied before permitting
a change to the database.
Flexibility
¨  Ensures that a database can evolve (without requiring excessive
effort) to satisfy changing user requirements.
¨  Ability to upgrade or change the functionality of database up to the
current need.
¨  Ability to support wide area of data types
Efficiency
¨  Ensures that users do not have unduly long response
times when accessing data.
¨  The database should be able to perform

effectively.
¨  The designer has to choose the right DBMS, the right

access path in order to improve the efficiency.


Usability
¨  Ensures that data can be accessed and manipulated
in ways which match user requirements.
¨  The database design significantly impacts the
quality and usability of the data.
¨  A database design that is not properly normalized
will introduce data update anomalies and data
errors.
¨  A poorly designed database may place the entire
organization at risk due to the incomplete or
incorrect information.
A Various Common of DBMS
13

¨  Server DBMS


¤  Oracle

¤  SQL Server


¤  DB2
¤  MySQL, Firebird, PostgreSQL (Significant open source
DBMSs)
¨  Desktop DBMS
¤  Microsoft Access
¤  FoxPro, Paradox, Approach, FileMaker Pro
Common Features of DBMS
14

Features Description
Database  defini:on   Language  and  graphical  tools  to  define  en::es,  
rela:onships,  integrity  constraints,  and  authoriza:on  
rights.  
Nonprocedural     Language  and  graphical  tools  to  access  data  without  
access   complicated  coding  
Applica:on   Graphical  tools  to  develop  menus,  data  entry  forms,  
development   and  reports;  data  requirements  for  forms  and  reports  
are  specified  using  nonprocedural  access  
Procedural   Language  that  combines  nonprocedural  access  with  full  
language  interface   capabili:es  of  a  programming  language  
Transac:onal   Control  mechanisms  to  prevent  interference  from  
processing   simultaneous  users  and  recover  lost  data  aRer  a  failure  
Database  tuning   Tools  to  monitor  and  improve  database  performance  
Database Definition

¨  Define database structure (schema) before using a


database.
¤  Tables and relationships.
¨  The Data Definition Language (DDL)
¤  Defineschema or modify the existing one
¤  Cannot be used to manipulate data
¤  Standard DDL: Structured Query Language (SQL)
n  SQL CREATE TABLE statement
n  Graphical tools (User Interface)
Graphical Tool for Database Definition

Relationships

Tables
s
Nonprocedural Access
¨  Once a database has been created in a DBMS using a
DDL, the user accesses the data using a Data
Manipulation Language (DML).
¨  The standard DML is SQL.
¨  Nonprocedural :
¤  A language that allows the user to state what data is
needed rather than how it is to be retrieved.
¤  Example :
n  SQL : Select name, address, city, state, zip order by zip
n  Graphical Tool - SQL Query Wizard
Nonprocedural Access
¨  Query: request for data to answer a question
¨  Indicate what parts of database to retrieve not the

procedural details
¨  Improve productivity and improve accessibility
SQL Query Wizard
Application Development
¨  Graphical tools for developing forms and reports
using non-procedural access.
¨  Form:

¤  Formatted document for data entry and display


¨  Report:
¤  Formatted document for display
¨  Use nonprocedural access to specify data
requirements of forms and reports
Application Development : Form Generator
Application Development : Report Generator
Procedural Language Interface
¨  A language that combines nonprocedural access
with procedural programming.
¨  Combine procedural language with nonprocedural

access
¨  Why

¤  Batch processing


¤  Customization and automation

¤  Performance improvement


Transaction Processing

¨  Transaction:
¤  Executing program that forms a logical unit of database
processing
¤  Includes one or more database access operation – insertion,
deletion, modification, retrieval.
¨  Perform scheduling of operations and implements
concurrency control algorithms.
¨  Control simultaneous users
¨  Recover from failures
Database Tuning
¨  Tools to monitor and improve database
performance.
¨  Example:

¤  Memory Tuning


¤  I/O Tuning
¤  Application Tuning
Advantages using DBMS
26

¨  Control redundancy in data storage and in


development of effort.
¨  Restricting unauthorized of data.

¨  Providing persistent storage for program objects.

¨  Providing backup and recovery services.

¨  Providing multiple interfaces to different classes of


users.
¨  And many more…
Three Level Architecture of DBMS
27

¨  Mappings among schema levels are needed to


transform requests and data. Programs refer to an
external schema, and are mapped by the DBMS to
the internal schema for execution.
¨  Also known as ANSI-SPARC Three-level Architecture
Three-Level Architecture of DBMS
28

Figure 2: The Three Level Architecture (ElMasri & Navathe, 2011)


Three-Level Architecture of DBMS
29

Defines DBMS schemas at three levels:


¤  Internal schema at the internal level to describe
physical storage structures and access paths. 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 at the external level to describe the
various user views. Usually uses the same data model as
the conceptual level.
Three-Level Architecture of DBMS
30
Client-Server Architecture of DBMS
31

Figure 3: Client
Server Architecture
Client-Server Architecture of DBMS
32

¨  To improve performance and availability of data, the


client–server architecture supports many ways to
distribute software and data in a computer network.
¨  Client–server architectures provide a flexible way for

DBMSs to interact with computer networks.


¨  The simplest scheme is just to place both software and
data on the same computer, Figure 3(a).
¨  In Figure 3(b), the server software and database are
located on a remote computer.
¨  In Figure 3(c), the server software and the database

are located on multiple remote computers.


CROSSWORD PUZZLE

33
Learning Outcome
¨  Categories  of  DBMS  (including  the  benefits)  
¨  Desktop  databases  
¨  Server  database  
¨  Select  an  appropriate  DBMS  suitable  for  a  given  
business  requirements.  
¨  Iden:fy  the  contribu:on  of  database  technology  
to  society.  
 
Types of Data Model

•  Object  Oriented   •  Network   •  Unify  


•  En0ty  Rela0onship   •  Hierarchical   •  Frame  Memory  
•  Func0onal   •  Rela0onal  
•  Seman0c  
Record Based Data Model
37

¨  Represent  data  by  using  record  structures  and  


hence  are  called  record-­‐based  data  models.    
¨  This  type  of  model  is  used  to  design  the  databases  

at  external  or  view  level  as  well  as  logical  or  


conceptual  level  and  it  gives  the  details  of  database  
designing  and  it  is  tabular  representa:on.  eg.  
n  Rela0onal  model    
n  Hierarchical  model  
n  Network  model  
Rela:onal  Model  
38

¨  The  rela0onal  model  (RDBMS,  Rela%onal  database  


management  system):  The  data  is  stored  in  two-­‐
dimensional  tables  (rows  and  columns).  The  data  is  
manipulated  based  on  the  rela:onal  theory  of  
mathema:cs.    
 
Hierarchical  Model  
39

¨  The  hierarchical  model:  The  data  is  sorted  


hierarchically,  using  a  downward  tree.  This  model  
uses  pointers  to  navigate  between  stored  data.  It  
was  the  first  DBMS  model.  
 
 
 
Network  Model  
40

¨  The  network  model:  like  the  hierarchical  model,  this  model  
uses  pointers  toward  stored  data.  However,  it  does  not  
necessarily  use  a  downward  tree  structure.    
 
Object Based Data Model
41

¨  The  object-­‐oriented  model  defines  a  database  in  terms  


of  objects,  their  proper:es,  and  their  opera:ons.    
¨  The  most  commonly  object  based  data  models  are  en:ty  
rela:on,  seman:c,  Object  oriented,  and  func:onal  data  
models.  
The Object-Oriented Model
42

¨  The  object  model  (ODBMS,  object-­‐oriented  


database  management  system)  
¨  The  data  is  stored  in  the  form  of  objects,  which  are  

structures  called  classes  that  display  the  data  


within.  The  fields  are  instances  of  these  classes    
Physical Based Data Model
43

¨  Physical  based  data  model  describes  how  data  is  


stored  in  the  computer  by  represen:ng  
informa:on  such  as  record  formats,  record  
orderings,  and  access  paths.  It  is  the  process  of  
choosing  specific  storage  structures  and  access  
paths  for  the  database  files  to  achieve  good  
performance  for  the  various  database  
applica:ons.    
Categories of DBMS
¨  Desktop Databases are designed to run on
“desktop” (or personal) computers and its offer an
inexpensive, simple solution to many less complex
data storage and manipulation requirements.
¨  Server Databases offer organizations the ability to

manage large amounts of data efficiently and


enables many users to access and update the data
simultaneously. Although its pricey, a server-based
database can provide a comprehensive data
management solution.
Categories of DBMS

Desktop Database Server Database


Microsoft Access Oracle

Fox Pro Microsoft SQL Server

FileMaker Pro IBM DB2

Paradox Open Source :


MySQL, Firebird, PostgresSQL
Lotus
Benefits of Desktop Database

¨  Easy Management


¤  Simple
functionality to modify and maintain the
database
¨  Low Running Cost
¤  No need for extra hardware support
¤  No need to hire expertise

¨  Easy to use


¤  No advance technical knowledge is needed
¤  Programs are normally very intuitive and easy to learn.
Benefits of Server Database
¨  Increase Scalability
¤  any element can be upgraded when needed
¨  Increase Flexibility
¤  newtechnology can be easily integrated into the
system
¨  Increase Accessibility
¤  server
can be accessed remotely and across multiple
platforms
Benefits of Server Database

¨  Increase performance


¤  Different CPU’s process application in parallel
¤  Easier to tune the server machine since the task is only to
perform database processing
¨  Increase Consistency
¤  Centralization
- access, resources, and data security are
controlled through the server.
Things to Consider to Select DBMS
1.  Data Model
2.  Number of user
3.  Number of sites
4.  Cost
5.  Purpose
Data Model
¨  A set of concepts to describe the structure of a database and
certain constrain that the database should obey (refer data
model slide)
¨  Types of data model:
¤  Hierarchy
¤  Network
¤  Relational
¤  Object-oriented
¨  Current commercial database used relational data model.
¨  Object oriented – has been implemented but not had
widespread use.
Number of users
¨  Single user – support only one user at one time
¨  Multi user – support multiple use at one time
Number of sites
¨  Centralized
¤  Data is stored at a single computer site.
¤  DBMS can support multiple user, but the DBMS and the
database reside totally at a single computer site.
¨  Distributed
¤  Canhave many the actual database and DBMS
software distributed over many sites, connected by a
computer network.
Cost
¨  Quite difficult to propose any type of DBMS based
on cost which provide different type of services.
¨  Open source product : MySQL, PostgrSQL
Purpose

¨  General Purpose :


¤  Does not include many transactions
¨  Special Purpose:
¤  Require many transaction.
¤  When performance is primary consideration, a special
purpose of DBMS can be design.
¤  Online Transaction Processing (OLTP) system which
support large number of concurrent processing without
imposing excessive delay
¤  Example: Airline Reservation System
Comparison between DBMS
DBMS Operating Estimated Transaction Interface Max DB size
System Price Support
Oracle Window $40000 - Yes GUI Unlimited
Mac $12800 SQL
Unix
IBM DB2 Window $25000 - Yes GUI 512 TB
Mac $800000 SQL
Unix
SQL Server Window Yes GUI 524258 TB
SQL
MySQL Window Open Source Yes GUI 256 TB
Linux SQL
Mac
Solaris
Netware
Microsoft Window Package with GUI 2G
Access Microsoft SQL
products
Group Discussion
¨  You are responsible for selecting a new DBMS
product for a group of users in your organization.
How should you do about evaluating and selecting
the best DBMS product?
The Impact of Information Technology on Work
and Society
¨  1969: The Arpanet is introduced, funded by the department of defence.
¨  1970: The first automatic teller machine is introduced.
¨  1971:
¤  The first single chip central processing unit was introduced, the Intel 4004.
¤  The first network e-mail message is sent by Ray Tomlinson of Bolt Boranek and Newman.
¨  1972: Lexitron, Wang and VYTEC introduce Word Processing systems.
¨  1973: The Xerox Paulo Alto Research Centre developed the Alto, an experimental computer that uses a graphical user
interface and a mouse.
¨  1978: Ron Rivest, Adi Shamir and Leonard Adelman introduce the RSA cipher as a public key cryptosystem.
¨  1979: The first electronic spreadsheet program is introduced.
¨  1981: IBM introduces its first personal computer with an operating system developed by Microsoft.
¨  1983: The switchover to the TCP\IP protocol marks the beginning of the global Internet.
¨  1985: Microsoft releases the Windows operating system.
¨  1989: The world wide web project is proposed to the European Council for Nuclear Research (CERN).
¨  1990: Windows version 3.0 is released bringing a stable graphical user interface to the IBM Personal Computer.
¨  1993:The Mosaic NCSA is developed by the National Centre for Super-computing Applications.
¨  1995:The first full length feature movie created by a computer is released. Toy Story.
¨  Late 1990’s:The emergence of electronic commerce.
Contribution of Database Technology to Society

¨  Reduced Application Development Time


¤  Lesstime to create new application using DBMS.
¤  Example: Print report, Retrieve Data

¨  Flexibility
¤  Allowevolutionary changes to the structure of
database without affecting the stored data and
existing application.
Contribution of Database Technology to Society

¨  Availability of Up-to-Date Information


¤  Available to all user
¤  As soon as update apply, it is available to all users.

¨  Economic of Scale


¤  DBMS can be shared among various department and
activities thus reduced the data redundancy

S-ar putea să vă placă și