Professional Documents
Culture Documents
Topic Title: Designing Databases: Specific Objectives
Topic Title: Designing Databases: Specific Objectives
SPECIFIC OBJECTIVES:
At the end of the topic session, the students should be able to:
MATERIALS/EQUIPMENT:
o OHP
o File/s (06 Designing Databases)
06 Instructor’s Guide
06 Presentation
06 Handout
TOPIC PREPARATION:
o Prepare the slide handout (10 pages) needed for the topic
presentation and have it photocopied.
o Prepare the computer unit for slides presentation.
o Prepare additional examples on the sub-topics to be presented.
PRESENTATION OVERVIEW:
A. Bell-ringer 10 min
B. Instructional Input
What is Systems Design? 5 min
a. Discuss systems design
Databases 10 min
a. Define database
b. Discuss the effectiveness objectives of the database
Database Design 10 min
a. Discuss the five purposes of database design
b. Discuss the two steps in file and database design
File Organization 10 min
a. Define file
b. Discuss the different file types
Relational Database Model 10 min
a. Discuss relational database model
b. Explain the example of relation
c. Discuss the properties of relation
d. Discuss the procedures that must be followed in creating
relational database schema
Database Normalization 15 min
a. Define normalization
b. Discuss the different normal forms and their examples
Database Relationships 7 min
a. Discuss the different database relationships and their
examples
Guidelines for Master File or Database Relation Design 8 min
a. Discuss the guidelines in designing master files or database
relation
Integrity Constraints 5 min
a. Define integrity constraints
b. Discuss the three types of integrity constraints
Make Use of the Database 15 min
a. Discuss the steps that a systems analyst must take to make
sure a database will be useful for interpreting data
C. Generalization 15 min
D. Application 60 min
Total duration 180 min
TOPIC PRESENTATION:
A. Bell-ringer
1. Start the session by having a short activity. Divide your class into 4
groups and ask each group to plan for their dream vacation. Ask
each group to write down in a one whole sheet of paper all the details
of their dream vacation. Details should include what is your dream
vacation, when is the date, how many persons will be joining, the
activities that you will be doing, the duration of the vacation, the
expenses, and etc. Give the students at least 5 minutes to discuss
with their group and 5 minutes to present it to the class.
2. After all the students have presented, explain to them the importance
or relation of the activity to the next topic. Tell them that the activity
done will help them understand what systems design is
B. Instructional Input
Slide 1 1. Start the discussion by presenting the topic coverage to your students
using Slide 1 of 06 Presentation.
Designing Databases
What is System Design?
Databases
Database Design
File Organization
Relational Database Model
Database Normalization
Database Relationships
Guidelines for Master File or
Database Relation Design
Integrity Constraints
Make Use of the Database
Slide 2 2. Before showing Slide 2, ask at least three of your student to answer
the question, “What is Systems Design?” Acknowledge the answers
What is System Design? of your students. After that, show Slides 2 to 3 and explain systems
• the systems analyst and the user develop a design using the information below.
concrete understanding of how the system
will operate
• process of defining the architecture, Systems design is often the first phase of the SDLC in which
components, modules, interfaces, and data
for a system to satisfy specified
the systems analyst and the user develop a concrete
requirements understanding of how the system will operate. The activities
in the design phase are not necessarily done in sequence.
For instance, the design of data, system inputs and outputs,
Databases
Slide 4 1. Show Slides 4 to 6. Define and explain database. Also, discuss the
effectiveness objectives of the database.
Databases
As defined in your database subject, a database is an
• integrated collection of stored data that is integrated collection of stored data that is centrally managed
centrally managed and controlled
and controlled. It stores information about dozens or
• managed and controlled by a database hundreds of entity types of classes. It is managed and
management system (DBMS)
controlled by a database management system (DBMS),
which is a system software component that is generally
purchases and installed separately from other system
Slide 5 software components. Examples of modern DBMS are
Microsoft Access and Oracle.
Databases
• Effectiveness objectives of the database are: The effectiveness objectives of the database are as follows:
• Ensure that data can be shared among users for
a variety of applications. Ensure that data can be shared among users for a
• Maintain data that are both accurate and
consistent. variety of applications.
• Ensure that all data required for current and
future applications will be readily available. Maintain data that are both accurate and consistent.
Ensure that all data required for current and future
applications will be readily available.
Slide 6 Allow the database to evolve as the needs of the
users grow.
Databases Allow users to create their personal view of the data
without concern for the way the data are physically
• Allow the database to evolve as the needs of the
users grow. stored.
• Allow users to create their personal view of the
data without concern for the way the data are
physically stored.
Database Design
Slide 9 2. Discuss the two steps in file and database design using Slide 9.
Database Design File and database design come about in two steps. First, a
• A logical database model is developed, logical database model is developed, which describes data
which describes data using a notation that
corresponds to a data organization used by a
using a notation that corresponds to a data organization used
database management system. by a database management system. Relational database
• Relational database model
model is the most common style for a logical database
• A physical database model is developed that model. Once a logical database model is clearly and
provides these specifications.
precisely developed, the technical specifications for computer
files and databases in which to store the data are prescribed.
Then, a physical database model is developed that provides
these specifications.
File Organization
Slide 10 1. Explain to the class what a file is using the information below. After
that, show Slides 10 to 11 and discuss each of the different file types.
File Organization During discussion of file types, ask some of your students to give
• File Types: examples of each file types.
• Master Files
• collection of records pertaining to one of the main
subjects of an information system
• Table Files
A file includes groups of records used to provide information
• include data that is used to calculate more data or
performance measures
for operations, planning, management, and decision-making.
• Transaction Files Files are used for storing data for an indefinite period of time,
• collection of records
or these can be used to store data temporarily for a specific
purpose. Master files and table files are used to store data
Slide 11 for a long period of time. While the temporary files are
usually called transaction files, work files, or report files.
File Organization
Details of these file types are discussed below.
• Work Files
• sometimes make a program run more efficiently
• Report Files
• describe how a report is printed
Master Files. A master file is a collection of records
pertaining to one of the main subjects of an
information system, such as employees, customers,
products, and vendors. Master files include
Relational Database Model Relational database model represents data in the form of
related tables, or relations. A relation is a named, two-
• represents data in the form of related tables,
or relations
dimensional table of data. Each relation (or table) is
• Relation composed of a set of named columns and a random number
• named, two-dimensional table of data
of unnamed rows. Each column in a relation corresponds to
an attribute (or field) of that relation. Each row of a relation
corresponds to a record (or tuple) that contains data values
for an entity. A single cell in a table is called a field value,
attribute value, or data element.
Relational Database Model Not all tables are relations. There are several properties of
• Properties of relations that differentiate them from relations that differentiate them from non-relational tables.
non-relational tables:
These are as follows:
1. Entries in cells are simple. An entry at the
intersection of each row and column has a
1. Entries in cells are simple. An entry at the
single value. intersection of each row and column has a single
2. Entries in a given column are from the same
set of values. value.
2. Entries in a given column are from the same set of
values.
3. Each row is unique. Uniqueness is guaranteed since
Slide 15 the relation has a non-empty primary key value.
4. The sequence of columns can be interchanged
Relational Database Model without changing the meaning or use of the relation.
5. The rows may be interchanged or stored in any
3. Each row is unique. Uniqueness is guaranteed
since the relation has a non-empty primary sequence.
key value.
4. The sequence of columns can be interchanged
without changing the meaning or use of the
relation.
Keys are essential element of relational database design
5. The rows may be interchanged or stored in
any sequence.
since these are the basis for representing relationships
among tables. Keys connect tables to each other.
Database Normalization
2. After that, show Slides 18 to 25. Discuss the different normal forms
Slide 18 and explain the example of each form.
102 Tony Sy
891-8960
874-5612
101 Juan Dela Cruz 891-8959
874-5613
103 Hannah Reyes 887-4526
Student Table
Rizal
_ID
Stud_ID
1010
Course_ID
SYSAD
Instructor_ID
01
1010 SYSAD Benet Tanyag 01
1020
1030
COMORG
DATACOM
02
03 1020 COMORG Rolly Torio 02
Enrollment Table
1030 DATACOM Tanya Torres 03
Table 6.7 Enrollment Table
Slide 25
Instructor Table
To convert these tables into 3NF, the resulting table would
be:
Course_ID Course_Title
SYSAD Systems Analysis and Design
COMORG Computer Organization
DATACOM Data Communication
Table 6.11 Course Table
Instructor_ID Instructor_Name
01 Benet Tanyag
02 Rolly Torio
03 Tanya Torres
Table 6.12 Instructor Table
Database Relationships
Slide 26 1. Before showing the next slide, discuss database relationships. Then,
discuss the different database relationships and their examples using
Database Relationships Slides 26 to 31.
• One-to-One Relationship
• occurs when there is exactly one record in the Database normalization is the foundation of database theory.
first table that corresponds to exactly one
record in the related table Once a database is normalized, relationships between the
data in multiple tables should be created.
Slide 28
Database Relationships
• One-to-Many Relationship
• primary key table contains only one record that
Figure 6.1 One-to-One Relationship
relates to none, one, or many records in the
related table
One-to-Many Relationship. The primary key table
contains only one record that relates to none, one, or
many records in the related table. For example, a
PHYSICIAN is assigned many PATIENTS, however,
Slide 31
Database Relationships
• Example:
Slide 32 1. Using Slides 32 to 33, discuss the guidelines in designing master files
or database relation.
Guidelines for Master File or
Database Relation Design
Below are some guidelines to be taken into account when
• Each separate data entity should create a
master database table. Do not combine two
designing master files or database relations:
distinct entities on one file.
• A specific data field should exist only on
one master table.
1. Each separate data entity should create a master
database table. Do not combine two distinct entities
on one file. For example, the STUDENT MASTER
table should contain only student information, and
Slide 33 COURSE MASTER table should contain only course
information.
Guidelines for Master File or 2. A specific data field should exist only on one master
Database Relation Design
table. For example, the STUDENT NAME should
• Every master table or database relation exist only on the STUDENT MASTER table, not on
should have programs to Create, Read,
Update, and Delete (CRUD) the records. If the CUSTOMER MASTER table or any other master
possible, only one program should add new
records and only one program should delete
table. The exceptions to this guideline are the key or
specified records. index fields, which may be on as many tables as
necessary. If a report or screen needs information
from many tables, the indexes should provide the
linkage for obtaining the required records.
Integrity Constraints
Slide 34 1. Before showing the slide, discuss what integrity constraints are using
the information below. Then, enumerate and discuss the three types
Integrity Constraints of integrity constraints using Slide 34.
• Entity integrity
• rules that manage the composition of primary
keys
Integrity constraints are rules that manage changing and
• Referential integrity deleting records, and that help keep the data in the database
• describes a consistent state among foreign key
and primary key values accurate. There are three types of integrity constraints that
• Domain integrity apply to a database. These are:
• used to validate the data, such as table, limit,
range, and other validation checks
Entity integrity
Referential integrity
Domain integrity
Slide 35 1. Show Slides 35 to 39 and discuss the steps that a systems analyst
must take to make sure a database will be useful for interpreting data.
Make Use of the Database Explain each step further.
1. Choose a relation from the database.
• accomplished by keeping a directory of user views as
a memory aid The systems analyst must take several steps in sequential
2. Join two relations together.
• intended to obtain two relations and put them together
order to make sure that the database will be useful for
to create a larger relation
• Example: presenting data. These are as follows:
CUSTOMER (CUST_NUM, CUST_NAME, WAREHOUSE_NUM)
and
WAREHOUSE (WAREHOUSE_NUM, WAREHOUSE-LOC)
1. Choose a relation from the database. This step is
accomplished by keeping a directory of user views as
and
WAREHOUSE (WAREHOUSE_NUM,
WAREHOUSE-LOC)
C. Generalization
1. Ask the students to answer the problem given below. Answers must
be written in a one whole sheet of paper and to be submitted at the
end of the session.
PATIENT(Patient_ID, Room_Num,
Admit_Date, _Address)
PATIENT(Patient_Num, Treatment_Desc,
Address)
TREATMENT(Treatment_ID, Description,
Cost)
PHYSICIAN(Physician_ID, Name,
Department)
PHYSICIAN(Physician_ID, Name,
Supervisor_ID)
D. Application
1. Ask the students to perform the exercise below. Give the students an
hour to finish the exercise. Move around the class to check their
activities. Tell them that they can consult you with their concerns
regarding the activities.
REFERENCES:
Shelly, G. & Harry J. (2012). Systems analysis and design (9th Edition).
Boston: Course Technology Cengage Learning.
Hoffer, J., George, J.& Valacich, J. (2008). Modern systems analysis and
design (5th Edition.). Upper Saddle River, N.J.: Prentice Hall.