Download Project Overview - Dr. Abdullah Almutairi | Kuwait University

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Expense and cost recovery system (ECRS) wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Data model wikipedia , lookup

Data analysis wikipedia , lookup

Information privacy law wikipedia , lookup

Concurrency control wikipedia , lookup

Data vault modeling wikipedia , lookup

Versant Object Database wikipedia , lookup

Business intelligence wikipedia , lookup

Database wikipedia , lookup

Open data in the United Kingdom wikipedia , lookup

Relational model wikipedia , lookup

Clusterpoint wikipedia , lookup

Database model wikipedia , lookup

Transcript
Databases
Module # 11
Mostafa Abd-El-Barr
Modified by
Jehad Al Dallal
July 2012
1
Objectives
 Introduction to Data Files
 Introduction to Database
 Why Database?
 Database management





Database Management Systems (DBMS) Organization
Hierarchical
Network
Relational
Object Oriented





Types of Databases
Individual
Shared
Distributed
Proprietary
 Database Use and Issues
2
Data Files
Data Organization

Data is organized into Groups or Categories. Each Group is
more complex than the one before.

A Character is a single letter, number, or a special character.

A Field contains a set of related characters, e.g., Person’s
Name on the College Registration.

A Record is a collection of related fields, e.g., Your own
information on the College Registration Form.

A File is a collection of related records, e.g., all Students’
Registration information could be a file.

A Database is a collection of related files, e.g., Registration
information of all colleges in a University could be a database.
3
Data Files (Cont’d)
 A Key Field is the particular field of a record that
is used to uniquely identifies each record.
Examples: Student ID Number, Civil ID Number,
Employee ID Number.
 Batch Data Processing
Data is collected over a long period of time and
processed all at once.
Example: Bank Credit Card Bill.
 Real-Time Data Processing
Data is processed at the same time the
transaction occurs
Example: Your ATM Balance.
4
Data Files (Cont’d)
 Two types of files are used to update data:
master files and Transaction Files.
 Master File: a complete file containing all records
current up to the last update.
Example: The data file used to prepare your last
month’s telephone bill.
 Transaction File: Contains recent changes to
records that will be used to update the master
file.
Example: A temporary file that accumulates
telephone charges.
5
Data Files (Cont’d)
 File Organization
Three types of file organization: Sequential, Direct, and Index
Sequential file organization.
 Sequential File Organization
Records are stored physically one after another in a predetermined
order. The order is determined by the Key Field on each record, such
as the student ID number.
 Direct
File Organization
Records are stored on a disk in a particular address or location that
can be determined by their Key Field.
A Hashing Program is used to convert the Key Field’s numeric value
to a particular storage address.
 Index
Sequential File organization
An index lists the Key to each group of records stored and the
corresponding disk address for that group of records. Records in a
file are stored sequentially.
6
Data Files (Cont’d)
Type
Advantages
Disadvantages
Sequential
Efficient access
to all or large part
of records, Low cost
Slow access to
specific records
Direct
Fast Access to specific
Records
High Cost
Index
Sequential
Faster than Sequential
Efficient than Direct
Not as Efficient as Sequential
Not as fast as Direct
High Cost
7
Database
 Why Database?
Databases are used to integrate Data. They lead to the
following advantages.
•
•
•
•
Sharing of Data.
Security of Data.
Reduced Data Redundancy.
Data Integrity: data consistency and accuracy
8
Database (Cont’d)
 Database Management Systems (DBMS)
Special Software used to create, modify, and access database.
DBMS consists of two main components.
(1) Data Dictionary
Contains the description of the structure of data used in the
Database.
Name of the field, data type, number of characters, etc.
(2) Query Language
An easy-to-use language understandable to most users.
Example: Structured Query Language (SQL)
9
Database (Cont’d)
 Database Organization
 Hierarchical
In this case, Fields (records) are represented as nodes in a tree. A
parent-children relation exists between nodes. A parent node can
have more than one child node (a one-to-many relation). A child
node has only one parent node.
Drawbacks
(1) Deletion of a parent node leads to the deletion of all its children
nodes.
(2) A child node can only be added if a parent node is added.
(3) No relationships exist between children nodes
10
Hierarchical Database:
departure
arrival
Los Angeles
Chicago
Flight number
passenger
Adams, S.
Cleveland
New York
Boston
110
139
209
Howell, R.
McGillen, T.
11
Database (Cont’d)
 Network
A hierarchical database in which a child node may have more
than one parent, i.e., a many-to-many relationship. A node
can be reached through more than one path.
Advantages: More flexible and more efficient than the Hierarchical
database.
 Relational
Data elements are stored in tables. A table is called a relation.
Rows in the table represent Records and columns represent
Fields. This is the most common database for PC, e.g., Access
Advantages: Simple, easy to add and delete data
12
Network Database:
course
teacher
student
Business
101
Jones, P.
Allen, D.
Eaton, P.
Computer
Science 101
Long, M.
Hively, M.
Mathematics
101
Miller, P.
Moore, L.
Wayne, A.
13
Relational Database:
Address Table
Name
Aaron, Linda
Abar, John
Abell, Jack
License Number
FJ1987
D12372
Street Address
City
State
10032 Park Lane San Jose
1349 Oak St
Lakeville
95874 State St
Stone
LK3457
CA
CA
CA
Zip
95127
94128
95201
Key fields
linked
Key fields
linked
Outstanding Citation Table
Owner’s Table
Name
Abrams, Sue
Abril, Pat
Abell, Jack
Plate Number
LMJ198
ZXA915
ABK241
License
Number
T25476
D98372
LK3457
Citation
Code
00031
19001
89100
Violation
Speed
Park
Speed
14
Database (Cont’d)
 Object-Oriented
Deals with objects. These can include both data (attributes)
and actions (methods) to be taken on the data, e.g. how to
calculate and when to print monthly bills. OO can also include
unstructured data such as Photos, Graphics, and Video.
Advantages: Flexibility.
15
Object-Oriented Database:
Employees
Classes
Objects
Attributes
Trainers
Front desk
Photo:
Last name:
First name:
Address:
Wage rate:
Photo:
Last name:
First name:
Address:
Wage rate:
Wage rate X
Hours
worked
Wage rate X
Hours worked
Time
cards
Managers
Photo:
Last name:
First name:
Address:
Yearly salary:
Method to
Calculate
weekly
Payroll check
Yearly salary/
52 weeks per year
16
Types of Databases
 Individual (Microcomputer)
Collection of files used by only one person. The data and the
DBMS are normally stored on the user’s HD.
 Shared (Company)
This is normally a large DB stored on a mainframe and
managed by a Database Administrator. Company users can
have access to the DB over a network. Company DBs are the
foundation for Management Information Systems (MISs)
17
Types Databases (Cont’d)
 Distributed
Data is stored in several locations. Accessibility is made
through networks.
 Proprietary (Information Utilities or Databanks)
Typically a very large DB developed to cover particular needs
for a specific organization.
18
Database Uses and Issues
 Data Warehouse
A collection of data from a variety of internal and
external DBs needed to support the work of
managers and business professionals.
 Data Mining
This is a technique used to search Data Warehouses
for related information and patterns.
 Database Security
DBs may contain personal and private information
about people. Therefore they have to be protected
against misuse or abuse.
19