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

Systems Analysis and Design

TOPIC TITLE: DESIGNING DATABASES

SPECIFIC OBJECTIVES:

At the end of the topic session, the students should be able to:

1. recall database concepts,


2. explain the role of database design in the analysis and design of
an information system,
3. list the purposes of database design,
4. differentiate logical from physical database design,
5. identify the types of files,
6. describe what relational database model is,
7. discuss the different normal forms,
8. discuss the different relationships in a database,
9. identify the guidelines to be taken into account when designing
master files or database relations,
10. list the types of integrity constraints that apply to a database, and
11. enumerate the steps in sequential order to make sure that the
database will be useful for presenting data.,

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

Designing Databases *Property of STI


Page 1 of 15
Systems Analysis and Design

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

What is System Design?

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,

Designing Databases *Property of STI


Page 2 of 15
Systems Analysis and Design

Slide 3 and interfaces interact, which allows the systems analyst


identify flaws and missing elements.
What is System Design?
Systems design is the process of defining the architecture,
• similar to a set of blueprints used to build a components, modules, interfaces, and data for a system to
house
• also called physical design
satisfy specified requirements. It is similar to a set of
• focuses on the technical or implementation blueprints used to build a house. It is also called physical
concern of the system
design. Thus, while systems analysis emphasized the
business problem, systems design focuses on the technical
or implementation concern of the system.

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 7 1. There are five purposes of database design. Using Slides 7 to 8,


discuss these five purposes.
Database Design
• Five purposes of database design:
The following are the five purposes of database design:
1. Structure the data in stable structures, called
normalized tables, that are not likely to
change over time and that have minimal 1. Structure the data in stable structures, called
redundancy.
2. Develop a logical database design that reflects normalized tables, that are not likely to change over
the actual data requirements that exist in the
forms (hard copy and computer displays) and time and that have minimal redundancy.
reports of an information system.
2. Develop a logical database design that reflects the
actual data requirements that exist in the forms (hard
copy and computer displays) and reports of an
information system.
3. Develop a logical database design from which we
can do physical database design.
4. Translate a relational database model into a technical
file and database design that balances several
performance factors.

Designing Databases *Property of STI


Page 3 of 15
Systems Analysis and Design

5. Choose data storage technologies (such as CD-ROM


Slide 8 or optical disk) that will efficiently, accurately, and
securely process database activities.
Database Design
3. Develop a logical database design from which
we can do physical database design.
4. Translate a relational database model into a
technical file and database design that
balances several performance factors.
5. Choose data storage technologies (i.e., CD-
ROM or optical disk) that will efficiently,
accurately, and securely process database
activities.

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.

Logical and physical database designs are usually done in


parallel with other system design steps. The systems analyst
collect the detailed specifications of data necessary for
logical database design while designing system inputs and
outputs. Then, the designs for logical databases and system
inputs and outputs are used in physical design activities to
state to programmers, database administrators, network
managers, and others how the new information system is
implemented.

The focus of this discussion is on the aspect of physical


design which most often undertaken by a systems analyst—
physical file and database design.

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

Designing Databases *Property of STI


Page 4 of 15
Systems Analysis and Design

descriptive data, such as name and address, as well


as summary information, such as total amount due
and annual sales. Examples of a master file are
patient records, employee file, student records,
inventory file, etc.
 Table Files. A particular table file includes data that
is used to calculate more data or performance
measures. An example of table file is a tax table.
Generally, table files are read only by a program.
 Transaction Files. A transaction file is a collection of
records. The data in transaction files is used to
update the master files, which contain the data about
the subjects of the organization (employees,
customers, vendors, etc.).
 Work Files. Using a work file can sometimes make a
program run more efficiently.
 Report Files. A report file is a file that describes how
a report is printed. This is very useful since users
can take files to other computer systems and output
to specialty devices such as plotters or laser printers.

Relational Database Model

Slide 12 1. Show Slides 12 and discuss relational database model.

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.

Each relation in a relational database should have a unique


key—is a field or set of fields, the values of which occur only
once in all the rows of the relation. If there is only one field
(or set of fields) is unique, then that key is called a primary
key.

Slide 13 2. Show Slide 13 and explain the example of a relation.

Relational Database Model Below is an example of a relation named STUDENT. This


• Example: relation contains the following attributes describing students:
Stud_ID
1001
Name
Juan Dela Cruz
Course
BSECE
Stud_ID, Name, and Course. This table has six sample rows,
1002
1003
Tony Sy
Hannah Reyes
BSCE
BSCS
corresponding to six students.
1004 Maria Santos BSBA
1005 Leah Meneses BSIT
1006 Carol Mina

STUDENT(Stud_ID, Name, Course)


BSN
Stud_ID Name Course
1001 Juan Dela Cruz BSECE
1002 Tony Sy BSCE
1003 Hannah Reyes BSCS
1004 Maria Santos BSBA
1005 Leah Meneses BSIT
1006 Carol Mina BSN
Table 6.1 Student Relation Example

The structure of the Table 6.1 can be expressed with a


shorthand notation in which the name of the relation is
followed (in parentheses) by the names of the attributes in

Designing Databases *Property of STI


Page 5 of 15
Systems Analysis and Design

the relation. The identifier attribute (called the primary key) is


underlined. For example, the STUDENT table can be
expressed as:

STUDENT(Stud_ID, Name, Course)

Slide 14 3. Show Slides 14 to 15 and discuss the properties of relation.

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.

Slide 16 4. There are procedures that must be followed in creating a relational


database schema. Using Slides 16 to 17, discuss these procedures.
Relational Database Model
• Steps to follow in creating a relational There are steps to follow in creating a relational database
database schema: schema. These are as follows:
1. Create a table for each entity type.
2. Choose a primary key for each table (invent
one, if necessary).
1. Create a table for each entity type.
3. Add foreign keys to represent one-to-many
relationships.
2. Choose a primary key for each table (invent one, if
necessary).
3. Add foreign keys to represent one-to-many
Slide 17 relationships.
4. Create new tables to represent many-to-many
Relational Database Model relationships.
5. Define referential integrity constraints.
4. Create new tables to represent many-to-many 6. Evaluate schema quality and make necessary
relationships.
5. Define referential integrity constraints. improvements.
6. Evaluate schema quality and make necessary
improvements. 7. Choose appropriate data types and value restrictions
7. Choose appropriate data types and value
restrictions (if necessary) for each field.
(if necessary) for each field.

Database Normalization

1. Using the information below, discuss normalization before presenting


the slide.

Normalization is a technique used to assess the quality of a


relational database schema by minimizing data redundancy.
It defines specific methods to eliminate these redundancies.
Normalization is based on the analysis of functional
dependence and on a series of normal forms. Let’s discuss
these further.

Designing Databases *Property of STI


Page 6 of 15
Systems Analysis and Design

2. After that, show Slides 18 to 25. Discuss the different normal forms
Slide 18 and explain the example of each form.

Database Normalization  First Normal Form. A relation is in first normal form it


is contains no repeating fields or group of fields.
• First Normal Form (1NF) Repeating columns make your data less flexible,
• A relation is in first normal form it is contains
no repeating fields or group of fields. waste disk space, and make it more difficult to search
for data. Consider the example below.

The CUSTOMER table in Table 6.2 contains the


following attributes: Cust_ID, First_Name, Surname,
Slide 19 and Tel_Num.
Database Normalization
• Example:
Cust_ID First Name Surname Tel_Num
Cust_ID First Name Surname Tel_Num
101 Juan Dela Cruz 891-8959

102 Tony Sy
891-8960
874-5612
101 Juan Dela Cruz 891-8959
874-5613
103 Hannah Reyes 887-4526

Cust_ID First Name Surname Tel_Num


891-8960
101
101
Juan
Juan
Dela Cruz
Dela Cruz
891-8959
891-8960
102 Tony Sy 874-5612
102
102
103
Tony
Tony
Hannah
Sy
Sy
Reyes
874-5612
874-5613
887-4526
874-5613
103 Hannah Reyes 887-4526
Table 6.2 Customer Table Example

Notice that the Tel_Num attribute with Cust_ID 101


and 102 both holds two values. This means that a
customer can have multiple telephone numbers. To
make this in 1NF, we would add additional records to
eliminate repeating attributes. The resulting table is
shown in Table 6.3.

Cust_ID First Name Surname Tel_Num


101 Juan Dela Cruz 891-8959
101 Juan Dela Cruz 891-8960
102 Tony Sy 874-5612
102 Tony Sy 874-5613
103 Hannah Reyes 887-4526
Table 6.3 1NF Example

Slide 20  Functional Dependency. This occurs when one


attribute in a relation uniquely determines another
Database Normalization attribute. This can be written as A → B which would
• Functional Dependency (FD) be the same as stating "B is functionally dependent
• This occurs when one attribute in a relation
uniquely determines another attribute.
upon A." For example, in table listing employee
• This can be written as A → B which would be
the same as stating "B is functionally dependent
characteristics including Social Security Number
upon A." (SSN) and name, it can be said that name is
• Example:
• name is functionally dependent upon SSN (or SSN functionally dependent upon SSN (or SSN → name)
→ name)
because an employee's name can be uniquely
determined from their SSN.

Slide 21  Second Normal Form. A relation is in second normal


form if it is in first normal form and if each non-key
Database Normalization element is functionally dependent on the entire
• Second Normal Form (2NF) primary key. Thus, the next step is to remove all the
• A relation is in second normal form if it is in
first normal form and if each non-key element
partially dependent attributes and place them in
is functionally dependent on the entire primary
key.
another relation. Shown in Table 6.4 and Table 6.5
is an example of 2NF.

Cust_ID First Name Surname


101 Juan Dela Cruz
102 Tony Sy

Designing Databases *Property of STI


Page 7 of 15
Systems Analysis and Design

Slide 22 103 Hannah Reyes


Table 6.4 Customer Table
Database Normalization
• Example: Cust_ID Tel_Num
Cust_ID First Name Surname
Cust_ID Tel_Num
101 891-8959
101 891-8959
101
102
Juan
Tony
Dela Cruz
Sy
101 891-8960 101 891-8960
102 874-5612
103 Hannah Reyes 102
103
874-5613
887-4526
102 874-5612
Customer Table Customer_Telephone 102 874-5613
Table
103 887-4526
Table 6.5 Customer Telephone Table

2NF is satisfied if any one of the following conditions apply:

1. The primary key consists of only one attribute


(such as the attribute Cust_ID in relation
CUSTOMER).
2. No non-primary key attributes exist in the
relation.
3. Every non-primary key attribute is functionally
dependent on the full set of primary key
attributes.

Slide 23  Third Normal Form. A normalized relation is in the


third normal form if it is in second normal form and if
Database Normalization no non-key element is functionally dependent on any
• Third Normal Form (3NF) other non-key element.
• A normalized relation is in the third normal
form if it is in second normal form and if no
non-key element is functionally dependent on
any other non-key element.
The tables below are not in 3NF.

Stud_ID Stud_Name Stud_Add


1010 Roselle Perez Laguna
1020 Sarah Basco Antipolo
Slide 24 1030 Michelle Reyes Rizal
Table 6.6 Student Table
Database Normalization
• Example:
Stud_ID Stud_Name Stud_Add
1010
1020
Roselle Perez
Sarah Basco
Laguna
Antipolo
Stud Course_ID Instructor_Name Instructor_ID
1030 Michelle Reyes

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

Database Normalization Course_ID Course_Title


Course_ID Course_Title
SYSAD Systems Analysis and Design
SYSAD
COMORG
Systems Analysis and Design
Computer Organization COMORG Computer Organization
DATACOM Data Communication

Course Table DATACOM Data Communication


Instructor_ID
01
Instructor_Name
Benet Tanyag
Table 6.8 Course Table
02 Rolly Torio
03 Tanya Torres

Instructor Table
To convert these tables into 3NF, the resulting table would
be:

Stud_ID Stud_Name Stud_Add


1010 Roselle Perez Laguna
1020 Sarah Basco Antipolo
1030 Michelle Reyes Rizal
Table 6.9 Student Table

Designing Databases *Property of STI


Page 8 of 15
Systems Analysis and Design

Stud_ID Course_ID Instructor_ID


1010 SYSAD 01
1020 COMORG 02
1030 DATACOM 03
Table 6.10 Enrollment Table

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.

Database relationships can be associated with your


relationship with family members. For example, you and your
mother are related. You only have one mother. However,
she can have several children. Database relationships are
associated between tables. There are three types of
database relationships: one-to-one, one-to-many, and many-
to-many.

Slide 27  One-to-One Relationship. This relationship occurs


when there is exactly one record in the first table that
Database Relationships corresponds to exactly one record in the related
• Example: table. For example, each EMPLOYEE has a unique
OFFICE as shown in Figure 6.1.

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,

Designing Databases *Property of STI


Page 9 of 15
Systems Analysis and Design

Slide 29 a PATIENT is assigned only one PHYSICIAN as


shown in Figure 6.2.
Database Relationships
• Example:

Figure 6.2 One-to-Many Relationship

Slide 30  Many-to-Many Relationship. This is a relationship


between two tables in which one record in either
Database Relationships table can have many matching records in the other
• Many-to-Many Relationship table. For example, a STUDENT can have many
• relationship between two tables in which one
record in either table can have many matching
COURSE(s), and at the same time a COURSE may
records in the other table have many STUDENT(s) enrolled in it (see
illustration on the next page).

Slide 31

Database Relationships
• Example:

Figure 6.3 Many-to-Many Relationship

Guidelines for Master File or Database Relation Design

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.

Designing Databases *Property of STI


Page 10 of 15
Systems Analysis and Design

3. Every master table or database relation should have


programs to Create, Read, Update, and Delete
(CRUD) the records. If possible, only one program
should add new records and only one program
should delete specified records. However, many
programs may be responsible for changing data
fields in the course of normal business activities. For
example, a CUSTOMER MASTER file may have a
CURRENT BALANCE field that is increased by the
ORDER TOTAL in the order processing program and
decreased by a PAYMENT AMOUNT or an
AMOUNT RETURNED from two additional programs.

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

Entity integrity constraints are rules that manage the


composition of primary keys. The primary must not have a
null value, and if the primary key is a composite key, none of
the component fields in the key can contain a null value.
There are some databases that allow defining a unique
constraint or a unique key, which may contain a null value.
The unique key identifies only one record that is not a
primary key.

Referential integrity describes a consistent state among


foreign key and primary key values. Each foreign key is a
reference to the primary key of another table. A referential
integrity constraint is a constraint on database content. For
example, an order must be from a customer and an order
item must be something that is normally stocked in inventory.

Domain integrity rules are used to validate the data, such as


table, limit, range, and other validation checks. These are
typically stored in the database structure in one of two forms.

Make Use of the Database

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

Designing Databases *Property of STI


Page 11 of 15
Systems Analysis and Design

a memory aid. It is useful to have parallel views


available.

2. Join two relations together. The join operation is


intended to obtain two relations and put them
together to create a larger relation. To be able to join
two relations, it should have a common attribute. For
example, obtain two relations from the given below:

CUSTOMER (CUST_NUM, CUST_NAME,


WAREHOUSE_NUM)

and

WAREHOUSE (WAREHOUSE_NUM,
WAREHOUSE-LOC)

Assume these relations are joined over


WAREHOUSE_NUM to be able to get a new relation,
CUSTOMER-WAREHOUSE-LOCATION.

The join operation is an important operation since it


can take many 3NF relations and merge them to
make a useful relation.

3. Project columns from the relation. Projection is the


Slide 36 process of extracting certain columns from a
relational table.
Make Use of the Database
Example:
3. Project columns from the relation.
• process of extracting certain columns from a relational
table
CUSTOMER-WAREHOUSE-LOCATION
• Example:
CUSTOMER-WAREHOUSE-LOCATION (CUST_NUM, (CUST_NUM, CUST_NAME, WAREHOUSE_NUM),
CUST_NAME, WAREHOUSE_NUM), WAREHOUSE_LOC
WAREHOUSE_LOC

In this example, the relation is projected over


CUST_NUM and WAREHOUSE_LOC, and
throughout this projection process, duplicate records
are removed.

4. Select rows from the relation. The selection


Slide 37 operation is the same with projection, but it extracts
rows. It creates a new (smaller) relation by extracting
Make Use of the Database records that consist of an attribute meeting a
4. Select rows from the relation. particular condition. The figure below depicts how
• creates a new (smaller) relation by extracting records
that consist of an attribute meeting a particular
condition
the selection operation works.

Designing Databases *Property of STI


Page 12 of 15
Systems Analysis and Design

Figure 6.4 Selection Operation

Selection is performed on the PERSONNEL relation to


extract salaried employees only. It is not necessary to
remove duplicate records here.

5. Derive new attributes. This step involves the


Slide 38 manipulation of the existing data plus some
additional parameters (if necessary) to derive new
Make Use of the Database data. It creates new columns for the resulting
relation.
5. Derive new attributes.
• involves the manipulation of the existing data plus
some additional parameters (if necessary) to derive
new data 6. Index or sort rows. There are two options for
6. Index or sort rows.
• Indexing - is the logical ordering of rows in a relation ordering data: indexing and sorting. Indexing is the
according to some key.
• Sorting - is the physical ordering of a relation. logical ordering of rows in a relation according to
some key. Sorting is the physical ordering of a
relation. The result of physical sorting is a sequential
file.

7. Calculate totals and performance measures. Once


Slide 39 the proper subset of data is defined and the rows of
the relation are ordered in the required way, calculate
Make Use of the Database the totals and performance measures.
7. Calculate totals and performance measures.
• done when the proper subset of data is defined and the 8. Present data to the user. This is the final step in the
rows of the relation are ordered in the required way
8. Present data. retrieval of data. Presenting data abstracted from the
• final step in the retrieval of data
database may obtain many forms. The data is
sometimes presented in tabular form, in graphs, and
other times as a single-word answer on a screen.

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.

a) Consider the list of individual 3NF relations below.


These relations were developed from several
separate normalization activities.

PATIENT(Patient_ID, Room_Num,
Admit_Date, _Address)

ROOM(Room_Num, Phone, Daily_Rate)

PATIENT(Patient_Num, Treatment_Desc,
Address)

Designing Databases *Property of STI


Page 13 of 15
Systems Analysis and Design

TREATMENT(Treatment_ID, Description,
Cost)

PHYSICIAN(Physician_ID, Name,
Department)

PHYSICIAN(Physician_ID, Name,
Supervisor_ID)

b) Merge these relations into a consolidated set of 3NF


relations. State whatever assumptions you consider
necessary to resolve any potential problems you
identify in the merging process.

c) Draw an E-R diagram for your answer in problem a.

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.

1) Give the students time to research and discuss with


their group about their proposed system.

2) Ask each group to discuss the description and status


of the current system of their client. For this, it
should consist of four parts.

3) The first part of the documentation should consist of


the background of the company. You may trace the
history of the company and explain the company
profile. They must also describe the current system;
identify the components operations done, and etc.
They must also describe the hardware and software
(if there is any) that the company currently uses, and
the people who work for the company and uses the
current system.

4) Next, each group must create a data flow diagram


(DFD) of the current system. They should describe
all the processes of the current system using DFD.

5) Aside from DFD, each group must also provide a


data dictionary of the current system.

6) Lastly, each group must identify the problem areas of


the current system. These problem areas will be the
scope in developing their proposed system.

7) The font face of the document should be Arial, font


size of 10 and should be A4 size of paper.

8) Ask each group to submit the documentation of their


proposed system on the next session.

Designing Databases *Property of STI


Page 14 of 15
Systems Analysis and Design

REFERENCES:

Valacich, J., George, J. & Hoffer, J. (2012). Essentials of systems:


analysis and design (5th Edition). Upper Saddle River, New Jersey:
Pearson.

Shelly, G. & Harry J. (2012). Systems analysis and design (9th Edition).
Boston: Course Technology Cengage Learning.

Whitten, J. & Bentley, L. (2007). Systems analysis and design methods


(7th Edition). Boston : McGraw-Hill/Irwin.

Yeates, D. & Wakefield, T. (2004). Systems analysis and design (2nd


Edition). Harlow, UK : Financial Times Prentice Hall.

Hoffer, J., George, J.& Valacich, J. (2008). Modern systems analysis and
design (5th Edition.). Upper Saddle River, N.J.: Prentice Hall.

Designing Databases *Property of STI


Page 15 of 15

You might also like