0% found this document useful (0 votes)
18 views27 pages

Introduction To Databases

The document provides an overview of database systems, defining databases as collections of logically related data and contrasting file-based systems with database management systems (DBMS). It outlines the advantages and disadvantages of both systems, highlighting issues such as data redundancy and inconsistency in file-based systems, while emphasizing the benefits of data integrity and reduced redundancy in DBMS. Additionally, it discusses various applications of database systems across different sectors, including education, telecommunications, and healthcare.

Uploaded by

susanmambwe709
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views27 pages

Introduction To Databases

The document provides an overview of database systems, defining databases as collections of logically related data and contrasting file-based systems with database management systems (DBMS). It outlines the advantages and disadvantages of both systems, highlighting issues such as data redundancy and inconsistency in file-based systems, while emphasizing the benefits of data integrity and reduced redundancy in DBMS. Additionally, it discusses various applications of database systems across different sectors, including education, telecommunications, and healthcare.

Uploaded by

susanmambwe709
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

MUFULIRA COLLEGE OF EDUCATION

MATHEMATICS DEPARTMENT
COMPUTER STUDIES AND ICT SECTION

INTRODUCTION
TO
Database systems
WHAT IS A DATABASE?
A DATABASE is usually
abbreviated as DB.
A DATABASE is a collection of
logically related
data/information, which is self
organising.
FILE BASED SYSTEM
A FILE-BASED SYSTEM is a collection of data
stored in an orderly manner in a file.
It is an imitation of the traditional filing cabinet
system.
It is a file packed with data, with no metadata and
thus no organising structure.
METADATA is simply Data about data. It refers
to data/information that provides information about
other data. Metadata describes how and when and
by whom a particular set of data was collected, and
how the data is formatted/organised
HOW FILE-BASED SYSTEMS WORK
COMPUTER
MATHEMATICS EDUCATION
STUDIES DEPARTMENT DEPARTMENT
DEPARTMENT

COMPUTER
MATHEMATICS EDUCATION
STUDIES DATA DATA
DATA

Each department maintains its own set of data.


There are no links among the data pools.
Advantages of file-based systems

Simple - No need of highly technical person


to create and handle the database.
No need of external storage
Data security – No external interference
Processing speed is high as compare to
DBMS
Low cost, in terms of equipments
disadvantages of file –based systems
Fixed queries
Complex system administration
Limited Data Sharing
High complexity in updating of database
Lack of data integrity.
Lack of flexibility in organizing and
querying the data
Concurrency access problems
disadvantages of file –based systems …
 Atomicity issues: Atomicity of a transaction refers to “All or
nothing”, which means either all the operations in a transaction
executes or none.
 Data redundancy: Data redundancy refers to the duplication of
data, lets say we are managing the data of a college where a
student is enrolled for two courses, the same student details in
such case will be stored twice, which will take more storage than
needed. Data redundancy often leads to higher storage costs and
poor access time.
 Data inconsistency: Data redundancy leads to data
inconsistency, lets take the same example that we have taken
above, a student is enrolled for two courses and we have student
address stored twice, now lets say student requests to change his
address, if the address is changed at one place and not on all the
records then this can lead to data inconsistency.
disadvantages of file –based systems …
Data Separation and Isolation: Because data are
scattered in various files, and files may be in different
formats, writing new application programs to retrieve
the appropriate data is difficult.
Data-Program Dependence (Dependency on
application programs): Changing files would lead to
change in application programs.
Data Security: Data should be secured from
unauthorised access, for example a student in a
college should not be able to see the payroll details of
the teachers, such kind of security constraints are
difficult to apply in file processing systems.
How data base
management systems work

ACCOUNTS
SALES PRODUCTION
DEPARTMENT
DEPARTMENT DEPARTMENT

DATA POOL
Advantages of database systems
Reduced data redundancy
Reduced updating errors
Increased Data Consistency
Data Sharing and Integration
Greater data integrity
Enhanced Constraint integrity
Enhanced Data Security
advantages of database systems …
Program-Data Independence
Reduced data entry, storage and retrieval
costs
Improved data access to users through use
of host and query languages
Reduced data entry, storage, and retrieval
costs
Facilitated development of new
applications program
disadvantages of database systems
DBSes are complex, difficult, and time-
consuming to design and create.
Extensive conversion costs in moving
form an FBS to a DBS
Cost of Staff Training and users
DBS Failures are counter-productive
Substantial hardware and software start-
up costs
applications of database systems
 EDUCATION SECTOR
DBSes are used in schools, colleges and
Universities to store and retrieve the data
regarding student details, staff details, course
details, exam details, payroll data, attendance
details, fees details, …
TELECOMMUNICATIONS
To keep track of the information regarding
calls made, air-time/Internet-data balances,
network usage, customer details, ...
applications of database systems …
MANUFACTURING INDUSTRY
A DB to keep track of INs and OUTs for raw
materials, products produced and disbursed,
machinery, …
 SALES SYSTEMS
To store customer information, production information
and invoice details, ...
BANKING SYSTEMS
For storing customer information, tracking day to day
credit and debit transactions, generating bank
statements, …
applications of database systems …
TRANSPORT SYSTEMS
To keep a record of reservations, travel times,
passenger/goods details, …
 ONLINE SHOPPING SYSTEMS
To store products information, Customer addresses
and preferences, credit details and provision of the
relevant list of products based on queries, ...
HEALTH SECTOR
To store and retrieve the data regarding patients,
staff, drugs, treatment details, payroll data, medical
fees details, …
applications of database systems …
DYNAMICS INTERNET WEBSITES
To stores the content of the website.
 SOCIAL MEDIA SITES
To store details on registered users, postings
uploaded by users, …
HOSPITALITY INDUSTRY
To store and retrieve the data regarding
customer reservations/bookings, records of
available facilities, rates for facilities, …
applications of database systems …
DYNAMICS INTERNET WEBSITES
To stores the content of the website.
 SOCIAL MEDIA SITES
To store details on registered users, postings
uploaded by users, …
HOSPITALITY INDUSTRY
To store and retrieve the data regarding
customer reservations/bookings, records of
available facilities, rates for facilities, …
Database tables
Data in a database systems is logically
organized in tables.
Databases have ENTITIES and each entity
is represented by a table, in a database.
Each table is made of ROWS and
COLUMNS
Columns accommodate FIELDS or
ATTRIBUTES
Rows accommodate RECORDS
Database table example
Consider STUDENT as an entity in a database
Some of the attributes are:
Student Number
Surname
First Name
NRC Number
Date of Birth
Gender
Cell phone Number
Address
Student
STUDENT NAME NRC NUMBER DOB SEX CELL PHONE
NUMBER NUMBER
1630 KABWE 607964/67/1 14/09/90 M 099990011
1631 BWALE 727272/99/1 12/03/91 F 0911776655
1632 KABWE 909088/87/1 09/12/92 F 0922223411
1604 BANDA 322365/87/I 14/09/90 M 0900528417
1622 CHAAMWE 757588/54/1 23/12/93 F 0933885544
1615 JOBANGO 212353/78/1 25/12/94 M 0944784564
1611 KABOVA 969636/87/1 23/01/92 M 0910889744
1610 JERABO 123321/33/1 01/01/95 F 0920884433
1602 KAKEYA 331199/57/1 25/04/92 M 093150077
FIELD
A field is one piece of data or information
about a person or thing.
STUDENT NAME NRC DOB SEX CELL PHONE
NUMBER NUMBER NUMBER
1630 KABWE 607964/67/1 14/09/90 M 099990011
1631 BWALE 727272/99/1 12/03/91 F 0911776655
1632 KABWE 909088/87/1 09/12/92 F 0922223411
1604 BANDA 322365/87/I 14/09/90 M 0900528417
1622 CHAAMWE 757588/54/1 23/12/93 F 0933885544
1615 JOBANGO 212353/78/1 25/12/94 M 0944784564
1611 KABOVA 969636/87/1 23/01/92 M 0910889744
1610 JERABO 123321/33/1 01/01/95 F 0920884433
1602 KAKEYA 331199/57/1 25/04/92 M 093150077
RECORD OR TUPLE
A record is all of the data or information
about one person or one thing, in a table.
STUDENT NAME NRC DOB SEX CELL PHONE
NUMBER NUMBER NUMBER
1630 KABWE 607964/67/1 14/09/90 M 099990011
1631 BWALE 727272/99/1 12/03/91 F 0911776655
1632 KABWE 909088/87/1 09/12/92 F 0922223411
1604 BANDA 322365/87/I 14/09/90 M 0900528417
1622 CHAAMWE 757588/54/1 23/12/93 F 0933885544
1615 JOBANGO 212353/78/1 25/12/94 M 0944784564
1611 KABOVA 969636/87/1 23/01/92 M 0910889744
1610 JERABO 123321/33/1 01/01/95 F 0920884433
1602 KAKEYA 331199/57/1 25/04/92 M 093150077
Special keys
PRIMARY KEY
This is a field/attribute in a database table
designated to uniquely identify records.
CANDIDATE KEY(S)
This is a field/attribute that qualifies to be a
Primary key
FOREIGN KEY
This is a Primary key of another table appearing
in a table for purposes of relating the two tables
Special keys
You are now advised to research on the
following:
ALTERNATE KEY
SECONDARY KEY(S)
COMPOSITE KEY(S)
SUPER KEY
COMPUOND KEY
SURROGATE KEY
Primary and FOREIGN KEY
STUDENT# NAME NRC DOB SEX CELL# LECTURER #
1630 KABWE 607964/67/1 14/09/90 M 099990011 8899
1631 BWALE 727272/99/1 12/03/91 F 0955776655 9632
1632 KABWE 909088/87/1 09/12/92 F 0966223411 3356
1604 BANDA 322365/87/I 14/09/90 M 0977528417 9632
1622 CHAAMWE 757588/54/1 23/12/93 F 0967885544 8899
1615 JOBANGO 212353/78/1 25/12/94 M 0959784564 3356
1611 KABOVA 969636/87/1 23/01/92 M 0965889744 8899
1610 JERABO 123321/33/1 01/01/95 F 0975884433 9632
1602 KAKEYA 331199/57/1 25/04/92 M 099950077 3356
Database MANAGEMENT SYSTEM - DBMS
A DBMS is a software package that can be
used to create and manage/manipulate a
database system.
The elemental functions of a DBMS are to:
 Create
Read or Retrieve
Update
Delete
Easily remembered as “CRUD”
Database SYSTEM - DBS
A DBS is a high-level definition of the structure and
relationship among stored data, the database, the users and
the hardware/software system used.

You might also like