L1-Introduction to DB
L1-Introduction to DB
1
Learning Outcomes:
5
Why use a Database?
6
Why Database Technology?
7
Examples of Database Applications
8
Library
Membership
Reference
Borrow
Return
Order
9
Air Line Reservations
10
Hotel Reservations
Availability of Rooms,
reservation
11
Hospital System
12
Components of Database System
Environment
14
Components of Database System
Environment
Hardware
Set of physical devices on which a database
resides. Can range from a PC to a network of
computers.
Software
– Database Management System (DBMS)
– Operating System
– Application Programs
– User Interface
15
Components of Database System
Environment - Data
Data
– A representation of facts, concepts or
instructions in a formalised manner suitable
for communication, interpretation or
processing by human beings or by automatic
means.
17
Information
Eg:-
• Process Date of Birth ->Age
• Process Salary (all) ->Highest paid employee
• Process all -> No of employees
• Process all -> Employees working for Sales division
18
Components of Database System
Environment
Procedures
Instructions and rules that should be applied to the
design and use of the database.
People
Two different types of people (end-users and
practitioners) are concerned with the database.
End-Users
– are the ‘clients’ for the database, who need information from the
database to carry out their duties.
e.g. Executives, managers, staff, clerical personnel
19
Components of Database System
Environment - People
Practitioners
– People responsible for the database
system and its associated application
software.
e.g. Data and Database administrators, Database designers,
Application developers.
20
People - Job Definitions
Data Administration: A high-level function that is
responsible for the overall management of data
resources in an organization, including
maintaining corporate-wide definitions and
standards.
22
Manual Systems – Information on library books
23
File-Based Systems
Personnel
Application Employee file
Name, Address, NID number, Designation
Payroll
Payroll file
Application
NID, Name, Address, Hours worked, Pay rate
Benefit
Benefit files
Application
Name, NID, Address, Insurance, Pension plan
25
Limitations of File-Based Approach
Duplication of data
– Same data is held by different programs.
– Wasted space and potentially different values
and/or different formats for the same item.
26
Limitations of File-Based Approach
Data dependence
– File structure is defined in the program code.
27
Program-Data/Data Dependence
Result:
– the database and Database Management System
(DBMS).
29
Database
30
Database Management System (DBMS)
31
Database Approach
Personnel
Application
File 1
Payroll
DBMS File 2
Application
File 3
Benefit
Application
D a ta b a s e
Entities/objects
F ile F ile F ile
F ie ld
R e c o rd R e c o rd R e c o rd
B y te B y te B y te
F ie ld F ie ld F ie ld
attributes
B it B it B it
33
Data Hierarchy
Record
Byte
•A single character (letter, number, symbol) is represented using a
group of bits, E.g. 10101010 letter J in ASCII
35
Bit
•The smallest unit of data, E.g. 0 or 1
Data Dictionary/System Catalog
36
Meta Data
E.g. Employee
Name Type Length Min Max Description
EmpNo Number 9 Employee No.
Name Character 30 Employee Name
Dept Character 10 Dept. No.
Salary Number 8 5000 60000 Employee Salary
38
Table Definition
39
Database Approach
Data Definition Language (DDL).
– Permits specification of data types, structures and
any data constraints.
– All specifications are stored in the database.
40
Database Approach
41
Data Security
42
Data Integrity
43
Concurrency control
44
Recovery Control
45
Database Server Architecture
Client/server platform
– A local area network consisting of client computers
which receive services from a server computer.
Database server
– A program running on server hardware to provide
database services to client machines.
46
Client/Server Platform
Database Server
Multi-user
47
Database Applications
Personal databases
Workgroup databases
Departmental databases
Enterprise databases 48
Personal databases
49
Workgroup databases
50
Departmental databases
52
Enterprise databases
Data warehouse
– An integrated decision support database whose content is
derived from the various operational databases.
53
Database Approach -Advantages
Increased productivity 54
Database Approach -Advantages
Enforcement of standards
Improved security
Increased concurrency
55
Improved maintenance through
Program-Data/Data Independence
The separation of data descriptions
(metadata) from the application programs
that use the data.
68
-END-