0% found this document useful (0 votes)
15 views

Introduction To Database System and Information Retrieval (Part 1)

The document discusses the introduction to databases. It differentiates between data and information, and file processing systems and database systems. It explains that a database stores logically related data and describes this data through metadata. A database management system (DBMS) manages the interaction between end users and the database. It provides shared access to data and prevents duplication, which were limitations of file-based systems that stored data separately. The DBMS environment includes hardware, software, data, procedures, and roles like database administrators.

Uploaded by

Aziemah Haidah
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Introduction To Database System and Information Retrieval (Part 1)

The document discusses the introduction to databases. It differentiates between data and information, and file processing systems and database systems. It explains that a database stores logically related data and describes this data through metadata. A database management system (DBMS) manages the interaction between end users and the database. It provides shared access to data and prevents duplication, which were limitations of file-based systems that stored data separately. The DBMS environment includes hardware, software, data, procedures, and roles like database administrators.

Uploaded by

Aziemah Haidah
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 67

STID3014

DATABASE SYSTEM &


INFORMATION RETRIEVAL
INTRODUCTION TO DATABASE
(PART 1)
OBJECTIVES

At the end of this sub-chapter, students should be able to:

 Differentiate data and information


 Differentiate file processing and database system
 Explain database structure and the three-level architecture
 Explain the evolution of database and the database system
environment

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

 7.06 Last 10 Days


9
DATA VS INFO - CONCLUSION

10
Information is prepared data that has been processed,
aggregated and organized into a more human-friendly
format that provides more context.

Information is often delivered in the form of data


visualizations, reports, and dashboards.”

11
What about
knowledge?

12
Data Info

14 May 2023, They are


KNOWLEDGE? 28 May 2023,
30 May 2023
booked dates
for a holiday
1-30 June cottage
2023

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

In an employee when age is calculated The ages of several


database, the from the date of birth employees can be taken for
date of birth of and it will be a piece of analyzing how many
employees will information that can be employees are closer to
be data. used in further retirement in the near future.
processing
DATABASES APPLICATION
THAT YOU USE DAILY?

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

 Shared collection of logically related data (and a description


of this data), designed to meet the information needs of an
organization.
 Logically related data comprises entities, attributes, and
relationships of an organization's information.
 Description of data known as System catalogue (metadata or
data dictionary) provides program–data independence.

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

 Entity – a distinct object in the organization, i.e. a person, place,


thing, concept, or event
(Student, Staff, School, Program, Course, Location)
 Attribute – a property that describes some aspect of entity.
(Student: Matric no, name, address)
 Relationship – an association between entities
Student  REGISTER  Course
Lecturer  TEACH  Course

21
FILE-BASED SYSTEMS

 Collection of application programs that perform services


for the end users (e.g. reports).
 Each program defines and manages its own data.
 Outdated

22
FILE-BASED PROCESSING

23
LIMITATIONS OF FILE-BASED APPROACH

Separation and isolation of data


 Each program maintains its own set of data.
 Users of one program may be unaware of potentially useful data held by
other programs.

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.

 Incompatible file formats


 Programs are written in different languages, and so cannot easily access each others
files.

 Fixed Queries/Proliferation of application programs


 Programs are written to satisfy particular functions. Any new requirement needs a new
program.
25
LIMITATIONS OF FILE-BASED
APPROACH

 Definition of data was embedded in application programs,


rather than being stored separately and independently.
 No control over access and manipulation of data beyond
that imposed by application programs.

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.

 People (Roles in DBMS Environment)


 Data Administrator (DA)
 Database Administrator (DBA)
 Database Designers (Logical and Physical)
 Application Programmers
 End Users (naive and sophisticated)

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)

 A software system that


enables users to define,
create, and maintain the
database and which
provides controlled access
to this database.

34
35
DBMS FACILITIES

 Data definition language (DDL)


 Permits specification of data types, structures and any data constraints.
 All specifications are stored in the database.

 Data manipulation language (DML)


 General enquiry facility (query language) of the data.

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

 Add a new column to a table.


 Drop a column from a table.

 Add a new table constraint.

 Drop a table constraint.

 Set a default for a column.

 Drop a default for a column.


DML: SIMPLE QUERIES - RETRIEVE SPECIFIC COLUMNS, ALL ROWS

 Command: Produce a list of salaries for all staff,


showing only staff number, first and last names, and
salary.
SELECT staffNo, fName, lName, salary
FROM Staff;

39
DBMS FACILITIES

 Controlled access to database may include:


 A security system – prevents unauthorized users accessing the d/b.
 An integrity system – maintains the consistency of stored data.
 A concurrency control system – allows shared access of the d/b.
 A recovery control system – restores the d/b to a previous consistent state
following a hardware or software failure.
 A user-accessible catalogue – contains descriptions of the data in the d/b.

40
DBMS FACILITIES
 A view mechanism.
 Provides users with only the data they want or
need to use.

41
VIEWS

 Allows each user to have his or her own view of


the database.
 A view is essentially some subset of the database.

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

 All users should be able to access same data.

 A user's view is immune to changes made in other views.

 Users should not need to know physical database storage


details.

56
OBJECTIVES OF THREE-LEVEL ARCHITECTURE

 DBA should be able to change database storage


structures without affecting the users' views.

 Internal structure of database should be unaffected by


changes to physical aspects of storage.

 DBA should be able to change conceptual structure of


database without affecting all users.

57
MAJOR OBJECTIVE OF THREE-LEVEL
ARCHITECTURE: DATA INDEPENDENCE
 means: the upper levels are unaffected
by changes to lower levels

1. Logical Data Independence


2. Physical Data Independence

58
DATA INDEPENDENCE

 Logical Data Independence


 Refers to immunity of external schemas to changes
in conceptual schema.
 Conceptual schema changes (e.g. addition/removal
of entities).
 Should not require changes to external schema or
rewrites of application programs.

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

 Balanced conflicting requirements


 Each user has needs that may be conflict with the needs of other users – DBA can
design database that provide best use of resources for the organization as a whole
 Improved data accessibility and responsiveness
 Through query – list certain data
63
ADVANTAGES OF DBMS (CONTINUE...)
 Increased productivity
 DBMSs provide standard functions that programmer have to write on their own
 Improved maintenance through data independence
 DBMS separates the data descriptions from the application, thereby making
applications immune to changes in data descriptions
 Increased concurrency
 Two or more users allowed to access the same file/data simultonaneously
 Improved backup and recovery services
 DBMSs provide facilities to minimize the amount of processing that is
lost/failure.

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

You might also like