SG10 ICT Chapter9
SG10 ICT Chapter9
Database
² definition of database
² advantages of using a database
² special characteristics of a database
² using fields to create tables
² identifying key fields
² relational databases
² relationships between tables
² using queries to get data
² using data forms
² using reports to furnish information
Chapter one included a description on what data and information are. This
chapter covers saving data in an organized manner.
Higher the amount of data it becomes difficult to keep in our memory. On
such occasions writing these data is one method. That is called manual database.
The other method is to maintain the data on an electronic medium. This is called an
electronic database. Data can be retrieved efficiently when needed if it is saved on a
database in a systematic way. Hence, the database is needed to save a large amount
of data and to retrieve them very efficiently.
251
For free distribution 251
251
Examples
It would be easy for you to remember names of your friends, but it would be difficult
to retain all their phone numbers in your memory. You can get these details easily
when needed if you write names and phone numbers in a book (Figure 9.1) or save
them in a mobile phone (Figure 9.2). Thus, the phone book can be considered a
simple database.
Figure 9.1 – telephone numbers (manual) Figure 9.2 – telephone numbers (electronic)
252
252 For free distribution
9.1.2 Features of a Database
• Minimal data redundancy
If the same data is stored in several tables, this is called data redundancy.
For instance, the name of a student may be recorded separately in the
admission card and the library membership card. When a name is changed, that
name should be edited separately in all documents. Given below is an example
where the name ‘Firosa Lai’ is changed as ‘Firosa Rafeeq’.
253
For free distribution 253
253
Table 9.3 - Relational Database
Student Name Date of Date of Name of the
Number Birth Admission Guardian
100 Manoj Dayarathne 2$9$2008 1$1$2014 G. Dayarathne
101 Firosa Lai Rafeeq 4$2$2008 1$1$2014 K. Fais
Student Book Borrowed Return Date
Number Number Date
101 2222 2/9/2014 16/9/2014
100 3333 3/9/2014 17/9/2014
101 1111 3/9/2014 17/9/2014
100 3333 4/9/2014 18/9/2014
Book Title Author’s Name
Number
1111 Basic Maths Sivathasan
Concept Ramanathana
2222 Folk Songs Jayantha Bandara
Drama Padmamali Menike
3333
² Data consistency : By minimizing data redundancy, the same
data being saved in various tables can be reduced or prevented. This enables
to maintenance of data consistency.
If you consider the example above, student data, data about books and
usage of books are saved separately in different tables. As such data such as
name of a student or a book should be recorded only once. Thus, data consistency
is maintained.
² Increases efficiency : Since database tables are properly organized, saving
and reading data can be carried out efficiently. Hence, efficiency is higher.
As per example above, let us consider the change of name from Firosa
Lai to Firosa Rafeeq. If the same data (Firosa Lai) are recorded in different
tables, more time is spent to find all these places. This leads to inefficiency.
However, in related databases data consistency increases speed. Hence,
efficiency is increased.
² Increases accuracy : Since data redundancy can be minimized in a database, data
consistency is maintained. This increases accuracy.
Let us consider the example above where Firosa Lai is changed to Firosa
Rafeeq. If several places are corrected, one mistake would lead to inaccurate
information.
254
254 For free distribution
However, in the above database only one table is need to be updated to
change Firosa Lai to Firosa Rafeeq. This ensures data consistency. Therefore,
the accuracy of data is very high.
Fees
Field
properties
255
For free distribution 255
255
Figure 9.4 - Data Encription
256
256 For free distribution
9.1.4 Introduction to Relational Database
A collection of fields related to one person or object is called a record.
A collection of records is called a data table.
A collection of related tables is called a relational database.
Relational Database
Field
Student Name Date of Date of
Number Birth Admission
100 Manoj Dayarathne 2/9/2008 G. Dayarathne
101 Firosa Lai Rafeeqa 4/2/2008 K. Fais
Table
Record
Figure 9.5
257
For free distribution 257
257
Example
Student record book is a very important document for every student. Biodata of a
student and the marks obtained for each subject with the rank in all three terms in
all grades are included.
Table 9.5 – Biodata form
Five details related to each student are given above. Thus, data such as
Kavindu Prabashwara, Meenadevi Ramanathan, Mohommad Malikkar represent
one field. To name such a field, a ‘field name’ is used.
Let us create a table recording details under each field name. (Table 9.6)
Table 9.6 - Student Records
A column of the table represents one field. Thus, the above table consists of
five fields. They are admission number, Name, Data or Birth, Gender and Telephone
number.
A collection of fields makes a record. Hence, the above table has three records.
258
258 For free distribution
Record Column
Field Names
Table 9.7 - Componants of Data Table
Admission Name Date of Gender Telephone No
No Birth
1426 Kavindu Prabashwara 2005.05.23 male 0352287571
1427 Meenadevi 2005.08.12 female 0352235696
Ramanathan
1428 Mohommad Malikkar 2005.02.07 male 0352815402
Row
There is the possibility of entering the same data again in the columns
such as Name, Date of Birth, Gender and Tel No. However, a datum entered in the
column of Admission No will not be repeated. Hence, the field Admission No is
more suitable to uniquely identify a record.
What are the books borrowed by Firosa Rafeeq? Let us learn how this is
found in relevent tables.
Table 9.6
Student Name Date of Date of Name of the
Number Birth Admission Guardian
100 Manoj Dayarathne 2$9$2008 1$1$2014 G. Dayarathne
101 Firosa Rafeeq 4$2$2008 1$1$2014 K. Fais
259
For free distribution 259
259
9.1.5 Primary Key
Figure 9.6
observation
Special attributes of a primary key
• Should not be empty (data being there is mandatory)
• No duplicate values (same values do not exist)
For instance, study the table given below which consists of data on a few books.
Table 9.7 - Book Table
Accession Title Author’s NamePrice of Number
No Book of Books
2131 Let’s Access Internet Mahesh Gankanda Rs.275.00 10
2132 Computer Studies Suranimala Rs.300.00 5
Basnayaka
2133 Essay Writing Nimali Bogoda Rs. 225.00 12
2134 Education Psychology Dayanath Rs.400.00 6
Jayasekara
2135 Tamil Language Learning Raj Sudakaran Rs.225.00 8
2136 Computer Studies Mohommad Niyas Rs.150.00 4
2137 Sinhala Tamil Dictionary Raj Sudakaran Rs.325.00 6
In this table,
• Accession numbers do not have duplicates (unique)
• Both authors Suranimala Basnayaka and Mohommad Niyas have authored
Computer Studies.
• Raj Sudakaran has authored both Tamil Language Learning and Sinhala Tamil
Dictionary.
260
260 For free distribution
• The price of both books Essay Writing and Tamil Language Learning is the
same.
• Both books Education Psychology and Sinhala Tamil Dictionary have six
copies.
According to these details, the Accession Number is the most suitable fields
for the primary key.
Note: The Primary key of a table is underlined to identify as unique. (table 9.8)
Table 9.8
Accession Title Author’s Price of the Number of
Number Name Book Copies
9.1.6 Composite Primary Key
The primary key which consists of two or more columns of a table uniquely
identifies a record is called Composite Primary Key.
Example
Look at the table given below about the captain and vice captain of a school.
Table 9.9 – Sports Table
Year Sport Captain Vice Captain
2013 Cricket Rashmi Mubharak Husein
Senarathne
2013 Football Jaliya Saranga Vinothen Raj
2013 Volleyball Ahammed Nawas Sudesh Tharanga
2014 Cricket Mubharak Husein Bhanu Dayarathne
2014 Football Jaliya Saranga Ahammed Nawas
2014 Volleyball Bhathiya Gamlath Sudesh Tharanga
Both the year and sport are needed to uniquely identify
Composite Key
a record.
261
For free distribution 261
261
Since the column data of this table containes duplicate. There is no single
column to uniquely identify records. There should be a definite captain and a vice
captain for a sport in a year. Hence, as far as the combination of two columns;
year and sport is considered, identity of records exists. Hence, combination of both
fields ‘year’ and ‘sport’ can be considered as the primary key. The composite key
made of the combination of these two columns is suitable for the primary key in this
table. When indicating the composite primary key, fields are separately underlined.
(Refer Table 9.10)
Table 9.10
Year Sport Captain Vice Captain
262
262 For free distribution
observation
Special features of a foreign key
• Builds a connection between two tables.
• The related data of the primary key field exist in the other
table.
• Foreign key of one table is the primary key of the other table.
Example
Given below in Table 9.13 are ICT subject marks of three students scored in the first
term.
Table 9.13 – First term marks
Admission No Name Date of Marks Term Year
Birth
1426 Kavindu Prabashwara 2005'05'23 69 1 2014
1427 Meenadevi 2005'08'12 82 1 2014
Ramanathan
1428 Mohommad Malikkar 2005'02'07 47 1 2014
When entering marks of these students scored in the second term, the fields
such as admission number, name and date of birth should be entered again. (Refer
Table 9.14)
Table 9.14 – Second term marks
Admission Name Date of Marks Term Year
No Birth
1426 Kavindu Prabashwara 2005'05'23 69 1 2014
1427 Meenadevi Ramanathan 2005'08'12 82 1 2014
1428 Mohommad Malikkar 2005'02'07 47 1 2014
1426 Kavindu Prabashwara 2005'05'23 79 2 2014
1427 Meenadevi Ramanathan 2005'08'12 68 2 2014
1428 Mohommad Malikkar 2005'02'07 66 2 2014
Recording column data repeatedly is called data duplication.
Disadvantages of data duplication
(i) Inability to select a primary key field to maintain identity of records.
(ii) Inability to analyse data properly.
Though the number of students who have scored above 60 marks is 5 as per
the above table, the actual number of students in the class is 3. Hence, a
proper data analysis cannot be done.
263
For free distribution 263
263
(iii) Reduced efficiency
When entering marks of several years in the above table, more time is spent
to enter the admission number, name and date of birth of the same student.
This reduces efficiency.
(iv) Possibility to get inaccurate data is high.
There can be errors in entering the same data repeatedly. Mohommad
Malikkar can be recorded as Mohommad Malakkar in another place. These
mismatches can lead to inaccurate data. Hence, accuracy becomes low.
(v) Difficult to input data.
To enter the marks of a student, his/her name and date of birth should be
entered repeatedly.
(vi) Possibility to make errors in deleting data.
As there are several records related to a student, there can be errors in
deleting data.
(vii) Difficult to update data.
As there are several records related to one student, attention should be paid to
each record in updating it.
These difficulties are created as all data are stored in one table. Hence, to
minimize such difficulties, a table can be divided into several tables.
Let us create two tables: Student Table and Marks Table, by removing the
fields which cause data duplication.
Let us create Student Table (Table 9.15) which consists of Admission Number,
Name and Date of Birth.
In the Student Table, there is the possibility of data in Name and Date of
Birth fields being duplicated. However, data does not duplicate under Admission
Number. Hence, Admission Number is more suitable to identify records uniquely.
Therefore, the primary key of the Student Table is the Admission Number.
Table 9.15 – Student Table
Admission No Name Date of Birth
1426 Kavindu Prabashwara 2005'05'23
1427 Meenadevi Ramanathan 2005'08'12
1428 Mohommad Malikkar 2005'02'07
264
264 For free distribution
Let us create a Marks Table (Table 9.16) which consists of the Admission
Number, Marks, Term and Year.
Table 9.16 – Marks Table
Admission No Marks Term Year
1426 69 1 2014
1427 82 1 2014
1428 47 1 2014
1426 79 2 2014
1427 68 2 2014
1428 66 2 2014
There is only one datum in the Student Table related to Admission Number
of Marks Table.
Hence, the field of the Admission Number is the primary key of the Student
Table and foreign key of the Marks Table.
265
For free distribution 265
265
E.g.: Field Name (Column Name) Number of fields (Column Width)
Subject Name 15
Subject Code 5
Data type related to the field should be identified when the table is created.
Field Name Data Type
Accession number of the book Text
Title Text
Author’s Name Text
Price of Book Currency
Number of Books Number
Activity
(1) Tabulate details of 10 books in your library under the fields mentioned
above.
(2) Create a table which is suitable to enter marks scored by the students
in your class. Include Admission Number, Name and the Marks for
subjects you study in this table.
Mention the most suitable data type for the fields in Table 9.17 given below.
Table 9.17
Field Data Type
Admission Number
Date of Admission
Subject Code
Doctor’s Fee
Department Name
Number of Passengers
Is Registered?
(3) Explain with examples the importance of selecting the most suitable data type
for fields.
266
266 For free distribution
9.3 Converting a Manual Database to an Electronic
Medium
Let us learn electronic databases with the purpose of converting a manual
database to an electronic medium.
Definition
A collection of objects which facilitates planning and maintenance of the
database to the user is called a Database Management System (DBMS). This
consists of several objects like tables, queries, forms and reports. (Refer Figure 9.7)
Tables
Forms
267
For free distribution 267
267
9.3.2 Using of Database Management System Software
In this unit, only Microsoft Office Access and LibreOffice Base software
are discussed.
1' Starting DBMS software
Please note that the commands used to run software can be different
according to the operating system.
For Microsoft OfficeAccess''' For LibreOffice Base'''
268
268 For free distribution
For LibreOffice Base''''
For Microsoft OfficeAccess'''
Give field name and data type adjust
Give field name and data type → Select the
row/ rows that should be made as Primary properties → Right click on the line
key → Click on Primary key → save the which contains the field need making
table. primary key → Select Primary key →
save the table.
269
For free distribution 269
269
9.4 Creating a Relational Database
You have studied the Primary Key and Foreign Key of a table in unit 9.1.
Rather than keeping all the data in a single table, it is easier, more efficient and
productive to input, update and delete data if those are recorded separately in
different tables. Hence, let us study this section well to break a data table into
several simple tables and to build relationships between these.
When creating a relational databases, several type of relations can exist
among tables. They are known as one-to-one, one-to-many and many-to-many.
9.4.2 One-to-one Relationship
If only a row of a table is related to a row of another table, it is called a
one-to-one relationship.
Two tables exist as A and B. A row in table A is related to one row in Table
B and a row in Table B is related to one row in Table A.
Example
Given below is Table 9.19 which includes the marks students scored of the Grade
5 scholarship exam.
Table 9.19– Scholarship Marks
Admission No Name Date of Index No Marks
Birth
1426 Kavindu Prabashwara 2005'05'23 23234 151
1427 Meenadevi Ramanathan 2005'08'12 23876 186
1428 Mohommad Malikkar 2005'02'07 23758 172
1429 Rashmi Janodara 2005'06'16 23765 193
Let us tabulate data in Table 9.19 into two tables: Table 9.20 – Student Table and
Table 9.21 – Marks Table. Table 9.21 – Marks Table
Table 9.20 – Student Table Admission Name Date of
Index No Marks Admission No Birth
No 1426 Kavindu 2005.05.23
23234 151 1426 Prabashwara
23876 186 1427 1427 Meenadevi 2005.08.12
Ramanathan
23758 172 1428
1428 Mohommad 2005.02.07
23765 193 1429 Malikkar
1429 Rashmi 2005.06.16
Janodara
270
270 For free distribution
A record of the Marks Table is related to only one record of the Student
Table. A record of the Student Table is related to only one record of the Marks Table
as well.
The primary key of the Student Table is the Admission Number and it is the
foreign key of the Marks Table. The Primary key of the Marks Table is the Index
Number. The relationship built between these two tables through the foreign key is
one-to-one. (Figure 9.11)
Student Table
Admission No Name Date of Birth
Marks Table
Index No Marks Admission No
An arrow is drawn from the foreign key to the primary key to indicate the
relationship.
271
For free distribution 271
271
Table 9.22 – Features of a one-to-many relationship
Table A Table B (Related table)
A record in Table A can be related to A record in Table B can be related to
several records in Table B. only one record in Table A.
There can be records which are not There cannot be records which are not
related to records of Table B. related to records of Table A.
Data in the column which includes the Data in the column which includes the
primary key cannot duplicate. foreign key can duplicate.
Having a record in Table B related to a It is mandatory to have at least one row
record in Table A is not mandatory. in Table A which is related to Table B.
Example
Refer Table 9.23 given below which includes personal data of students and payments
of service and facility fees.
272
272 For free distribution
Table 9.24 – Student Table
Admission No Name Date of Birth
1426 Kavindu Prabashwara 2005'05'23
1427 Meenadevi Ramanathan 2005'08'12
1428 Mohommad Malikkar 2005'02'07
Table 9.25 - Facility Fees Table
Figure 9.12 - One-to-Many Relationship
273
For free distribution 273
273
9.4.3 Many-to-many Relationship
If a record of a table is related to several records of another table and if a
record of that related table is related to several records of the other table, there is a
many-to-many relationship between those two tables.
Example
Students take part in sports (team) as an extra curricular activity. There are sports
such as cricket, volleyball and football. A student can do at least one of these sports.
Further, there should be a team for each sport.
Refer Table 9.26 given below which includes these data. According to this table,
Figure 9.26 – Table of students who do sports
Admission Name Date of Sport Sport Team Number of
No Birth No permanent
members
1426 Kavindu 2005'05'23 S001 Cricket A 11
Prabashwara
1426 Kavindu 2005'05'23 S002 Football A 16
Prabashwara
1428 Mohommad 2005'02'07 S001 Cricket B 11
Malikkar
1428 Mohommad 2005'02'07 S002 Football A 16
Malikkar
1428 Mohommad 2005'02'07 S003 Volleyball B 06
Malikkar
1429 Janith Asheka 2005'04'15 S001 Cricket A 11
1429 Janith Asheka 2005'04'15 S003 Volleyball A 06
There is data duplication in this table. To minimize data duplication, let us break
these data into separate tables. Include Sports data into Sports Table (Table 9.27)
and student data into Student Table (Table 9.28).
Table 9.27 - Student Table
Table 9.28 - Sports Table
Admission Facility fees Date of
Number of
No Table Birth Sport Sport
No. permanant
1426 Kavindu 2005'05'23 Members
Prabashwara S001 Cricket 11
1428 Mohommad 2005'02'07 S002 Football 16
Malikkar
S003 Volleyball 6
1429 Janith Asheka 2005'04'15
274
274 For free distribution
Many-to-many relationship between Student Table and Sports Table is converted
to one-to-many relationships in related databases. For this, another table is needed
apart from the two tables given above. (Let us name that table as Students Sports
Table – Table 9.30) Let us include Admission Number of Student Table to represent
students and Sport Number of Sports Table to represent sports.
Figure 9.29 – Student Table
Admission No Name Date of Birth
1426 Kavindu 2005'05'23
Prabashwara
1428 Mohommad 2005'02'07
Malikkar
1429 Janith Asheka 2005'04'15
Figure 9.30 - Students Sports Table
Admission Sport No Team
No
1426 S001 A
1426 S002 A
1428 S001 B
1428 S002 A
1428 S003 B
1429 001 A
1429 S003 A
Figure 9.31 – Sports Table
Sport No Sport Number of permanent
members
S001 Cricket 11
S002 Football 16
S003 Volleyball 6
The Admission Number is the Primary key of the Student Table and the
foreign key of Students Sports Table.
The Sport Number is the primary key of the Sports Table and the foreign
key of Students Sports Table.
The primary key of the Students Sports Table is Admission Number + Sport
Number.
Refer Figure 9.13 which gives relationship when two tables like the
Student Table and Sports Table with many-to-many relationships are converted to
one-to-many relationships.
275
For free distribution 275
275
Student Table
Admission No Name Date of Birth
Sports Table
Sport No Sport Number of permanent members
276
276 For free distribution
Figure 9.14 – Field names and data types of Student
Table.
Select Database Tools → Select Relationship Select Tools Menu → Select Relationship
command → Select the table which should command → Select the table which should
be related → Click 'Add' command button. be related → Click Add command button.
(Indicate the number of tables required) → (Indicate the number of tables required)
Drag the Primary Key to the foreign key of → Drag the Primary Key to the foreign
the table which should be related (Figure 9.16) key of the table which should be related →
→ Select 'Enforce Referential Integrity' on Right click on Relationship and select Edit
'Edit Relationship' Dialogue Box (Refer 9.17) → Select 'Update Cascade' under 'Update
→ Select 'Cascade Update Related Field' and Option' on Relations Dialogue Box. Select
'Cascade Update Related Records' → Click 'Delete Cascade' under 'Delete Option'
'Create' command button. (Figure 9.18) → Click 'OK' command
button.
277
For free distribution 277
277
Figure 9.16 - One-to-many relationship between two tables.
278
278 For free distribution
The Admission Number is the primary key of the Student Table and the
Foreign Key of the Marks Table.
observation
Special Features in Related Tables
As soon as the values of a primary key field of the Student Table are updated
using 'Referential Integrity,' the foreign key field values of the related table are
automatically changed.
Further, when a record of the Student Table is deleted, the related records of
the related table are automatically deleted.
First, data should be entered to the student Table. After that, data can be
entered to the Marks Table.
After entering the marks to the Student Table, data can be entered to the
Marks Table through it.
For this, click on the + mark which is in front of the Admission Number of
the Student Table. Then data can be entered to Marks Table easily. (Refer Figure
9.19)
279
For free distribution 279
279
9.6 Creating Forms to Entering and Displaying Data
Now you have knowledge about creating a table and entering data to it.
Forms are used to enter data to a table in Database Management Systems. Further,
forms are used to display entered data as well.
Here, a row of a table is displayed and entered as a record in a form. (Refer
Figure 9.18)
Data Table
Name Address Telephone No Email
Anwar Athurugiriya 0773684949 [email protected]
Nimal Galewela 07184632481 [email protected]
Sudakaran Kandy 0817587484 [email protected]
Saman Kegalle
Figure 9.18 – Table and Data Form
Name Nimal
Address Galewela
Name Saman
Address Telephone No 07184637481
Kegalle
Email [email protected]
Telephone No
Email
Display data on form
Data input through form
Each input record is entered to the last column of the table. Each record of
the table can be filled one by one through the form. For this, the Record Navigation
Bar of a form is used. (Refer Figure 9.20)
Existing
First Record Record
Previous Record
Total Records
New (empty)
Record
Next Record
Last Record
Figure 9.20 – Checking records from a data form.
280
280 For free distribution
1' Building a Data Form
Create → Form Design → Add Existing Fields → Show tables → Select the required table
→ Drag table fields to the form (Refer Figure 9.21)
Design Tab → Select 'Control Wizards' (Refer Figure 9.23) → Select the button indicated as
XXXX → Establish the button in data form → Select Record Operation in Command Button
Wizard (Refer Figure 9.24) → Select the Action which should be entered (E.g.: Add New
Record) → Give a proper name to the button → Finish
282
282 For free distribution
9.7 Designing Query to Get Information
Let us use a query to obtain necessary information from the data of related
tables. Query represents data of selected fields (columns) in each table. (Refer
Figure 9.25)
Student No Name Email Subject Subject
A1 Pubudu [email protected] No
A2 Faris [email protected] B1 Maths
A3 Kamalan Kam_n@hotmal. B2 Science
com B3 English
A4 Thanuja [email protected]
When Name, Subject and Marks are taken by a query from the three table above,
Figure 9.25 - Obtaining data to a query
283
For free distribution 283
283
For Microsoft OfficeAccess'''
Create Tab → Query Design → Select the necessary tables (Refer Figure 9.26) → Select the
necessary field from the tables → Run the query
Designing a Query
284
284 For free distribution
Refer figure 9.28 given below for the information received after running the query.
As shown in Figure 9.28, marks scored by students in 2013 and 2014 are
shown. You can obtain marks scored by students in 2014 only (information shown
in Figure 9.28) by naming year 2014 as Criteria. (Refer Figure 9.29)
285
For free distribution 285
285
Total:[Marks]æ[Maths]¬[Marks]æ[Science]¬[Marks]æ[English]. This can be
typed (Refer Figure 9.31.) or can be performed by building the expression, right
click the Mouse button on the column which you expect to get the total and select
Build command. Then use the Dialogue Box you get. (Refer Figure 9.32)
After running the query built in the way explained above, you get information
as given in Figure 9.33 which is given below.
286
286 For free distribution
Figure 9.33 – Marks and total of students scored in 2013
287
For free distribution 287
287
Figure 9.35 – Report which displays the total marks of students in 2013
Let us learn how numerical values included in a report are calculated.
For this, let us find the total of admission fees paid by the students. Create a
table as explained above using Report Wizard including Admission Number, Name
and Admission Fees. Then change from Report View to Design View. Then you
will get a report layout as shown in Figure 9.36.
Select the tool given as ‘ab’ on the tool barand establish the text box under
Report Footer. (Refer Figure 9.37)
288
288 For free distribution
Figure 9.37 – Establishing the text box
The text box is indicated as unbound. The reason for this is there is no
field given to it. To get the total of admission fees, get the Expression Builder
Dialogue Box to build expressions by clicking the button with three dots in front of
the Control Source on Property Sheet. (Refer Figure 9.39)
Figure 9'38 - Property Sheet
289
For free distribution 289
289
To get the total of admission fees, type the expression = Sum ([Student
Table]![Admission Fees]) and type OK. Then change the view from Design View to
Report View. After that, you will get the report which displays the total of Admission
Fees. (Refer Figure 9.40)
Activity
1. Explain the advantages of electronic databases.
2. Explain with examples the features that are available in electronic databases.
290
290 For free distribution
8. Define foreign key and with three examples.
12. Explain what 'objects' are in Database Management Systems and explain
the uses of the objects.
Sammary
291
For free distribution 291
291
² If a field (or a combination of fields) of one table can be used to uniquely
identify rows in another table, these fields are called the foreign keys.
² A relationship is built up between two tables by using foreign key.
² Data redundancy means the same data is stored in several database tables.
292
292 For free distribution