You are on page 1of 26

DATABASE APPLICATION

MODULE NO.2.0: OFFICE APPLICATION


UNIT NO.2.3: DATABASE APPLICATION
ELEMENT 2.3.1: Selecting and creating database
LEARING OBJECTIVES
• Define a database
• Define key terms used in database
• Explain the importance of database
application
• Explain differences between
spreadsheet and database
WHAT IS A DATABASE?
• Is an organized body of related information
that is arranged for ease and speed of search
and retrieval.
• Examples of databases are: School
management system, address books and
human resource management system .
DATABASE MANAGEMENT SYSTEM (DBMS)

• A database management system is an


application to design and manage databases.
• Examples of DBMS are Microsoft Access,
MySQL Server and Oracle
FUNCTIONS OF DBMS

• Data dictionary
management
• Data storage management
• Data access and retrieval
• Security management
DATA STORAGE
• Database data is organized in tables
• Tables consist of records and fields
• Database tables are always related to each
other
• TABLES are used to enter, store, organize and
view database data
RECORDS AND FIELDS
• A record is a row in the table that contains
information such as name, address, phone
number, etc.
• A field is a column that contains categories of
information
• NOTE: Each field in a table contains the same
type of information
AN EXAMPLE OF A DATABASE TABLE
KEY FIELDS
• A key field is a unique field in a database table
• There are three types of KEY fields namely:
– Primary key
– Composite key
– Foreign key
KEY FIELDS EXPLAINED
• PRIMARY KEY: This is a field in a database table that
uniquely identifies a record. E.g. trainee’s registration
number
• COMPOSITE KEY: This is when two or more fields are used
as a primary key. E.g. in a school database table fields such
as examination number and registration number may act
together as composite key
• FOREIGN KEY: Is a field (or fields) that point to the primary
key of another table. The purpose of the foreign key is to
ensure referential integrity of the data in the two relating
tables.
FOREIGN KEY ILLUSTRATION

Table CUSTOMER Table ORDERS


Column name Characteristic

Customer ID Primary key Column name Characteristics


Order ID Primary key
Last Name Order Date

First Name Customer ID Foreign Key

Amount
RELATIONAL DATABASE
• A relational database is the one having its tables
connected (related) with each other using the key
fields
• Connection between database tables is termed as a
RELATIONSHIP
• There are three main types of relationships in
databases:-
– ONE-TO-ONE
– ONE-TO-MANY
– MANY-TO-MANY
TABLE RELATIONSHIPS
• ONE-TO-ONE RELATIONSHIP: This is when one
record in one table points (relates) to only one
record in another table
• ONE-TO-MANY RELATIONSHIP: This is when one
record in one table relates to several records in
another table
• MANY-TO-MANY RELATIONSHIP: This is when
many records in one table relate to many
records in another table
REFERENTIAL INTEGRITY
• Is the ability to maintain links between
database tables.
• In other words Referential integrity is a
database concept that ensures that
relationships between tables remain
consistent
REFERENTIAL INTEGRITY ENFORCES THE
FOLLOWING THREE RULES
1. You may not add a record to a child table
unless the mother table is filled first
2. If the primary key for a record in the mother
table is changed, all corresponding fields in the
other table must be modified using a cascading
update
3. If a record in the Mother table is deleted, all
corresponding records in the other table must
be deleted using a cascading delete
SPREADSHEET VS DATABASE
• Spreadsheet = calculator
Database = information storage/retrieval system
• The amount of data that is usually stored in a database
is way more than what is contained in a spread sheet
• A spread sheet is edited directly by people while a
database is accessed by applications that enter and
modify data
• A spread sheet is usually used for presentations and
paper works while databases are commonly used in
cases where a lot of data needs to be stored
DATA TYPES
DATA TYPE USE FOR
Text Text or combinations of text and numbers, such as addresses. Also numbers
that do not require calculations, such as phone numbers, part numbers, or
postal codes.

Memo Lengthy text and numbers, such as notes or descriptions.


Number Numeric data to be used for mathematical calculations, except calculations
involving money (use Currency type).

Date/ Time Dates and times.


Currency Currency values. Use the Currency data type to prevent rounding off during
calculations.

AutoNumber Unique sequential (incrementing by 1) or random numbers automatically


inserted when a record is added.

Yes/No Fields that will contain only one of two values, such as Yes/No, True/False,
On/Off.
EXERCISE
• What does DBMS stands for?
• Mention three examples of DBMS
• Mention three data types in
database
INDIVIDUAL TASK
1. Define database
2. Write short notes on three types of
database relationships
3. What is a key field? Mention three types
of key fields.
END OF THE SESSION

THANK YOU FOR LISTENING


DATABASE APPLICATION

MODULE NO.2.0: OFFICE APPLICATION


UNIT NO.2.3: DATABASE APPLICATION
ELEMENT 2.3.1: Selecting database
LEARNING OBJECTIVES
• Observe safety precautions
regarding to database application
• Identify database application
• Identify database structure
• Select a database
DEMONSTRATION
INDIVIDUAL TASK
1. Start Microsoft Office Access
2. Go to templates section
3. Select Students database
4. View the database structure
5. View relationships
6. Close Microsoft Access
END OF THE SESSION

You might also like