Database IMPLEMENTATION TOOLS
Database IMPLEMENTATION TOOLS
DATABASE DESIGN
DATABASE IMPLEMENTATION TOOLS
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
2
DATABASE IMPLEMENTATION TOOLS
1. Information System and Organisation
For any organisation, information provides the key to success. In the present day world, information
technology and management of information resources is very important for the success of an
organisation. It is said that an organisation today cannot last for more than 48-72 hours if its information
resources have failed. The basis of information in any organisation is the data. The information and the
data have the following properties:
• Information is one of the most important corporate resources. Data should be properly controlled and
managed for the effective working of the organisation.
• The need of up-to-date data is ever increasing as more and more functions of organisations are being
made electronic.
• The complexity of applications is increasing, as complex relationships among the data are needed to
be modelled and maintained.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
5 CONTINUATION…
INFORMATION SYSTEM AND ORGANISATION
• The long lasting data may be cleaned, consolidated and archived for future decision
making.
• Information is very useful for future planning. It provides the major input for supply
chain management, enterprise resource planning, financial control and many other
managerial functions of an organisation.
• For the day-to-day financial, retail good transactions, a publicly accessible and updatable
operational database must be designed and made available for the transactions.
• Electronic selling and purchasing is cutting the cost of business transactions.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
6 CONTINUATION…
INFORMATION SYSTEM AND ORGANISATION
Information, which is generated from data, is a very important aspect for survival of an organisation.
But, why is the Database Management System important for generating information for an
organisation? The following are the major characteristics of database management that make it very
valuable for an organisation.
• Data Independence: DBMS protects data base application programs from the changes in the logical database
design and the physical database structure including access paths and storage structures.
• Controlled Data Sharing: DBMS allows the same data to be used for multiple applications with each
application having its own view of the data. This data of views can also be suitably protected.
• Simple Operation and Query Mechanism: SQL provides a very simple style query language across the
DBMS. Easy data handling, support for transactions, and security are the other major features of a DBMS.
DBMS also has the extended feature of knowledge generation. Thus, DBMS are major tools for an organisation.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
7 CONTINUATION…
INFORMATION SYSTEM AND ORGANISATION
Thus, the database is typically a part of the information system. But, what are the activities required in
an information system?
a. Collection of data.
b. Management of data using DBMS software.
c. Use of the hardware and storage Media.
d. Dissemination of the information Resources to the persons who use and manage the data.
(Also known as DBA).
e. The Application software that accesses and updates the data, and the application
programmers.
We can easily conclude that the Database system is part of a much larger organisational information
system.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
8 CONTINUATION…
INFORMATION SYSTEM AND ORGANISATION
9 CONTINUATION…
INFORMATION SYSTEM AND ORGANISATION
Project
Estimating Analysis Coding Management,
Information
Delivery,
Support &
Feedback
Requirements Test
Scheduling Design
Gathering 1. Acceptance
testing
2. Validation
testing
Tracking
10 CONTINUATION…
INFORMATION SYSTEM AND ORGANISATION
11 CONTINUATION…
INFORMATION SYSTEM AND ORGANISATION
12 CONTINUATION…
INFORMATION SYSTEM AND ORGANISATION
13 CONTINUATION…
INFORMATION SYSTEM AND ORGANISATION
14 CONTINUATION…
INFORMATION SYSTEM AND ORGANISATION
Thus, information system development is a major system development life cycle. However, in this
unit we will focus our attention mainly on database application system development.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
15
The database application design activity in an organisation is very important. This activity
determines the overall quality of the information system.
The database application design involves database design and application system design.
The Figure 2 shows the steps of these processes and the linkages for database application
design and implementation.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
17 CONTINUATION…
DATABASE DESIGN AND IMPLEMENTATION
Database Design Application System Design
18 CONTINUATION…
DATABASE DESIGN AND IMPLEMENTATION
NOTE: Before we discuss the further activities, it is necessary to know that this part of the database application design and implementation is
part of the information system life cycle.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
19 CONTINUATION…
DATABASE DESIGN AND IMPLEMENTATION
2. Design of Conceptual Database Application: It involves design of the complete conceptual schema of
the database and the transaction and Data processing. We will discuss it in more detail in the next sub-
section.
3. Logical and Physical Database Design: This involves creation of views, creation of storage structure,
indexes etc. This is also discussed in more detail later.
4. Database Implementation: This is the process by which we implement the following:
• Conceptual Database
• External Database
• Internal Database
• The mappings among these designs
• Creating empty database files
• Implementing the software applications
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
20 CONTINUATION…
DATABASE DESIGN AND IMPLEMENTATION
5. Application Conversion: Any software application from a previous system is converted to the
new system. The data is populated either by loading the data directly or by converting existing
files into the database system format.
6. Testing and Validations: The new system, which is made needs to be tested and validated for
good results. Testing and validation is done for this particular purpose.
7. Operations: During this phase, the old as well as the new systems are operated in parallel.
8. Monitoring and Maintenance: Change is an unchanging phenomenon. Similarly, modifications
and reorganisation are unavoidable and may be needed from time to time. During this phase, the
system is constantly monitored and maintained.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
21 CONTINUATION…
DATABASE DESIGN AND IMPLEMENTATION
Let us now discuss the two major stages as above, Conceptual Database Application Design and
Logical and Physical Design in more detail. Performance tuning is a specialised area and DBMS
specific so this topic has not been discussed in this unit.
22 CONTINUATION…
DATABASE DESIGN AND IMPLEMENTATION
23 CONTINUATION…
DATABASE DESIGN AND IMPLEMENTATION
We have already discussed how an ER diagram is converted into. Let us discuss the two common
approaches for conceptual schema design:
a. Single Schema Design
b. View Integration
i. Single Schema Design: This process results in the development of single schema. This process
is explained with the help of an example:
Consider the following EER diagram of a University:
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
24 CONTINUATION…
DATABASE DESIGN AND IMPLEMENTATION
25 CONTINUATION…
DATABASE DESIGN AND IMPLEMENTATION
Please note that the design above is not complete; a complete design would require all types defined
and constraints identified. All such information is made available by the detailed analysis document.
ii. View Integration: A commercial database may be very complex. It may be a good idea to
model this database as per the viewpoints of various stakeholders, thus creating many views. A
conceptual schema may be an integration of all such views. Such integration may have the
following steps:
• Find out the common entities and relationships of interest.
• Find out if any conflicting requirements exist, such as name, type, constraints etc.
• Modify and manage the views.
• Refine the final model, if necessary.
We do not attempt a detailed discussion of this topic here, since it is beyond the scope of this unit.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
26 CONTINUATION…
DATABASE DESIGN AND IMPLEMENTATION
Transaction Design
Transaction design specifies the functional requirements of a database system. The three types of
transactions that may need to be designed are:
I. Retrieval Transaction: These transactions will not update data in a database but help to access some
information, for example, finding the status of a booking in a Railway reservation database. Such
transactions can be executed concurrently without any problems.
II. Updating Transactions: Such transaction modifies some data value and requires careful concurrency
control. For example, booking a ticket in a railway reservation system would update a lot of data items.
III. Mixed Transactions: A third type of transaction may have both these characteristics, that is, it reads
some data and also updates some data. These are called mixed transactions.
NOTE: The dataflow models created during the modelling phase help in identifying the transactions/ procedure etc. on a
database.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
27 CONTINUATION…
DATABASE DESIGN AND IMPLEMENTATION
28 CONTINUATION…
DATABASE DESIGN AND IMPLEMENTATION
2. Non-Technical: These include factors like cost and status of the organisation, which is supplying
the product. The following cost factors may be considered while choosing DBMS:
• Software Acquisition Cost: It not only includes the cost of software, but also any utility cost,
development tool cost or any other cost that the selling organisation may charge.
• Additional Hardware Acquisition Cost: If the DBMS requires additional memory, disk controllers, etc.
then it must be included in the overall cost calculation.
• Maintenance Cost: The cost for maintaining and keeping the database perfect.
• Operating Cost: The cost related to continuous operation of the DBMS. It includes hiring cost of
personnel employed only for DBMS such as DBA. It may also include the training cost.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
29 CONTINUATION…
DATABASE DESIGN AND IMPLEMENTATION
30 CONTINUATION…
DATABASE DESIGN AND IMPLEMENTATION
31 CONTINUATION…
DATABASE DESIGN AND IMPLEMENTATION
Let us discuss the criteria on which the choice of physical database design lie:
1. Response Time: The elapsed time between the start of a database transaction to receive a
response on it.
Please note that response time is also a factor of non-DBMS controlled issues like:
• Access Time of the database
• Present user Load
• Scheduling operation of operating system
• Communication Delays on a client-server system etc.
2. Space Utilisation: This is the amount of storage space used by the database files including index.
It also includes the storage of the physical database on the disk.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
32 CONTINUATION…
DATABASE DESIGN AND IMPLEMENTATION
3. Transaction Throughput: The average number of transactions that are processed per minute. It
is measured under peak conditions on the system. This is very important in applications like
Railway reservations or banking.
The outcome of the physical database design phase is an initial determination of storage structures
and access paths for the database files. These structures do change in the lifetime of a database.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
33
First of all, before defining UML, we should first ask the question why UML? When there are so
many database implementation tools/ languages available why has UML become so popular?
Let us consider this issue in detail.
Databases are an integral part of any information system and there exists many database
implementation tools. Thus, the industry is in need of a standard approach that spawns all the phases
of SDLC, requirement analysis, modelling, design, implementation and deployment. Also, the
industry is looking for techniques to automate the production of software having an improved quality
and reduced cost and time.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
35 CONTINUATION…
UML DIAGRAMS: AN AID TO DATABASE DESIGN SPECIFICATIONS
Since UML is accepted by the Object Management Group (OMG) as the standard for modelling object-oriented
programs it becomes one of the automatic choices. Now the next question is why only UML? UML has quickly
become one of the popularly used tools for modelling business and software application needs. The UML became
popular due to the following reasons:
1. It is very flexible. It allows for many different types of modelling. Some of them include:
• Business Process modelling event workflow,
• Sequencing of events,
2. It is language and platform - independent. It allows software architects to model any application, on any
operating system in any programme language or network.
3. UML supports object-oriented methodologies. Please note however, that even if the concepts are based on
object-oriented methods, the resulting structure and behaviour of UML can be used to design both relational
and object-oriented models.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
36 CONTINUATION…
UML DIAGRAMS: AN AID TO DATABASE DESIGN SPECIFICATIONS
4. The integration of various SDLC stages through UML tools has brought the analysts, modeler,
designers, and the software application developers closer to each other.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
37 CONTINUATION…
UML DIAGRAMS: AN AID TO DATABASE DESIGN SPECIFICATIONS
38 CONTINUATION…
UML DIAGRAMS: AN AID TO DATABASE DESIGN SPECIFICATIONS
Structural/Static Diagrams: These diagrams are used to model the structural or static relationship
among various objects or their components.
Class Object Component Deployment
• Backbone of • Subset of class • describes the • Depicts the
almost every diagrams, organisation of physical resources
object-oriented sometimes treated physical software in a system.
method, including as separate components • Includes nodes,
UML. techniques. including source components and
• Describes the • Organises code, run time connection.
static class elements of a code and
structure of a system into related executables.
system viz., groups to Figure 6:
classes, interfaces, minimise The structural/static
dependencies etc. dependencies. diagram
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
39 CONTINUATION…
UML DIAGRAMS: AN AID TO DATABASE DESIGN SPECIFICATIONS
40 CONTINUATION…
UML DIAGRAMS: AN AID TO DATABASE DESIGN SPECIFICATIONS
41 CONTINUATION…
UML DIAGRAMS: AN AID TO DATABASE DESIGN SPECIFICATIONS
Use of UML Diagrams: During the construction of an application system design we use all the major
UML diagrams. But how are these diagrams useful for the database design.
Let us first discuss the behavioural/dynamic diagrams of UML. The use Case Diagrams are used to
gather information during the requirement analysis phase. Likewise the sequence diagram is used to
visualise the execution of the use cases, while the collaboration diagram defines the sequence of
messages. The state Chart Diagram and activity diagram are used to graphically represent some of the
states and activities of a system.
Thus, these diagrams are very useful for providing the behavioural or functional information about
databases. Thus, they may be useful for transaction and processing design. For example, a use case
diagram of a student of an on-line University may be:
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
42 CONTINUATION…
UML DIAGRAMS: AN AID TO DATABASE DESIGN SPECIFICATIONS
This use case diagram is indicating that the student and staff may have
to login first, thus, the implementation of such a system would require
a table for user-name and password and for taking admission a student
may need to have a valid user name and password. It also indicates
that the process of admission will be certified by a staff member, who
will allow the student to take admission after due checking. Thus,
Figure 8: A simple UML behavioural diagrams may be useful to define
use case diagram for a university processing/transactions. They also provide some information about
entities and attributes. However, the UML diagram is closely
associated with database structure design in the class diagram. Let us
discuss these diagrams in more detail in respect of database design and
implementation.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
43 CONTINUATION…
UML DIAGRAMS: AN AID TO DATABASE DESIGN SPECIFICATIONS
44 CONTINUATION…
UML DIAGRAMS: AN AID TO DATABASE DESIGN SPECIFICATIONS
45 CONTINUATION…
UML DIAGRAMS: AN AID TO DATABASE DESIGN SPECIFICATIONS
Let us explain the role of class diagrams with generalisation/specialisation hierarchy in a database
structure design with the help of an example. Consider the following UML class diagram for a
University.
46 CONTINUATION…
UML DIAGRAMS: AN AID TO DATABASE DESIGN SPECIFICATIONS
47 CONTINUATION…
UML DIAGRAMS: AN AID TO DATABASE DESIGN SPECIFICATIONS
You can also identify several functions/data processing functions/ triggers relating to
functions of classes. For example, feecalculation( ) may need to be implemented as a stored
procedure while calculating the fee of part-time students, whereas addprogramme( ) is a
simple data entry function. Thus, UML Class diagram with generalisation/specialisation is a
very useful database design tool.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
48 CONTINUATION…
UML DIAGRAMS: AN AID TO DATABASE DESIGN SPECIFICATIONS
49
Database design was initially handled manually. But as the complexity and volume of data increased,
automation of the same became essential. So, why was Database design automated? The reasons are:
• As the complexity of a system increases, the number of options or in other words different design models
that can represent the information model also increase rapidly. Hence it becomes difficult to deal with the
complexity and the corresponding design alternatives manually.
• The size and volume of some databases may contain hundreds of entity types and relationship types.
Manually managing such a design becomes extremely difficult.
Thus, because of the above two reasons, the Database Design Process had to be automated.
However, database design is not a process in isolation and as discussed earlier, database application
design is part of SDLC. Thus, database design tools are part of tools or commercial database
management system development environment.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
51 CONTINUATION…
AUTOMATED DATABASE DESIGN AND IMPLEMENTATION TOOLS
Some of the essential facilities that need to be provided by the database design tools are:
1. Facility for drawing a conceptual schema Design: It basically allows the database designers to
represent the database diagrammatically. Thus, a tool must support the representation of the
following:
• Entity Types
• Relationship Types
• Cardinality Constraints
• Attributes, Keys, foreign keys etc.
• Showing inheritance hierarchies or generalisation/specialisation hierarchy.
The diagrams should be stored and should allow modifications whenever necessary.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
52 CONTINUATION…
AUTOMATED DATABASE DESIGN AND IMPLEMENTATION TOOLS
2. Allows Model Mapping: Mapping Algorithms for external schemas, security etc. should be
creatable and implementable. Such mapping is mostly system-specific.
3. Support of Normalisation: Normalisation process uses a set of functional dependencies. Such
FDs should be represented with the help of this tool at the time of logical design.
Eng. Steve Jerry A. Thompson, PhD, MSc, BSc
53 CONTINUATION…
AUTOMATED DATABASE DESIGN AND IMPLEMENTATION TOOLS
54 CONTINUATION…
AUTOMATED DATABASE DESIGN AND IMPLEMENTATION TOOLS
4. Support for Design Verification: The tool should enable verification of the resulting design. It
should allow checking whether the design satisfies the initial requirements. We have avoided
detailing any proprietary tool here, but you can refer to websites for many such tools.
The CASE tools address both schema design and application design concurrently.