Year 11 DPR Note
Year 11 DPR Note
WEEKS TOPICS
5 Mid-Term Examination
6 Data Modelling
7 Mid-Term Break
8 Entity-Relationship Model
9 Relational Model I
10 Relational Model II
11 normalization
12 Revision
13 Examination
14 Collation of Results
INTRODUCTION TO DATABASE MANAGEMENT
DATABASE MANAGEMENT - Database management involves the process of creating,
monitoring, administration, and maintenance of the database and database groups in an
organization.
What is a Database? A database is a collection of information that is organized so that it can easily
be accessed, managed, and updated.
DATABASE MANAGEMENT SYSTEM(DBMS) is a set of programs that enables you to store,
modify, and extract information from a database. it also provides users with tools to add, delete,
access, modify and analyze data stored in one location.
EXAMPLES OF DBMS
1. MySQL
2. Microsoft Access
3. SQL Server
4. Oracle
5. RDBMS
6. dBase
7. FoxPro
BASIC TERMS IN DATABASE MANAGEMENT SYSTEM
CHARACTER- A character is the most basic element of data that can be observed and
manipulated. E.g. digit, letter, other special character (e.g., #, £ and?)
FIELD- A field contains an item of data; that is, a character, or group of characters that are related.
E.g. Name, Address, city etc.
RECORD- A record is composed of a group of related fields.
DATABASE FILE- A database file is defined as a collection of related records. A database file is
sometimes called a table.
KEY- in order to track and analyze data effectively, each record requires a unique identifier or what
is called a key.
COMPONENTS OR OBJECTS OF DATABASE
- Queries
- Report
- Forms
- Tables
- Macros
- Modules
QUERIES- A query is an access object that enables you to view data from one or more tables in a
specified order.
TYPES OF QUERIES
There are three main types of queries:
1. Select
2. Action (Delete, Append, Update and Make-table)
3. Cross tab
The most common type is a SELECT QUERY
SELECT QUERY- it is used to retrieve data from a table or multiple table
REPORT
A report consists of information that is pulled from tables. A report is a read-only view of the
inputted data.
FORM
A form is generally used to add/update/delete records. Forms are created to enable user interaction
with the database
TABLE
A table can be defined as an organized collection of related records
DATATYPES
- Memo
- Text
- Date & Time
- Currency
- Number
USE OF MS ACCESS AND SPREADSHEET FOR DATABASE
Microsoft Access is a database software package. A database is an organized collection of records.
Telephone and address books are examples of paper databases. With Access, you can create a
computerized database.
- Access can be used to organize and keep a record of personal finances, information
about students or staff
- It can also be used to make a music library where you can store a large number of songs
- Access is a computer program that is used to store, manage, view and publish
information or data.
Spreadsheet is used for creating results of calculation based on figures that are put into the
spreadsheet. Spreadsheet is used when you want to do the following:
- You want to crunch numbers and perform automatic calculation
- You want to track a simple list of data
LOADING MS ACCESS 2007
- Click on the start button
- Point to all program
- Point or click on Office Suite
- Select MS Access 2007
EXIT MS ACCESS 2007
- Click on the quick Access toolbar
- Select Exit Access
USING TABLE WIZARD
MS Access table wizard provides an easy way to create tables. It provides various table templates to
create business and personnel tables.
The following procedure is used to create a table using table wizard.
- Open Database window
- Click table (New Table) in the object bar
- Double-click create a table by using wizard. The table wizard will start.
Note: Table wizard has been removed in Access 2007. It has been replaced with five table
templates. (contacts, tasks, issue, events, assets).
DATA PROCESSING METHOD
METHODS OF DATA PROCESSING- The three (3) basic methods of data processing
are:
- Manual Method
- Mechanical Method
- Electronic Method
MANUAL METHOD: This involves the use of pens, pencils, worksheet, journals and files
by one or more persons in processing data. It is very cheap to implement but it is
cumbersome, tiresome, boring, frustrating and time consuming. The result is also affected
by human errors.
Advantages of manual method
1. Easy to get the instrument to use
2. It is very cheap to implement
Disadvantages of manual method
1. It is cumbersome
2. It is time consuming
3. The result can be affected by human errors
MECHANICAL METHOD: This is when machine such as typewriter accounting
machines and calculator are used for processing data. Data cannot be processed
continuously without human assistance. It is also difficult to produce large quantities of
information on regular and timely basis. It involves operation that are noisy, paper
consuming and subject to human errors.
Advantages of mechanical method
1. It is faster than manual processing of data
2. It is more accurate than manual method
Disadvantages of mechanical method
1. It is difficult to produce large quantities of information on regular and timely basis
2. It is subject to human errors
ELECTRONIC/AUTOMATIC METHOD: This is when data processing is carried out
using electronic digital system. The principal digital machine used for data processing is
computer. Electronic data processing is the use of electronic aids (computer) to process data.
Its operation does not involve noise and it has a memory for storage. With the aid of
computer, accurate, reliable and significant amount of information can be obtained at high
speed.
Advantages of electronic method
1. Its operation does not involve noise
2. It has a memory for storage of data
3. It is accurate and reliable
Disadvantages of electronic method
1. It is expensive
2. It might lead to error if the system is not properly handled or maintained
Factors that determine the method of data processing
1. Size of data to be processed
2. Type of business
3. Time at which information is required
4. Link between application
5. Cost of method
6. Accuracy of method
DATA PROCESSING TECHNIQUES
Batch Processing is the execution of a series of jobs in a program on a computer without manual
intervention (non-intervention). Batch processing dates to the late 19th century, in the processing of
data stored on desks of punch card by unit record equipment, specifically the tabulating machine by
Herman Hollerith, used for 1890 United States census.
In data transmission, Batch processing is used for very large files or where a fast response
time is not critical. The files to be transmitted are gathered over a period and then sent together as a
batch.
Advantages of Batch Processing
1. Repeated jobs are done fast in batch systems without user interaction
2. Batch system can work offline so it makes less stress on processor
3. The batch system can manage large, repeated work easily
Disadvantages of batch processing
1. It is difficult to debug batch system
2. Batch systems are sometime costly
3. If some job takes too much time i.e. if error occurs in job then other jobs will wait for
unknown time
Online Processing: is the term used to describe when a user is connected to a computer or network
(they are logged in) and process the data files at the same time as using the input, output and
storage devices. This method at time known as direct or random-access processing. Under this
method the job received by the system is processed at same time of receiving. This can be
considered and often mixed with real-time processing. This system features: random and rapid
input of transaction and user defied/demanded direct access to databases/content when needed.
Advantages of Online Processing
1. Easy to use to do shopping online
2. The systems have quick response time
3. Usage of credit cards is also handled by these systems
4. Online banks nowadays use online processing systems for money transaction
Disadvantages of Online Processing
1. There occur millions of requests to banks at a time which is difficult to handle
2. Online processing involves lot of staff to maintain inventory
3. Some issue also get involves during creation of new accounts by visitors
Multi-Processing: is the capability of a computer to multitask, or execute more than one program
or process at the same time. Examples include processing data and instructions in computer,
laptops, mobile phone etc. Multiprocessing makes use of CPUs (more than one CPU). The task or
sets of operations are divided between CPUs available simultaneously thus increasing efficiency
and throughput.
Advantages of Multiprocessing
1. Increase throughput
2. Economy of scale
3. Increased reliability
Disadvantages of Multiprocessing
1. If one processor faults then it will affect the speed of other
2. Multiprocessor system are expensive
3. Complex OS is required
4. Large main memory required
Real-Time Processing: As the name suggests thus method is used for carrying out real-time
processing. This is required where the results are displayed immediately or in lowest time possible.
The data fed to the software is used almost instantaneously for processing purpose. The nature of
processing of this type of data processing requires use of internet connection and data is stored/used
online. This method is costly than batch processing as the hardware and software capabilities are
better. Example includes banking system, tickets booking for flights, trains, movie tickets, rental
agencies etc.
Advantages of Real-Time Processing
1. Real time processing provides immediate responses to user inquiries
2. Real time processing is particularly important for applications where a high frequency to
changes must be made to a file during a short time to keep it updated
3. Only the specific records affected by transactions or inquiries need to be processed and
several database can be processed or update concurrently
Disadvantages of Real-Time Processing
1. Organization with critical OLAP application have to pay a high-cost premium for the
security of fault tolerant for document
2. Because of the online, direct access nature of real time processing networks, special
precaution must be taken to protect the content of database
Time Sharing Processing: Time based used of CPU is the core of this data processing type. The
single CPU is used by multiple users. All Users share same CPU but the time allocated to all users
might differ. The processing takes place at different intervals for different users as per allocated
time. Since multiple user can use this type it is also referred as multi access system.
Advantages of Time Sharing
1. High CPU efficiency
2. Each user gets CPU time
Disadvantages of Time Sharing
1. Complex OS (operating system) require
TYPES OF DATA MODELS
Data Modeling is a conceptual representation of data structures (tables) required for a database and
is very powerful in expressing and communicating the business requirements. This is the process of
structuring and organizing data.
CONCEPT OF DATA MODELING
The concept of data modelling can be better understood if it is used to compare the
development cycle of a data model to the construction of a house. For example company ABC is
planning to build a guest house (database) and it calls the building architect (data modeler) and
projects its building requirement (business requirement). Building architect (data Modeler)
develops the plan (data model) and gives it to company ABC. Finally, Company ABC calls civil
engineers (DBA) to construct the guest house (database). Data model represent a real world
situation about which data is to be collected and stored in a database. The term data model actually
refers to two very different things: a description of data structure and the way data are organized
(data organization)
Approaches in data modeling
Approaches or levels to data modeling are:
1. Conceptual data modeling
2. Logical data modeling
3. Physical data modeling
Conceptual data modeling
This is the first stage of database design it identifies the highest-level of relationships
between the different entities. In this approach the following steps are taken:
- Specify the important entities and the relationship among them
- No attribute is specified
- No primary key is specified
Logical model
This is the second stage of database design. Here data is detailed described without regard to
the physical implementation into database. Following steps are taken:
- Specify primary keys for all entities
- Find the relationships between different entities
- Find all attributes for each entity
- Resolve many-to-many relationships
Physical data model
This is the transformation of the logical database into the actual database. Physical data
model represents how the model will be built in the database. A physical database model shows all
table structures, including column name, column data types, column constraints, primary keys,
foreign physical data model design are follows:
- Convert entities into tables
- Convert relationships into foreign keys
- Convert attribute into columns
- Modify the physical data model based on physical constraints requirements