Vous êtes sur la page 1sur 30

Fundamentals of

Database System
Engr. Jayhan C. Sarne
Terminologies of database

• Data
• Known facts 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)

• A set of software programs that allows user 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, stored or searched all
using a DBMS.
Database Management System (DBMS)

• Example usage of Database System:


• Membership and subscription mailing list
• Accounting and bookkeeping information
• The data obtained from scientific research
• Customer information and Inventory information
• Personal records
• Library information
Database
System
Environment
Properties of databases

• Completeness
• Integrity
• Flexibility
• Efficiency
• Usability
• 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.
Completeness • Database has to support the requirements
• It requires the complete understanding of database
structure, relationship and constraint.
• 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
Integrity database is accurate, valid, and consistent.
• Any applicable integrity constraint and data validation
rules must be satisfied before permitting a change to
the database.
• Ensures that a database can evolve (without requiring
excessive effort) to satisfy changing user requirements.
Flexibility • Ability to upgrade or change the functionality of
database up to the current need.
• Ability to support wide area of data types.
• Ensures that users do not unduly long response times
when accessing data.
Efficiency • The database should be able to perform effectively.
• The designer has to choose the right DBMS, the right
access path in order to improve efficiency.
• 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.
Usability • 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

• 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
Features Description
Database definition Language and graphical tools to define entities, relationships,
integrity constraints, and authorization rights.
Nonprocedural access Language and graphical tools to access data without complicated
coding
Application development Graphical tools to develop menus, data entry forms, and reports;
data requirements for forms and reports are specified using
nonprocedural access
Procedural language interface Language that combines nonprocedural access with full
capabilities of programming language
Transactional processing Control mechanisms to prevent interference from simultaneous
user and recover lost data after a failure
Database tuning Tools to monitor and improve database performance
Database Definition

• Define database structure before using a database.


• Tables and Relationships.
• The Data Definition Language (DDL)
• Define schema or modify the existing one
• Cannot be used to manipulate data
• Standard DDL: Structured Query Language (SQL)
• SQL CREATE TABLE statement
• Graphical tools (User Interface)
Graphical
Tool for
Database
Definition
Nonprocedural Access

• Once a database has been created in a DBMS using a DDL, the user
accessed 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 ratherthan how it is to be
retrieved.
• Example:
• SQL: Select name, address, city, state, zip order by zip
• 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 documents 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:
Form
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 databaseperformance.


• Example:
• Memory Tuning
• I/O Tuning
• Application Tuning
Advantages using DBMS

• 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.
Three Level Architecture of DBMS

• Mapping among schema levels are needed to transform requests and data.
Programs refer to an external schema, and mapped by the DBMS to the
internal schema for execution.
• Also known as ANSI-SPARC Three-level Architecture
Three-Level
Architecture
of DBMS
Three-Level Architecture of DBMS

• 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
Client –
Server
Architecture
of DBMS

Vous aimerez peut-être aussi