2. Chap 1: Database Concepts
Common Concepts
Connecting to Databases
3. Data/Data Item:
It is regarded as the smallest element
in a database system.
It is the smallest indivisible element or
component in a database system.
4. Database:
This can be viewed as the collection of
related data.
It can also be said to be a repository
of data.
…base
5. Database Management System:
This is a software that manages
database files.
It is a shared and integrated computer
structure that stores data.
Operational Data
…..inputs
Meta Data
…..query generated data
i.e. data about data
Output Data
…..outputs i.e.
Report etc.
6. ROW: Is defined as a collection of data items belonging to an entity. It
represents RECORD of such an entity.
ID Matric Name Sex Reg.
No
Age
001 140404001 Ade Peters M 789 45
002 140404002 Anthony Joshua M 790 27
003 140404003 EkwesiliCecilia F 791 56
004 140404004 Aisha Buhari F 792 63
Record
belonging
to AJ!
7. COLUMN: Is defined as a collection of data items belonging to
different entities. It represents FIELD in such entities.
ID Matric Name Sex Reg.
No
Age
001 140404001 Ade Peters M 789 45
002 140404002 Anthony Joshua M 790 27
003 140404003 EkwesiliCecilia F 791 56
004 140404004 Aisha Buhari F 792 63
Matric
FIELD
common to
all entities
8. TABLE: Is defined as a collection of related RECORDS belonging to
entities in such a table/file.
ID Matric Name Sex Reg.
No
Age
001 140404001 Ade Peters M 789 45
002 140404002 Anthony Joshua M 790 27
003 140404003 EkwesiliCecilia F 791 56
004 140404004 Aisha Buhari F 792 63 TABLE
9. DATABASE: Is defined as a collection of logically related
TABLES/FILES.
ID Matric Name Sex Reg.
No
Age
001 140404001 Ade Peters M 789 45
002 140404002 Anthony Joshua M 790 27
003 140404003 EkwesiliCecilia F 791 56
TABLE 1 /
FILE 1:
studfile
ID Matric Score Grade
001 140404001 67 B
002 140404002 54 C
003 140404003 89 A
TABLE 2 /
FILE 2:
csc212ex
…both stored
into one (1)
DATABASE
10. Instance: This refers to the content of a
particular database at a particular
point in time.
It can simply be regarded as the value of
a variable in a database.
11. Schema: This refers to the logical
structure of the database.
It exists in two forms: Physical Schema
& Logical Schema.
12. Physical schema described the
design of a database at physical
level e.g. storage of records unto
the database.
13. Logical schema discusses the design
of a database at logical level e.g.
illustrating the relationship among /
between records/tables in a
database.
15. Creating Database (ourdb) &Tables (scorefile)
i. Matric_Data (containing matricno, dept, fac)
ii. Bio_Data (containing name, dob, soo, sex,
matricno)
iii. Testfile (containing matricno, csc301t_score,
csc303t_score, csc305t_score)
iv. Examfile (containing matricno, csc301e_score,
csc303e_score, csc305e_score)
16. i. Populate each table with 10 related records
ii. Generate MatricList based on Faculty
iii. Generate MatricList based on Department
iv. Generate MatricList based on Gender &
State
v. ComputeTOTAL and AVERAGE forTestfile
and Examfile
vi. Generate Matricno,Totaltestscore and
Totalexamscore for each candidate
vii. Generate a detail report showing all records
17. Using the existing database (ourdb), create a
table called ELIGIBILITYfile such that it
contains the fllg fields:
Name
MatricNo
Year of Birth
SOO
Nationality
Region / Continent
18. Populate the table with 15data
From the data, fire the following queries:
Candidates <=40 as eligible
Candidates from Asian Countries as not eligible
All Candidates from Africa as eligible except those
from the Southern Africa
All Candidates from Nigeria as eligible except those
from Borno State
Generate a Report that shows all the candidates
that applied
Generate a Report that presents all candidates
from Africa
19. TAKE HOME 1
Create a database named STUDDB containing
STUDREG file/table (registration data of all
students in AAUA across the different faculties).
Populate the table with 30 data.
Create a sister table, called STUDPAY, containing
students’ payment information. Also populate this
with corresponding 30 data.
20. TAKE HOME 2
Consider a Customer and a Producer. Ponder
computationally and come up with the necessary
fields for both entities for the design of your
tables. Further work on these entities by
populating each with 20 records.