DB 1
DB 1
Subject: Database
Class: 2nd Year
By: Lahieb M. AL-Yassiry
Lecture One
Introduction
1. Introduction
A database system is basically a computerized record-keeping system. The
database itself can be regarded as a kind of electronic filling cabinet; i.e., it is a
container for a collection of computerized data files. Users of the system can
perform a variety of operations on such files – for example:
Adding new, empty files to the database;
Inserting data into existing files;
Changing data in existing files;
Deleting data from existing files;
Removing existing files from the database.
Fig.1 shows a very small database containing just one file, called TEST, which
in turn contains data of Suppliers.
Fig.2 shows an example of a retrieval operation against that database, with the
data returned by the operation.
Retrieval:
Select SNAME, S#, CITY
From TEST
Where STATUS=20;
Result:
SNAME S# CITY
SMITH S1 LONDON
CLARK S4 LONDON
There are many operations can be applied on the same file like (Insert, Change
& Delete), as shown bellow:
Al-Nahrain University, Information Engineering College 2
Subject: Database
Class: 2nd Year
By: Lahieb M. AL-Yassiry
Database
Note: We must first distinguish between two terms "data" & "information".
Data: it refers to what is actually stored in the database.
Information: it refers to the meaning of that data as understood by some user.
A: Data:
Database system is available on machines that range all the way from the
smallest personal computers to the large mainframes. Systems on large machine
("large systems") tend to be multi-user, whereas those on smaller machines
("small systems") tend to be single-user.
Single-user system: is a system in which at most one user can access the
database at any given time;
Multi-user system: is a system in which many users can access the database at
the same time.
The data is all stored in a single database. The data in the database-at least
in a large system, will be both integrated & shared. These two aspects, data
integration & data sharing, represent a major advantage of the database systems.
Ex:
Employee NAME ADDRESS DEPARTMENT SALARY -----
Al-Nahrain University, Information Engineering College 4
Subject: Database
Class: 2nd Year
By: Lahieb M. AL-Yassiry
Shared: it's mean that individual pieces of data in the database can be shared
among different users. Each of those users can have access to the same piece of
data, possibly for different purpose. Which mean different users can effectively
even access the same piece of data at the same time ("concurrent access").
B: Hardware: It consist of
The secondary storage volumes: mostly magnetic disk that are used to hold
the stored data together with (the I/O devices, device controllers, I/O
channels)
The hardware processor(s) & main memory that are used to support the
execution of the database system software.
C: Software:
The software between the data as physically stored & the users of the
system is known as DBMS. It is software that all requests for access to the
database are handled by it.
D: Users:
There are three types of users:
Application Programmers: responsible for writing database application
program in some programming language such as (Java, Coble, PL/I, C++).
The programs can be batch application or online application.
Database Administrator (DBA).
End users: Who interact with the system from online workstation or
terminals. A given end user can access the database via one of the online
applications. Those applications are built-in not user-written. Most database
systems include at least one such built-in application namely a query
language processor, by which the user can issue database requests
(commands) such as Select, Insert to the DBMS.
3. What is a Database?
Suppliers Project
Warehouse Parts
Data Administrator (DA): It is a manager who understands the data & need to
enterprise with respect to the data at a senior management level.
DA's job: To decide what data should be stored in the database in the first place,
& to establish policies for maintaining & dealing with that data once it has been
stored.
5. Advantage of Database:
6. Data Independence:
It can most easily be understood by first considering its opposite.