SS 2_Data Processing (5)
SS 2_Data Processing (5)
Data/record keeping when done manually is often time-consuming, prone to errors, difficult to
add or append new records (or data items) to existing files. As a result, organizations now use the
computer system to store data, making it easy to be retrieved, manipulated and reserved more
quickly.
DATA MODEL:
Definition 1: Data model is the pattern of structuring and organizing a system’s data to enable
the implementation of the patterns or structures in a Database Management System (DBMS
Definition 2: A data model is an abstract model that organizes elements of data and standardizes
how they relate to one another and to properties of the real world entities.
Definition 3: A data model refers to the logical inter-relationships and data flow between
different data element involved in the information world. It also documents the way data s stored
and retrieved. Data model keep representing what data is required and what format is to be used
for different business processes.
Data types
Data items
Data sources
Event sources
Link
1
a) Conceptual data models (conceptual schema)
(a) Conceptual data models: This is also known as conceptual schema. It identifies the highest
level of relationships between different entities. It is useful due to its simplicity. It is often used
for communicating ideas and in strategic data projects. It is mostly developed for a business
audience.
(b) Logical data models: Is the process of representing data architecture and organization in a
graphical way without any regard to the physical implementation or the database management
system. Logical data model represents the following information. Entities, Attributes, Key
groups(prims and foreign keys), Relationships, Normalization etc
(c) Physical data models: This represents the physical means used to store data. Mainly the
CPU, drives, partitions, table spaces etc.
A) Flat model/table model: This is made up of a two dimensional array of data items/elements
where all members of a given column are assumed to be similar values and all members of a row
are assumed to be related to each other. Example: a simple table of value
B) Hierarchical model: This is set up based on a hierarchical structure. It is a tree like structure.
Link pointers are established to enable very fast searches and processing of data items based on
these natural occurring structure. It has one to many relationships.
2
Principal
C) Network mode: This model organizes data using two fundamental constructs, called records
and sets. Records contained fields and sets define one to many relationships between records. Eg.
One owner, many members, one parent having many children.
Parent
D) RELATIONAL MODEL: This model focus on the logical representation of data and it’s
relationship. It is not concerned in the physical storage details of data. It begins with the
definition of required entities. Records are connected using logic and by using that data was
redundantly stored in each table.
3
Activity Code Activity Name
23 Raking
24 Overlay
25 Crack sealing
E) OBJECT- RELATIONAL MODEL: This model is similar to the relational model except that
it uses objects, classes and inheritance to represent the actual data. The model is used when there
is complex data or complex data relationship. It reduces the number of paging and is easy to
navigate. Also less codes are required.
An object relational database can be said to provide a middle ground between relational
databased and object-oriented database(OODBASE)
A table is a database object used to store data about a particular entity in a two dimensional
format. It consists of row and columns which represents records and fields respectively.
4
A record files a complete information about an instance or entity. Afield contains related data
items about one aspect of the table subject.
Step5: Click on the field name cell and type the field name.
Step6: Click on the data type cell, a list of data types appears, select and Click on the data type.
Step7: Click on the description cell and then type a description. Also select an option if
recessing when the property update option appears.
Step8: Save your defined table. This is done by Clicking on the save button after typing on a
table and Click on the button.
Step9: Click on theclose button on the table window when you are done.
5
OR
Step6: Repeat step5 as many times as the number of new field you want.
Step7: Press enter key without entering a field name to end your entities.
Step4: save.
6
TO EDIT DATA TYPS IN DATABASE VIEW
Step5: Save.
7
TO RENAME A TABLE
Step2: Right click on the table you to rename and choose rename from the drop down menu.
TO DELETE A TABBLE
Step2: Right click on the table to delete and choose delete on the drop down menu.
Step3: Click on yes if the system prompts to confirm the delete operation.
FORMS
Definition: Forms are database objects used to enter, edit or display data. They allow uses
control the look of the screen when data is imputed and reports generated. They are based on
tables.
When using a form, you can choose the format, the arrangement and which fields you want to
display.
Step2: Click on the table (or query) you want to base your form.
8
CREATING A FORM USING A FORM WIZARD
Step11: Choose whether to open the form for viewing or modifying the form design.
CREATING QUERIES
A query is a database object used to select and filter data from multiple tables.
9
SELECTING FIELDS TO INCLUDE IN YOUR QUERY FROM A DIFFERENT TABLE:
REPORTS
Reports are database object used to organize or summarize data for printing or viewing online.
They are also used to display and analyze data of large amounts.
Step4: From the fields list, Click and drag the needed fields into the report
Step3: Choose the table/queries that you wish to have in the form.
10
Step6: Choose the style/order for your file.
Step9: Choose whether you want to open the report for viewing or modify it.
DATA TYPES
Definition: Data type is the term used to specify the kind of data that a field stores and it is
usually set in the table design grid.
(1) TEXT: This is an alphanumeric data. It is a data type used to store text characters and
numbers that do not require calculations. Such as phone numbers, part numbers, postal codes,
addresses, etc. It can store up to 255 characters. The field size property controls the maximum
number of characters that can be entered.
(2) DATE/TIME: This is data type used for date and time. It stores 8 bytes.
(3) CURRENCY: This is a data type used to store currency value and to represent rounding off
during calculations. It stores 8 bytes.
(4) HYPERLINKS: This is a data type used to store hyperlinks (website locations and
addresses) A hyperlink can be a UNC part or a URL. It stores up to 64,000 characters.
- Data model helps developers to understand the domain and organize their work accordingly.
- For faster performance, a well - constructed database typically runs faster, often quicker than
expected.
11
- It facilitates interaction and communication between the designers, programmers and end users.
SDMS are data models that are widely applied in industries and shared among competitors to an
extent. They are set defined by standard bodies or database vendors.
They encourage information sharing among organizations and are treated as examples of
database models.
They include:
2. ISO15926: Is a standard for data integration, sharing, exchange and hand over between
computers.
NORMALIZATION
- Normalization is a database design technique which organizes tables in a manner that reduces
redundancy and dependency of data. It divides larger tables to smaller tables and links them
using relationships.
technique which organises tables in a manner that reduces redundancy and dependency of data. It
divides larger table to smaller tables and links them using relationship.
12
REASONS/PURPOSE OF NORMALIZATION
NORMAL FORMS:. Normal form theory deals with how to reduce the amount of redundancy of
data within a given table.
SIGNIFICANCE/IMPORTANCE/USES
- It allows for update, insertion and deletion operations to be performed on DLS table.
FIRST NORMAL FORM(INF): This eliminates data duplication by eliminating redundant data
and the idea of having separate tables for data that are related .
RULE:
13
a) It should only have single (atomic) value attributes/columns.
A SECOND NORMAL FORM (2NF): This is a normal form that eliminates data duplication by
removing subsets of data that apply to multiple rows of a table and then places them in separate
tables.
RULE:
THIRD NORMAL FORM (3NF): This normal form meets the condition of the 1NF and 2NF
and in addition must remove the columns that does not fully depend on the primary key.
RULE:
* It is in the 2NF.
BOYCE AND CODD NORMAL FORM: This is a higher version of the 3NF. This form deals
with certain type of anomaly that is not handled by 3NF.
RULE:
14
* For each functional dependency (x = y) X should be a super key.
RULE:
- It is in the BCNF.
RULE:
* It cannot be decomposed into any number of smaller tables without loss of data.
Normalization is a technique for producing a set of suitable relations that support the data
requirements of an enterprise.
1) The minimal number of attributes necessary to support the data requirements of the enterprise.
2) Attributes with a close logical relationship are found in the same relationship.
3) Minimal redundancy with each attribute represented only once with the important exception
of attributes that form all or part of foreign keys.
Foreign key is a field in a relational table that matches a candidate key of another table.
A foreign key is a column or combination of columns that is used to establish and enforce a link
between the data in two tables.
15
Foreign key references the primary key of another table. It helps connect your tables.
- A foreign key can have a different name from it's primary key.
For example: In a student table in db, student has a link to a student cause table because these is
a logical relationship between student and cause. The student ID column in the student cause
table matches the primary key column of the student table. The student ID column is the primary
key in student table and is the foreign key to the student cause table.
PRIMARY KEY: Is a field in a table which uniquely identifies each row/column in a database
table. Primary key must contain unique values.
A primary key is a nominated column or combination of columns that has a different value for
every row in a table.
- Candidate key are more than one column or combination of columns that serve as primary
keys.
This is s diagram used to show or illustrate the logical structures of database. It is also used to
show data that must be collected, stored and retrieved to promote business activities.
16
USES OF ERD.
- It is used to identify data that must be captured, stored and retrieved in order to support the
business activities performed by an organization.
- It is used to identify the data required to derive and report on the performance, measures that an
organization should be monitoring.
COMPONENTS OF ENTITIES-RELATIONSHIP
(1) Entities
(2) Attributes
(3) Relationship
ENTITY: An entity is a single distinguishable business object such as a person, place, thing,
event or concept, part of a group of similar objects , relevant to an organization about which the
organization is interested in storing and using information. They are objects or concepts within
the data model. Each entity is represented by a box within the ERD.
CARDINALITY
17
Cardinality is fundamental principle that defines the relationship between the entities in terms of
members.
There are three potential types of relationship which can exist between two different entities.
This type of relationship exists when a single occurrence of an entity is related to just one
occurrence of a second entity. E.g. Patient to a Doctor.
This type of relationship exists when a single occurrence of an entity is related to many
occurrences of a second entity. E.g A teacher to many students, Pastor to members.
This type of relationship exists when many occurrences of an entity are related to many
occurrences of a second entity. E.g Doctor and Patience.
RELATIONAL MODELS
Definition: Relational model is a collection of tables to represent both data and the relationships
among those data.
RDBMS Stands for Relational Database Management System. It is the basis for SQL. It is a
DBMS that is based on the relational model as introduced by Prof E.F. Codd in 1970.
18
FEATURES OF RELATIONAL MODEL
3) The intersection of row with the column will have data value.
6) By definition, all rows in a relation are distinct. No two rows can be exactly.
8) For each column of a table there is a set of possible values called it’s domain. The domain
contains all possible values that can appear under that column.
a) Table: This is a collection of related data entities and it consists of columns and rows.
b) Field: Is a column in a table that is designed to maintain specific information about every
record in the table.
c) Record/Row: Record, also called row of data is each individual entry that exists in a table.
d) Column: Is a vertical entity in a table that contains all information associated with a specific
field in a able.
d) Null Value: A null value in a table is a value in a field that appears to be blank. Which means
a field with a null value in a field with no value.
CONSTRAINT
Constraint are rules enforce on data columns in tables of database. They are normally used to
limit the type of data that a table may contain to enhance accuracy and reliability of the data
entered into the table.
19
TYPES OF CONSTRAINT
20