You are on page 1of 24

Programming

Fundamentals & Database


Management
Adriane Brent S. Castro

What is a database?

A database is an organized collection of


data.

The data are typically organized to model


relevant aspects of reality in a way that
supports processes requiring this
information.
For example, modelling the availability of rooms
in hotels in a way that supports finding a hotel
with vacancies.

What is a database?

A database is composed of one or more


tables.

A table is a set of data elements (values) that


is organized using a model of vertical columns
and horizontal rows.

A field is a space given for a particular item of


info or data. In database systems, they are the
small units of information one can access also
called cells in spreadsheets.

What is a DBMS and an RDBMS?

A database management system (DBMS)


is a computer program designed to manage a
database and run operations on the data
requested by numerous users.

A relational database management


system (RDBMS) is a database management
system that is based on the relational model
as introduced by E. F. Codd. Many popular
databases currently in use are based on the
relational database model.

Database normalization

Database normalization is the process of


organizing the fields and tables of a
relational database to minimize redundancy
and dependency.

Normalization usually involves dividing


large tables into smaller (and less
redundant) tables and defining relationships
between them.

Database normalization

The objective is to isolate data so that


additions, deletions, and modifications of a
field can be made in just one table and then
propagated through the rest of the
database using the defined relationships.

Assignment: What are the different normal


forms of a database? Briefly explain each.

What is programming?

Computer programming is the


comprehensive process that leads from an
original formulation of a computing problem to
executable programs.

It involves activities such as analysis,


understanding, and generically solving such
problems resulting in an algorithm, verification
of requirements of the algorithm including its
correctness and its resource consumption.

What is a Flowchart?

A flowchart is a type of diagram that


represents an algorithm or process, showing
the steps as boxes of various kinds, and
their order by connecting them with arrows.

This diagrammatic representation illustrates


a solution to a given problem. Process
operations are represented in these boxes,
and arrows.

What is a Flowchart?

They are implied by the sequencing of


operations. Flowcharts are used in
analyzing, designing, documenting or
managing a process or program in various
fields.

Symbols used in a
Flowchart

Start and End symbols / Terminators Represented as circles, ovals, usually


containing the word "Start" or "End", or
another phrase signalling the start or end of
a process, such as "submit inquiry" or
"receive product".

Symbols used in a
Flowchart

Arrows - Showing "flow of control". An


arrow coming from one symbol and ending
at another symbol represents that control
passes to the symbol the arrow points to.
The line for the arrow can be solid or
dashed. The meaning of the arrow with
dashed line may differ from one flowchart to
another and can be defined in the legend.

Symbols used in a
Flowchart

Generic processing steps - Represented


as rectangles.

Symbols used in a
Flowchart

Input/Output - Represented as a
parallelogram. Examples: Get X from the
user; display X.

Symbols used in a
Flowchart

Conditional or decision - Represented as


a diamond (rhombus) showing where a
decision is necessary, commonly a Yes/No
question or True/False test.

Sample Flowchart

Create a flowchart depicting the flow of a


login module.

START

Sample Flowchart

Create a flowchart depicting the flow of a


login module.

Get username and


password of user

Sample Flowchart

Create a flowchart depicting the flow of a


login module.

tempUser = username entered


by user
tempPass = password entered
by user

Sample Flowchart

Create a flowchart depicting the flow of a


login module.

Query database using


the entered username
as a key

Sample Flowchart

Create a flowchart depicting the flow of a


login module.

Output error:
Username
does not
exist!
NO

Is there an
existing
record with
that
username?

YES (Proceed to next slide)

Sample Flowchart

Create a flowchart depicting the flow of a


login module.

Output error:
Incorrect
password.
NO

Is the
password
entered
same as the
stored
password
queried?

YES (Proceed to next slide)

Sample Flowchart

Create a flowchart depicting the flow of a


login module.

Output: Login
successful

Sample Flowchart

Create a flowchart depicting the flow of a


login module.

END

Activity

Create a flowchart for:


Solving the area of a triangle (a = b * h)
Reserving a hotel room
Withdrawing money from an ATM machine
Ordering from a fast food chain.

You might also like