Vous êtes sur la page 1sur 15

Database

Database system

An effective way of storing data for the future use is


through a database system. A database describes a
collection of data organized in a manner that allows
access, retrieval and use of that data in future.

A database system allows the user to store, retrieve,


update, control and display the data. With the availability
of networking facilities, it is now possible to develop on-
line database systems, which could be accessible
independent of time and locational constraints.
Database system

Figure shows the schematic diagram of a web-based on-line


database system, which can store and instantly transfers the
information between site offices and head office.
Head Office
Web Browser
Post
Documents Inputs/
On Job Site Input

Web Server

Submit

Web Browser
Report
s Database Application

Output Server
Management
Personnel
Result

Retrieve
Simple Database Construction

There are five steps involved in constructing and operating


a simple database system.

Problem definition (purpose of constructing the


database)
User requirements (may require data-modeling)
Database design (e.g. using MS Access)
Implementation
Evaluation and maintenance
Simple Database Construction

A good database should have the following characteristics.

Easy-to-use interface
Allow only authorized users to operate (security feature)
Prevents in-valid data
Provide various data filtering options
Be able to generate output in various forms.
Simple Database Construction

Database management software can be programmed to


accept, store, process, and retrieve data including the
day-to-day construction management information,
change orders, shop drawings, revision drawings,
request for information, etc.

Instead of using a preprinted form, a job site person


would simply enter the data in a form appearing on the
small computers screen.
Simple Database Construction

All such documents would be maintained on the


computer and the users could access to any particular
item depending on their roles and information needs.
The database systems can be categorized into four
types as summarized in Table.

The choice of correct database system depends on the


organizational requirements and its size.
Simple Database Construction
Category Description Common Uses
Centralized DBMSes are designed to operate as centralized systems Widely used for most medium-
running on a central mainframe or mini-computer. All to large-scale databases.
processing activities are performed on the central
computer.
Personal Use DBMSes are designed to operate on the personal computer. Widely used for personal
Any individual user can develop and maintain his or her applications and for
own database. small-business
applications.
Client-Server DBMSes are designed to support the sharing of processed Increasingly used for small- to
activities between a set of clients and a server connected medium-scale databases
with the network. The database is still stored at one supporting work groups
central location, called the server. While much of the and departments.
processing, such as manipulating the retrieved data,
summarize them, and converting to the desired forms,
can be moved to client computers.
Distributed DBMSes distribute the data of the database across various Limited in current use owing
computers, but manage it as a single database. to the complexity of the
database processing.
Classifications of the Database Management Systems (DBMS)
Database Construction Step by
Step
1- Construct a Data Flow Diagram (Fig.) showing how data (entity)
and the processes that change data are connected.

Invoice Shipping note copy


id Create
Customer invoice

Payment 1

Apply Invoice copy


payment to
invoice D2 Accounts Receivable
Payment details

Logical Data Flow Diagram


Database Construction Step by
Step
2- Assign unique names (fields) to each data to avoid
data duplication and to enable easy sorting. This is
called constructing a Data Dictionary.

3- Develop logical Relationships between the fields.


There are three possible types of relationship between
2 items, as shown in the illustration of Fig.
Database Construction Step by
Step
DEPARTMENT

DEPT_EMP SUPPLIER

PROJ_WORK M M
M M M

EMPLOYEE PROJECT M SUPP_


SUPP_MAT
MAT_PROJ

1 1 1
PROJ_MGR M M

EMP_MGT MATERIAL

M M M

MANAGEMENT
MAT_
STRUCTURE

Example of Entity-Relationship (E-R)Model


Database Construction Step by
Step
One-to-one relationships (1:1). There is only one entity in an
entity set which can link to one entity in another entity set. For
example, an employee works as the manager in only one
department, in the other words; there is only one manager in
each department.
One-to-many relationships (1:N). This is the relationship of a
single entity in an entity set linking to many entities in another
entity set. The relationship between the customer and the order
is one-to-many relationship; that is, each customer can order
many orders.
Many-to-many relationships (N:M). There are many entities in an
entity set which can link to many entities in another entity set.
For each order, the customer can order many kinds of product
thus the relationship of the order to the product is 1:N. Moreover,
each product can be ordered from many orders which the
relationship of the product to the order is 1:M. Therefore, the
relationship of this two entity set is many-to-many relationship.
Database Construction Step by
Step
4- Make a Data Structure Diagram to describe the structure of each
relationship. The data structure diagram contains an entity name
of the Entity Relationship (E-R) model as a name of a table. The
attributes of the entity are the items in the box, and then columns
of the table would represent them.

As shown in Fig., the underlined items are used to indicate the


primary key in each table. The attributes that underlined with
dotted lines are called foreign keys. A foreign key is the primary
key of the table on the one side of one-to-many relationship,
which repeated in the table on many sides. Lines connecting to
the related tables show relationships between tables.
Database Construction Step by
Step
Management
MGT_ID MGT_Name MGT_Salary EMP_ID
1 m
Department m
DEPT_Name MGT_ID

Employee m
EMP_ID EMP_Name EMP_Salary DEPT_Name
1

Data Structure Diagram


Database Construction Step by
Step
5- To avoid unnecessary data redundancy and
minimal risk of inconsistent data, apply
Normalization technique. Normalization is a
method to:

Eliminate the redundancy produced by the


repeated fields, such as fields that do not directly
represent the entity, and fields that duplicate in other
fields
Prevent update anomalies from inserting, deleting,
and modifying.
Depict correctly all data items being modeled.
Simplify maintenance and information retrieval.

Vous aimerez peut-être aussi