0% found this document useful (1 vote)
847 views29 pages

PPD411 - Unit 1 5 Practical Exe

Uploaded by

Tim Murison
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
847 views29 pages

PPD411 - Unit 1 5 Practical Exe

Uploaded by

Tim Murison
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

Welcome

to
Principles of Program Design
MODULE CODE: PPD411
Presented
By
Isaac L (MSc)
Module Information
 Prescribed Materials
Title: Program Design (Not on SAFARI)
Title: Database Design for Mere Mortals®:
A Hands-on Guide to Relational Database Design, Third Edition.
By Michael J. Hernandez
ISBN: 9780133122282
 Module Duration: 4 weeks
 Important Dates
Hand-out date Submission date Weight

Formative Assessment 1 03/02/2020 07/02/2020 10%


Formative Assessment 2 10/02/2020 14/02/2020 10%

Formative Assessment 3 17/02/2020 20/02/2020 10%

Formative Assessment 4 - - 20%

50%
Total
Date and Time Duration Weight

Exam 27/02/2020 at 9h00 3 hours /Closed book 50%

Date and Time Duration Weight


Supplementary Exam 02/03/2020 at 9h00 3 hours /Closed book 50%
Unit 1 Introduction to Pseudocode
Objective:
 Why use Pseudocode?
 What is Pseudocode ?
 Are there alternatives to Pseudocode?
 What is the basic structure of a Pseudocode?
 What are the Pseudocode Keywords
Why use Pseudocode?

It is used in planning an algorithm with drafting out the structure of the program before the actual coding takes place. 

Pseudocode is easier for people to understand than conventional programming language code
What is Pseudocode ?
Pseudocode is an informal high-level description of a computer program or algorithm. It is written in symbolic code
which must be translated into a programming language before it can be executed.

What is a computer program?


What is an algorithm?
Are there alternatives to Pseudocode?

There are some alternatives to Pseudocode.


Some of them are 
Flowcharts,
drakon-charts and
Unified Modified Language (UML) charts.
They will serve the purpose but they comparatively require more resources.
What is the basic structure of a Pseudocode?

Begin
Input
(Process the input and generate an output)
Output
End
What are the Pseudocode Keywords

START: This is the start of your pseudocode.


INPUT: This is data retrieved from the user through typing or through an input device.
READ / GET: This is input used when reading data from a data file.
PRINT, DISPLAY, SHOW: This will show your output to a screen or the relevant output device.
COMPUTE, CALCULATE, DETERMINE: This is used to calculate the result of an expression.
SET, INIT: To initialize values
INCREMENT, BUMP: To increase the value of a variable
DECREMENT: To reduce the value of a variable
END: The end of the program
Example
1. Write a program that requires you to calculate a Pay of an employee base on a rate and number of hours worked.
2. Write a program that requires you to calculate a sum of two numbers.
Solution

1. 2.

Begin Begin
Input number1, number 2
input hours
Sum= number1+ number 2
input rate
Print Sum
pay = hours * rate
End
print pay
End
End
Next week Monday, 10 Feb 2020
Learning Unit 5 Relational Database Design
Learning Unit 5 Relational Database Design
Objectives:

Different types of Databases


The early Database Models
The Relational Database Model
The Relational Database Management Systems
What is beyond the Relational Model
The future of Relational Database Holds
Types of Databases
What is a database?
A database is an organized collection of data used for the purpose of modeling some type of organization or
organizational process.

There are two types of databases in database management,


 Operational databases and
 Analytical databases.
Operational databases
This type of database is primarily used in situations where there is a need to collect, modify, and maintain data on a
daily basis (online transaction processing (OLTP)) .

The type of data stored in an operational database is dynamic, meaning that it changes constantly and always reflects
up-to-the-minute information.

Organizations such as retail stores, manufacturing companies, hospitals and clinics, and publishing houses use
operational databases because their data is in a constant state of flux.
 Analytical databases
Are primarily used in online analytical processing (OLAP) scenarios, where there is a need to store and track historical
and time-dependent data.
An analytical database is a valuable asset when there is a need to track trends, view statistical data over a long period
of time, and make tactical or strategic business projections.
This type of database stores static data, meaning that the data is never (or very rarely) modified.
 Early Database Models
Two data models were commonly used to maintain and manipulate data—the hierarchical database model and the
network database model.
 The hierarchical Database Model
Data in this type of database is structured hierarchically and is typically diagrammed as an inverted tree. A single table
in the database acts as the “root” of the inverted tree and other tables act as the branches flowing from the root.
In the example shown in Figure 1.1,

An agent books several entertainers, and each entertainer has his own schedule.
An agent also maintains a number of clients whose entertainment needs are met by the agent.
A client books engagements through the agent and makes payments to him for his services.

A relationship in a hierarchical database is represented by the term parent/child.


 The Network Database Model
The network database was, for the most part, developed as an attempt to address some of the problems of the
hierarchical database. The structure of a network database is represented in terms of nodes and set structures.
This is a valuable improvement on the parent/child relationship.
A set structure supports a one-to-many relationship, which means that a record in the owner node can be related to one
or more records in the member node, but a single record in the member node is related to only one record in the owner
node.
The Relational Database Model
The relational database was first conceived in 1969 and is still one of the most widely used database models in
database management today.
A relational database stores data in relations, which the user perceives as tables. Each relation is composed of tuples, or
records, and attributes, or fields.
 Retrieving Data
You retrieve data in a relational database by using Structured Query Language (SQL). SQL is the standard language
used to create, modify, maintain, and query relational databases.
Example
 Advantages of a Relational Database
Built-in multilevel integrity: Data integrity is built into the model at the field level to ensure the accuracy of the data;
at the table level to ensure that records are not duplicated and to detect missing primary key values;
Logical and physical data independence from database applications: Neither changes a user makes to the logical
design of the database, nor changes a database software vendor makes to the physical implementation of the database,
will adversely affect the applications built upon it.
Guaranteed data consistency and accuracy: Data is consistent and accurate due to the various levels of integrity you
can impose within the database.
Easy data retrieval: At the user’s command, data can be retrieved either from a particular table or from any number of
related tables within the database.
Relational Database Management Systems

A relational database management system (RDBMS) is a software application program you use to create, maintain,
modify, and manipulate a relational database.
Analysis of database requirements for the local soccer league revealed the business rules as contained in the scenario below. Based on
these business rules create an ERD that display the cardinality between each entity: Be sure to remove unwanted many to many
relationships
 
The Manonyane Football Club (MFC) is an amateur soccer association playing in the premiere soccer league. Each city in the country has a
number of teams represented. A city has several locations where a number of games can be played. Each location belongs to one city. Each
team has a maximum of 18 players and a minimum of 10 players. Each team also has up to three coaches (offensive, defensive, and physical
training coaches). During the season, each team plays two games (home and visitor) against each of the other teams. Statistics such as no. of
fouls, in which a player features in a particular game are recorded.
A game involves many players and a player can play in many games. A team can be expected to play in many games and a game involves
more than one team.
 
Given those conditions, do the following; draw an ERDs to represent the MFC database. Assume that all relationships are strong or regular.
 

You might also like