Professional Documents
Culture Documents
Paul Danquah
Essence of Database Systems
• Many computing applications deal with large amounts of information
• Basic concepts and skills with database systems are part of the skill
set you will be assumed to have as an IT graduate
Database Terminologies
• Data: term data refers to raw facts and figures, such as orders and
payments
• Data represent the values physically recorded in the Database; e.g. 10023
• Info: processed data into meaning, such as balance due and quantity on
hand Information, though, refers to the meaning of those values as
understood by some users
• e.g. Mohammed’s Employee number is 10023
Database Terminologies
• DBMS: Software used to create or maintain these database tables
• The definitions of all data in the DB are called Meta-data (data about
data) and it is stored in a Data Dictionary (DD)
Database Systems
• Database
A databasesystems
systemallow
consists
users
of to
• Data (the database)
•• Software
Store
•• Hardware
Update
•• Users
Retrieve
• Organise
• Protect
• Application developers
• Write software to allow end
users to interface with the • Database systems
database system
programmer
• Writes the database
software itself
Exhibit Interaction Between the User, DBMS
and Database
Copyright ©2016 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. MIS5 | CH3 9
Database Management Systems
• Examples of DBMS:
• Oracle
• A database is a collection of information • DB2 (IBM)
• MS SQL Server
• MS Access
• Ingres
• A database management system (DBMS) is • PostgreSQL
the software than controls
that information • MySQL
What the DBMS does;
• DBMS
Provides
provides
users with
• Persistence
•• Concurrency
Data definition language (DDL)
•• Integrity
Data manipulation language (DML)
•• Security
Data control language (DCL)
• Data independence
• Data Dictionary
• Often these the
• Describes aredatabase
all the same
itself language
Components of a DBMS
Database engine
Data definition
Data manipulation
Application generation
Data administration
Database Engine
• Heart of DBMS software
• Descriptions
• This of database
is data about data orobjects (tables, users, rules, views, indexes,…)
‘metadata’
• No
Datastandards
is stored in files
• Data
Each duplication
file has a specific format
• Programs
Data dependence
that use these files depend
on knowledge about that format
• No way to generate ad hoc queries
• - RDBMSs can provide much faster access to data than flat files.
• - RDBMSs can be easily queried to extract sets of data that fit certain criteria.
• - RDBMSs have built-in mechanisms for dealing with concurrent access so that you, as a
programmer, don’t have to worry about it.
• - RDBMSs have built-in privilege systems. MySQL has particular strengths in this area.
Lifecycle of Database System Development
Relational Systems
• Problems with early databases • Then, in 1970, E. F. Codd
wrote “A Relational Model of
• Navigating the records requires
Data for Large Shared Databanks”
complex programs and introduced the relational
model
• There is minimal data
independence
• No theoretical foundations
Relational Systems
• The Database approach rests • Database processing involves
upon the concept of the modern assembling the data contained in
database which is formally the tables into a form that is
defined as an integrated, self- suitable for the end-user's
particular application needs.
describing collection of related
records organized into files
which are often referred to as
database tables.
Relational Systems
• Information is stored as tuples • The relational model covers 3
or records in relations or tables areas:
• Foreign key
• Size
• Cost of DBMS
• DBMS Size
Entity-Relationship Model concepts
• Top-down Approach
- Identify data entities
- Determine attributes of the entities
- Determine the nature of the relationships
• Bottom-up Approach
- Gather information on data used by the organization by examining
current files and evaluating existing reports and forms
- Group gathered information into Entities and Attributes
- Identify relationship and determine their nature.
Entity-Relationship Model concepts
• Entity
• Attributes
• Relationship
• Constraints
• Cardinality
• Dependencies
• Introduction to SQL
• Data Definition
• Data Manipulation
• Aggregation
Introduction to SQL
• An ISO standard now exists for SQL, making it both the formal and de
facto standard language for relational databases
Creating Tables
CREATE TABLE table;
Dropping Tables
DROP TABLE table;
DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;
Output of Command
Table created called "articles"
Fields are
For example,to insert a record into Book-O-Rama’s customers table,you could type
insert into customers values (NULL, 'Julie Smith', '25 Oak Street', 'Airport West');
’’’
SELECT
WHERE clause
select c.name
from customers as c, orders as o, order_items as oi, books as b
where c.customerid = o.customerid
and o.orderid = oi.orderid
and oi.isbn = b.isbn
and b.title like ‘%Java%’;
Retrieving Data in a Particular Order
Topics:
Using formal methods to separate the data into multiple related tables
Fewer null values for data that is either not required or not known