Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

CSEC I.T.

SECTION 6
DATABASE
MANAGEMENT

Do refer to the syllabus and text book!


What is a database?
A database is an organised collection of related
information.
A database is a repository of information and a
collection of tables that are related to
each other (syllabus).
A benefit of a database is that it provides easy
and fast storage and retrieval of information.
A disadvantage is that it is more time-consuming
to design than a manual database(for example
a filing system).
What is the purpose of a database?
• What is the purpose of the Database System?
- Goseeko blog
– This site categorizes a database as a particular
type of software. What type of software is a
database?
• Do review this site and conduct other research
and write the purpose of a database in your
note book.
• Also utilize your text book.
DBMS
A database management system is the term
used for any program that handles the
storage, modification and retrieval of data
as well as controlling who has access to the
information. Database programs include,
Microsoft Access, Lotus Approach,
FileMaker Pro, Corel Paradox and Libre
Office Base (Gay & Blades, p.191, 2019).
Your task
Use your text book and or research at least
five advantages and five disadvantages of
computerized databases.
Database terms
• TABLE – a table is a collection of records, made up of a set of
rows and columns.
• RECORD – a record is a collection of related fields. It contains
data about an individual item or entity (Campbell & Wood).
• FIELD – a field is a single column in a table that stores data. It
is part of a database record (Campbell & Wood).
• ENTITY – an entity in a database represents a thing, person,
or event that has characteristics for which we want to record
data. (table)
• DATA TYPE – the data type determines the type of data that a
field can store.
• FIELD DESCRIPTION – this describes what is to be
typed/entered in the field
• FIELD SIZE – this determines the amount of characters a field
can store.
Data Types in Database
• Text – stores alphanumeric characters (letters or
numbers) up to 255 characters. The ‘text’ data
type is chosen for fields such as Name,
PhoneNumber and Address.
• Numeric – this data type stores integers (or real
values[Campbell & Wood. text pg. 224]).
Examples include age, quantity, average and
StudentMark.
• Currency – stores monetary values, for example
Salary, Price and Discount.
• Date/Time – stores date/time values which can be
displayed in different formats.
• Logical – yes/no data or true or false
representation
Terms continued
• Table Structure – this is a plan that shows the
field names, data types and the field sizes of
fields in a table.
– A table structure can be created in Design View and
records can then be entered or edited in Datasheet View
or by creating a form.
• Primary Key – a primary key field is a field that is a
unique identifier for each record in a table. For
example, StudentID or VehicleNo or BookID.
Terms continued

• Secondary key – A key that cannot uniquely


identify a record; can be used to select or
identify a group of records that belong to a set
and can be used for data retrieval purposes.
Terms continued
• Candidate Key – is a key that can also be a primary
key if it is unique. For example StudentID,
BirthCertificateNo, PhoneNo are ‘candidates’ for
primary keys as they are unique to a student’s
record. In some cases the birth certificate number
or phone number may not be readily available
hence StudentID which maybe a number
automatically generated by the software or
inputted by the user will be the best option for the
primary key. A table may have one or more
candidate keys or none at all.
Terms continued
• Foreign key – this refers to a field in a table
which is a primary key in another table.

• Composite Key – refers to a primary key that


comprises two or more fields.

• {refer to the syllabus to the types of objects to


create}
REPORTS
• Database reports allow users to display fields
in a particular way. Reports can be created
using the wizard or in design view.
• Fields can be sorted and or grouped.
• Statistical and summary features can be easily
added to a report to the count, sum and
average of data.
• Reports can be displayed as softcopy,
exported and printed.
• Users can rename the report title, add an
image and edit the report in Design view.
How to create a Form {and sub-form}
• Select the Create tab
• Select the ‘More Forms’ command
• Select ‘Form Wizard’
– Follow the step by step instruction in the Wizard
QUERIES - A query is a database feature/object that
allows you to display records that meet a particular
criteria.
How to create a Query
Select the Create tab, Select ‘Query Wizard’, Choose
tables, Select Fields and type in the criteria.
Queries can also be created from Design View.
Query

A query can include one table


or more than one table with
one criteria or more than one
criteria.
Calculated Query

A calculated field is a field that


derives its value by
performing a function on
values from the other table
fields.
Query in Design View
Row Label Explanation

Field Select a field name to use in your query

Table The name of the table the field is from

Sort Select to sort in ascending or descending order

Show A checkbox to specify whether you want the


field to show in the dynaset (result of query)
Criteria Specify the set of criteria to answer the query
Draw - Query design view example
Field StudentID FirstName Surname ContactNo DateOfBirth Gender Religion

StudentData StudentData StudentData StudentData StudentData StudentData StudentData

Table

Sort

Show

Male

Criteria
• We can select to sort in ascending order (A to
Z), in descending order (Z to A) or not to sort.

• We can also select the Show box or deselect


the Show box, for the data to appear in the
result of the query or not.

• The criteria row, allows us to enter a keyword


under the appropriate field name to only
show certain records on the table.
Access Activity
❖ Create a database file named School_your name
❖Create a table in DESIGN VIEW with the following
field names;
– StudentId o Select an appropriate data type for
– FirstName
each field
– Surname
o Create lookup values for Gender,
– AddressLine1
– Area Religion and Area
– ContactNumber Apply a date format and input mask
– DateOfBirth o Assign a primary key to StudentId
– Gender oAdd two fields – RegPaid and Amt
– Religion
Access Activity
❖ Construct the CTS database using the instructions
from your textbook.
Report expressions
• Using Count and IIF expressions in a report |
Database Solutions for Microsoft Access |
databasedev.co.uk
• Report Builder for Microsoft Access- The
Better Access Report Wizard | OpenGate
Software (opengatesw.net)
• sum if database access report based on
criteria –search phrase

You might also like