Catholic University College of Ghana Fiapre
Download
Report
Transcript Catholic University College of Ghana Fiapre
Catholic University College of Ghana
Fiapre-Sunyani
DATABASE
SOFTWARE DEVELOPMENT
INFORMATION TECHNOLOGY II
Audrey Asante, Faculty of ICST
DATABASE
• Database is an organized collection of
integrated files.
• Database may be shared or distributed.
• Shared database is shared by users in one
company or organization in one location.
Shared databases can be found in local area
networks.
• Distributed database is one that is stored on
different computers in different locations
connected by a client/server network. An
example is the bank
• Who is a database administrator?
• A person who coordinates all related activities
and needs for a corporation’s database.
• What is the responsibility of a database
administrator?
– System Security
– Backup and recovery
– Performance monitoring
– Database design, implementation and operation
– Coordination with users
Database Storage Hierarchy
• It consists of the levels of data stored in a
computer file: bits, bytes (characters), fields,
records, files and databases.
• Field is a unit of data consisting of one or
more characters. Example is Name, Address,
Social Security No
• Record is a collection of related fields.
Example is the person’s name or address or
social security no
• File is a collection of related records. Example
is data collected on everyone.
• Database is an organized collection of
integrated files. Example is a database of a
company
Key Field
• It is a field that is chosen to uniquely identify a
record so that it can be easily retrieved and
processed.
File Management System
• File-based system: a collection of application
programs that perform services for the endusers such as the production of reports. Each
program defines and manages its own data.
File Management System
• Disadvantages
– Data redundancy or duplication
– Lack of data integrity
– Separation and isolation of data
– Incompatible file formats
– Data dependence
Database Management System
• A software system that enables users to
define, create, maintain, and control access to
the database.
Database Management System
• Advantages
– Control of data redundancy
– Data consistency
– Improved security
– Enforcement of standards
– Improved data accessibility and responsiveness
Database Management System
• Disadvantages
– Cost
– Security
– Privacy
– Additional hardware cost
– Complexity
TYPES OF DATABASE ORGANIZATION
•
•
•
•
Hierarchical
Network
Relational
Object Oriented
Hierarchical Database
• In this type of database, fields or records are
arranged in related groups resembling a family
tree, with lower-level records subordinate to
higher-level records. A lower-level record is called a
child, and a higher-level record is called a parent.
The parent record at the top of the database is
called the root record. A parent in a hierarchical
database may have more than one child, but a child
always has only one parent. This is called a one-tomany relationship. Used principally on mainframes
Network Database
• A network database is similar to a hierarchical
DBMS. The difference is that each child record in
the network database can have more than one
parent record. In the network database, a child
record is identified as a member whiles a parent is
referred to as owner. This is also principally used
with mainframes. The network database is more
flexible than hierarchical because different
relationships may be established between different
branches of data.
Relational Database
• Relational database relates or connects data in
different files through the use of a key field, or
common data element. Data elements are
stored in different tables made up of rows and
columns. All related fields must have a key
field that uniquely identifies each row. It is
more flexible than hierarchical and network
database models.
Object Oriented Database
• This type of database handles new data types,
including graphics, audio, and video which can
be combined with text into a multimedia
format. An object oriented database system
uses “objects” software written in small,
reusable chunks, as elements within database
files. An object consists of data in the form of
text, sound, video and pictures and
instructions on the action to be taken on the
data.
Features of DBMS
• Data Dictionary: a procedures document or
disk file that stores definitions or a description
of the structure of data used in the database.
It may monitor the data being entered to
make sure it conforms to the rules defined
during data definition such as field name, field
size, type of data.
Features of DBMS
• Query Language: is an easy-to-use computer
language for making queries to a database
and for retrieving selected records.
• Utilities: programs that allow one to maintain
the database by creating, editing, and deleting
data, records and files.
• Report Generator: a program users may
employ to produce an on-screen pr printed
document from all or part of a database.
Features of DBMS
• Access Security: a feature allowing database
administrators to specify different access
privileges for different users of a DBMS
• System Recovery: a feature that enables
database administrators to recover contents
of the database in the event of a hardware or
software failure.
Software development
• Algorithms are a set of ordered steps for
solving a problem.
• A program is a list of instructions that the
computer must follow in order to process data
into information.
• Application software may be packaged or
customized.
• Packaged software is the kind that one buys from a
computer store or mail-order house or download
from a vendor’s website, which is the kind used by
most PC users
• Packaged software is an off-the-shelf prewritten
program developed for sale to the general public.
• Share and freeware
Customized software
• It is a software designed for a particular
customer. It is an application program that is
created or custom-made. Customized
software is written to perform a task that
cannot be done with packaged software.
Programming
• It is a specialized form of the age old process
of problem solving. Problem solving typically
involves four steps:
– Understanding the problem: defining the problem
clearly
– Devising a plan for solving the problem: what
resources are available? people? information? a
computer? Software? Data? How might those
resources be put to work to solve the problem?
– Carrying out the plan: this phase often overlaps
with the previous step, since many problem
solving schemes are developed on the fly
Programming process
• There are four step process
– Defining the problem
– Devising, refining, and testing the algorithm
– Writing the program
– Testing and debugging the program
Most programming problems are far too complex to
solve all at once. To turn a problem into a
program, a programmer typically creates a list of
smaller problems.
• Each of these smaller problems can be broken
into subproblems that can be subdivided in
the same way. This process, called stepwise
refinement, is similar to the process of
developing an outline before writing a paper
or a book. Programmers sometimes refer to
this type of design as top-down design
because the design process starts at the top,
with the main ideas, and works down to the
details
• The result of stepwise refinement is an
algorithm-a set of step-by-step instructions
that, when completed, solves the original
problem. Programmers typically write
algorithms in a form called pseudocode (a
cross between a computer language and plain
english). When the details of an algorithm are
in place, a programmer can translate it from
pseudocode into a computer language.
Control structures
• A computer can’t understand this algorithm,
but the pseudocode is clear to any person
familiar with control structures (logical
structures that control the order in which
instructions are carried out).
• This algorithm uses three basic control
structures: sequence, selection, and repetition
• Sequence control structure is a group of
instructions followed in order from the first
through the last. Eg.
– Set answer to a random value between 1 and 100
display “guess a number between 1 and 100”
– Set counter to 0
• Repetition control structure is a looping
mechanism. It allows a group of steps to be
repeated several times, usually until some
condition is satisfied.
• A selection (or decision) is used to make
logical decisions. That is to choose between
alternative courses of action depending on
certain conditions. It typically takes the form
of “if(some condition is true), then(do
something) else (do something else)
Testing the algorithm
• Testing the algorithm is the next step but not
the same as testing the program. This is
testing designed to check the logic of the
algorithm. We can test it by following the
instructions using different sets of numbers.
Programming languages and
methodologies
• Low level languages
– Machine language
– Assembly language: a language that’s functionally
equivalent to machine language but is easier for
people to read, write, and understand.
Programmers use alphabetic codes that
correspond to the machine’s numeric instructions.
• High level languages: it falls between natural
human languages and precise machine
languages
• High level programs hides most of the nitty
gritty details of the machine operations from
the programmer.
• High level language allows the programmer to
focus on what to do, while assembly language
forces the programmer to focus on how to do
it.
• It allows transportation from one machine to
the other
• They need to be partially rewritten to adjust
to differences among hardware, compilers,
operating systems, and user interfaces
• Structured programming: a technique to make
the programming process easier and more
productive. It breaks the big, complicated
machine into more manageable modules,
each of which has a clearly defined task.
Modular programs are easier to understand
and debug
• A programmer combines the modules using
sequence, repetition and selection (basic
control structures)
• Object oriented programming: it is a collection
of objects. Objects contain both data and
instructions and can send and receive
messages. OOP makes it easy to use features
from one program in other programs, so
programmers don’t have to start from scratch
with every new program.
Visual programming
• It enables programmers to create large
portions of their programs by drawing pictures
and pointing to on-screen objects, eliminating
much of the tedious coding of traditional
programming. It saves hours of coding time,
especially when creating user interfaces
Languages for users
• Some computer languages are designed with
nonprogrammers in mind
– Macro languages (scripting languages) are built
into many applications, utilities and operating
systems eg. Macro in access, spreadsheet to build
a program, vba in office
– Fourth generation languages
Fourth Generation Languages
• 4GLs use English-like phrases and sentences to
issue instructions
• They are nonprocedural, not like pascal, c and
basic which are procedural languages.
• Non procedural languages enable users to
focus on what needs to be done, not on how
to do it.
• It also increases productivity because
programmers can often get results by typing a
few lines of code rather than a few pages.
Programming for the web
PROGRAMMING
• It is also called software engineering. It is a
multistep process for creating that list of
instructions.
• There are five steps:
– Clarify the problem
– Design a solution
– Code the program
– Test the program
– Document and maintain the program
Clarify the programming needs
•
•
•
•
•
•
Clarify objectives and users
Clarify desired outputs
Clarify desired inputs
Clarify desired processing
Feasibility of implementing the program
Document the analysis
Feasibility
• Technical feasibility: can the required
hardware and software be purchased or
developed? Is the technology reliable? Does
the system provide for accurate, reliable and
secure data?
• Economic feasibility: cost, good investment
• Operational feasibility: needs of the
organization, changes in the work procedure,
system be developed on a timely schedule
• Organizational: support goals and strategy,
Data collection techniques
•
•
•
•
•
Document review
Interview
Questionnaire
Observation
sampling
Modeling tools
• Graphic representation of a system
– System flowchart
– Data flow diagram
– Data dictionaries
– Decision tables
Design the program
• User interface design
• Database design
• Process design
3. Code the program
• A programming language is a set of rules that
tells the computer what operations to do.
4. Test the program
• Desk checking is simply reading through or
checking the program to make sure that its
free of errors and that the logic works
• Debug the program means to detect, locate
and remove al errors in a computer program.
The debugging step is sometimes called alpha
testing
• Run real-world data: it is sometimes alled beta
testing
DOCUMENT AND MAINTAIN THE
PROGRAM
• Prepare user documentaton