Introduction To Database System and Information Retrieval (Part 1)
Introduction To Database System and Information Retrieval (Part 1)
3
DATA VS INFORMATION
1) STID3014 – A
2) CGPA – 3.42
3) Distance – 17.70 km
4) Name – Jack
5) Average Marks for STID3013 – 70.5
6) 24/11/2023 - The date of your mid sem exam.
4
DIFFERENCES BETWEEN DATA AND INFORMATION
Data are raw facts, i.e. Data : building blocks of Information is produced by Information is used to
telephone number, birth information processing data reveal the meaning of data
date, name, etc.
5
6
7
8
Data vs. Information
SIRIUS SATELLITE RADIO INC.
Data $7.20
6.34 $7.00
6.45 $6.80
6.39
Stock Price
$6.60
6.62
$6.40
6.57
$6.20
6.64
6.71 $6.00
6.82 $5.80
7.12 1 2 3 4 5 6 7 8 9 10
10
Information is prepared data that has been processed,
aggregated and organized into a more human-friendly
format that provides more context.
11
What about
knowledge?
12
Data Info
Knowledge?
Decision Making
The owner of the holiday cottage can see that it has hardly been rented in May 2023.
She might decide to lower her rental price in order to get extra bookings.
13
Knowledge describes the collected
information that is available about a particular fact or a person.
The knowledge of this situation makes it possible to make
informed decisions and solve problems. Thus,
knowledge influences the thinking and actions
of people. Machines can also make decisions based on new
knowledge generated by information. In order to gain knowledge, it is
necessary to apply such information.
14
DATA VS INFORMATION VS
KNOWLEDGE
Informatio
Data Knowledge
n
16
17
Example of Database Application
Studying at university
SEARCH ENGINE UUM Portal
SOCIAL MEDIA UUM Add-drop
ONLINE GAME UUM library
BOOKING A HOLIDAY AT Student Activities
THE TRAVEL AGENTS Accommodation
USING THE LOCAL LIBRARY Shopping
Purchases from the
TAKING OUT INSURANCE supermarket/TikTok Shop/
Shopee/Lazada
Purchases using debit/credit card
E-wallet
18
DATABASE
19
LOGICALLY RELATED DATA FOR UUM
Student School
Matric no, name, phone School name, school
no, DOB, address etc. address
Staff Programmes
staffno, name, address, Program code, program
phone no, etc name, total credit hours
Course
Class Course code,
location course name,
Room id, location credit hours
LOGICALLY RELATED DATA
21
FILE-BASED SYSTEMS
22
FILE-BASED PROCESSING
23
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. 24
LIMITATIONS OF FILE-BASED
APPROACH
Data dependence
File structure is defined in the program code.
26
DATABASE MANAGEMENT SYSTEM
(DBMS)
The DBMS Manages the Interaction Between the End User and the
Database 27
UUM DATABASE: ALL
DATA CAN BE SHARED
Example: UUM Systems
BY EXISTING AND
NEW SYSTEM
UUM
DATABASE
28
THE DATABASE SYSTEM ENVIRONMENT
29
THE DATABASE SYSTEM
ENVIRONMENT
Hardware
Can range from a PC to a network of computers.
Software
DBMS, operating system, network software (if necessary)
and also the application programs.
Data
Used by the organization and consists of operational data
and the meta-data.
30
THE DATABASE SYSTEM ENVIRONMENT
Procedures
Instructions and rules that should be applied to the design and use of
the DBMS.
31
Database Systems: Design,
Implementation, & Management,
6th Edition, Rob & Coronel
32
REVISION
Data vs. Info vs Knowledge
Database Concept (E, A, R)
File Based System VS Database System
Database System Environment
33
DATABASE MANAGEMENT SYSTEM (DBMS)
34
35
DBMS FACILITIES
36
DDL- CREATE TABLE
CREATE TABLE PropertyForRent (
propertyNo PNumber NOT NULL, ….
rooms PRooms NOT NULL
DEFAULT 4,
rent PRent NOT
NULL, DEFAULT 600,
ownerNo OwnerNumber
NOT NULL,
staffNo StaffNumber
branchNo BranchNumber NOT
NULL,
PRIMARY KEY (propertyNo),
FOREIGN KEY (staffNo) REFERENCES Staff
ON DELETE SET NULL ON UPDATE CASCADE ….);
DDL: DATA DEFINITION - ALTER TABLE
39
DBMS FACILITIES
40
DBMS FACILITIES
A view mechanism.
Provides users with only the data they want or
need to use.
41
VIEWS
42
User view defines what is required of a database
application from perspective of:
a particular job role (such as Manager or Supervisor) or
enterprise application area (such as marketing, personnel,
or stock control).
43
External View 1: Deputy Deans + Program Chairs
44
External view 2: All Staffs
45
External View 2: All Lecturers
46
External View 2: Lecturer for STID3014 (Group C) – Sem A231
47
External View 3: Students’ View
48
External View 3: Students’ View
49
REPRESENTATION OF A DATABASE
APPLICATION WITH MULTIPLE USER VIEWS
50
VIEWS
Benefits include:
Reduce complexity;
Provide a level of security;
Provide a mechanism to customize the appearance of the
database;
Present a consistent, unchanging picture of the structure
of the database, even if the underlying database is
changed.
51
ANSI-SPARC THREE-LEVEL ARCHITECTURE
The ANSI-SPARC Architecture, is an abstract
design standard for a database management
system, first proposed in 1975. The ANSI-SPARC
model however never became a formal standard.
No mainstream DBMS systems are fully based on
it, but the idea of logical data independence is
widely adopted.
52
ANSI-SPARC THREE-LEVEL
ARCHITECTURE
53
ANSI-SPARC THREE-LEVEL
ARCHITECTURE
External Level
Users' view of the database.
Describes that part of database that is relevant to a particular user.
Conceptual Level
Community view of the database.
Describes what data is stored in database and relationships among
the data.
Internal Level
Physical representation of the database on the computer.
Describes how the data is stored in the database.
54
DIFFERENCES BETWEEN THREE LEVELS
OF ANSI-SPARC ARCHITECTURE
55
OBJECTIVES OF THREE-LEVEL
ARCHITECTURE
56
OBJECTIVES OF THREE-LEVEL ARCHITECTURE
57
MAJOR OBJECTIVE OF THREE-LEVEL
ARCHITECTURE: DATA INDEPENDENCE
means: the upper levels are unaffected
by changes to lower levels
58
DATA INDEPENDENCE
59
DATA INDEPENDENCE
Physical Data Independence
Refers to immunity of conceptual schema to changes
in the internal schema.
Internal schema changes (e.g. using different file
organizations, storage structures/devices).
Should not require change to conceptual or external
schemas.
60
DATA INDEPENDENCE AND THE ANSI-
SPARC THREE-LEVEL ARCHITECTURE
61
ADVANTAGES OF DBMS
Control of data redundancy
File-based systems waste space by storing same info in more than one file
Data consistency
Reduced the risk by eliminating/controlling Data Redundancy – update once
More information from the same amount of data.
Possible to derive additional information from the same data
Sharing of data
Authorized user can share the same data
Improved data integrity
Validity, rules enforcement integrity constraint
62
ADVANTAGES OF DBMS (CONTINUE...)
Improved security
Protection from unauthorized user
Enforcement of standards
Allow DBA to define and the DBMS to enforce necessary standards
Economy of scale
Cost saving
64
DISADVANTAGES OF DBMS
Complexity
Functionality makes DBMSs complex – must understand the
functionalities to make full use of DBMS
Size
Requiring substantial amounts of memory to run efficiently
Cost of DBMS
License/memberships/single @ multiple users/maintenance
Additional hardware costs
Storage space etc
65
DISADVANTAGES OF DBMS
(CONTINUE..)
Cost of conversion
Converting existing applications to run the new DBMS &
hardware
Performance
Many applications/high load/peak time
Higher impact of a failure
Failure of certain components can bring operations to a
halt
66
THE END
67