You are on page 1of 29

Database Management Systems

BITS Pilani
Hyderabad Campus

Dr.R.Gururaj
CS&IS Dept.

Lecture Session-17

Database design and usage of UML(Ch.12)


Content

Introduction to Database Design activity The role of IT and Databases in large Orgs The Information system life-cycle The database system application life-cycle Main phases in database design UML in modeling Rational Rose

15/10/2013

SSZG 518

Database Design & Applications

Dr.R.Gururaj

BITS Pilani, Hyderabad Campus

Introduction
The overall database design activity has to undergo a systematic process called the design methodology. Various design methodologies are implicit in the design tools supplied by vendors. Ex: Designer 2000 : Oracle ERWin, BPWin, and AllFusion Component Modeler by Computer Ass. Sybase Enterprise Application Studio etc. Design of small databases with less than 20 users or less than 10 to 15 relations is not that complicated. But for large databases, database design is a very crucial activity.
2 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj BITS Pilani, Hyderabad Campus

The role of databases in information systems in Organizations


Databases have become a part of the information systems of many organizations. In 1960s Information systems were dominated by File systems, but since 1970s organizations have gradually moved to database systems.

To accommodate such systems, organizations have created DBA positions and perhaps even Database Administration Departments to oversee and control database life-cycle activities.

15/10/2013

SSZG 518

Database Design & Applications

Dr.R.Gururaj

BITS Pilani, Hyderabad Campus

In large organizations IT and IRM have been recognized as keys to the successful management for the following reasons. Data is regarded as a corporate resource. Many functionalities are computerized and hence need to keep large volumes of data in up-to-the-minute current state. As the complexity of data and applications increase it has become essential to model complex relationships among the data. There is a tendency to consolidate information resources in Orgs. Many Orgs reduce costs be letting users to perform business transactions.

Two additional characteristics of database systems are:


1. Data independence- protect application program from changes 2.
4

External schemas use of same data by multiple applications


15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj BITS Pilani, Hyderabad Campus

In early 1970s through mid 1980s the trend was to have centralized data repositories managed by single DBMS. Over the last 15-20 years new models have emerged because of: 1. PCs and database systems like MS Access, MySQL etc. have promoted personal databases. 2. Advent of distributed client-server architecture in DBMS 3. Many Orgs use Data dictionaries and Information repositories which are mini databases that manage data and help in effective information resource management.

15/10/2013

SSZG 518

Database Design & Applications

Dr.R.Gururaj

BITS Pilani, Hyderabad Campus

The information System Lifecycle


In a large org, the database system is typically part of the Information System, which includes all resources that are involved in the collection, management, use, and dissemination of the information resources of the organization. Information System of a large Org encompasses: Data itself DBMS Personnel who use and manage data Application that access and process the data Application programmers

Thus a database system is part of a much larger organizational Information System. The Information System life-cycle is known as Macro life cycle. The Database System life-cycle is known as Micro life cycle .
6 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj BITS Pilani, Hyderabad Campus

The Macro life cycle phases


Feasibility Analysis is analyzing potential application areas, economics, cost-benefit analysis, complexities, setting up priorities among applications Requirements Collection and Analysis is done by User interaction, Inter application dependencies, communication and reporting procedures Design Database Design and Application Design Implementation
Validation and Acceptance testing Deployment, Operation and maintenance

15/10/2013

SSZG 518

Database Design & Applications

Dr.R.Gururaj

BITS Pilani, Hyderabad Campus

The Database Application System (micro) Life-cycle


System Definition Define scope, users, its applications. Identify interfaces, response time constraints, storage and processing needs. Database Design At the end of this phase, a complete logical and physical database design is ready. Database implementation implement conceptual schema and physical schema, create data files, implement application Loading or data conversion Application conversion Testing and validation Operation Monitoring and maintenance

15/10/2013

SSZG 518

Database Design & Applications

Dr.R.Gururaj

BITS Pilani, Hyderabad Campus

The Database Design and implementation process


We now discuss the activities Database design and implementation. The problem of database design can be stated as follows. Design the logical and physical structure of one or more databases to accommodate the information needs of the users in an org for a defined set of applications. The goals of the database design are: 1. Satisfy the information content needs of the specified users and applications. 2. Provide a natural and easy-to-understand structuring of the information. 3. Support processing requirements and any performance objectives like response time, processing time, and storage space.

15/10/2013

SSZG 518

Database Design & Applications

Dr.R.Gururaj

BITS Pilani, Hyderabad Campus

Main phases of database design and implementation


Requirements collection and analysis Conceptual design Choice of a DBMS Data model mapping (logical database design) Physical database design Database system implementation and tuning

10

15/10/2013

SSZG 518

Database Design & Applications

Dr.R.Gururaj

BITS Pilani, Hyderabad Campus

1. Requirements collection
To know and analyze the expectations of the users and the intended uses of the database in as much detail as possible. To specify the requirements we must first identify the other parts of the information system that will interact with database system. These include existing users and applications. Major application areas and users. Existing system is studied- documents, reports, manuals, and organizational charts. Current operating environment- types of transactions and their frequencies, characteristics of users, flow of information, input and output data for the transactions. Written responses to sets of questions and interviews of individuals.

11

15/10/2013

SSZG 518

Database Design & Applications

Dr.R.Gururaj

BITS Pilani, Hyderabad Campus

2. Conceptual database design


This has two parallel activities (a) Conceptual schema design and (b) transaction and application design (a) Conceptual schema design This phase produces DBMS independent high-level data model. The goal is a complete understanding of the database structure (semantics), interrelationships, and constraints. The conceptual schema is invaluable as a stable description of the databases contents. The choice of DBMS and later design decisions may change with-out changing the DBMS-independent conceptual schema. Good understanding of the conceptual schema is crucial for database designers. The graphical representation of the conceptual schema serves as an excellent vehicle of communication among the stake holders.
12 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj BITS Pilani, Hyderabad Campus

Approaches to conceptual schema:

1. Top-down approach
2. Bottom-p approach

3. Inside-out strategy- it is a special case of bottom-up strategy. Initially focus is on central set of concepts that are most evident. Then spreads to other new concepts in the surroundings.
4. Mixed strategy

13

15/10/2013

SSZG 518

Database Design & Applications

Dr.R.Gururaj

BITS Pilani, Hyderabad Campus

(b) Transaction Design The purpose is to design the characteristics of known database transactions in a DBMS independent way. To identify input/output behavior of transactions. To specify the functional characteristics of these transactions. Types of transactions : 1. Retrieval transactions 2. Update transactions 3. Mixed transactions

14

15/10/2013

SSZG 518

Database Design & Applications

Dr.R.Gururaj

BITS Pilani, Hyderabad Campus

3. Choice of a DBMS
The choice of a DBMS is governed by a number of factorstechnical, economics, politics of the Org. Technical- suitability of a DBMS for given task, storage, access paths, QL supported, availability of tools, programmer interface, architectural options. Cost- SW acquisition, maintenance cost, HW cost, Database creation or conversion cost, personnel cost, training cost, operating cost. The advantages (intangible) of DBMS over file systems: 1. Data complexity 2. Sharing among applications 3. Dynamically evolving or growing data 4. Ad hoc retrieval of data 5. Data volume and need for control
15 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj BITS Pilani, Hyderabad Campus

4. Data Model Mapping (Logical Database Design)


The next phase is to create a conceptual schema and external schemas in the data model of the selected DBMS by mapping the schemas designed in Phase-2. Result of this phase should be DDL statements in the language of the chosen DBMS that specify the conceptual and external level schemas of the database system. Many automated CASE (Computer Assisted Software Design) tools can generate DDL for commercial system from a conceptual schema design.

16

15/10/2013

SSZG 518

Database Design & Applications

Dr.R.Gururaj

BITS Pilani, Hyderabad Campus

5.Physical Database Design


Physical database design is the process of choosing specific storage structures and access paths for the database file to achieve good performance for the various database applications. This includes- Indexing, clustering of records on disk blocks, linking pointers using pointers, and hashing. Many DBMSs offer choices for this and the designer has to choose from this. Following criteria are used to guide physical database design: 1. Response time 2. Space utilization (for access paths) 3. Transaction throughput

17

15/10/2013

SSZG 518

Database Design & Applications

Dr.R.Gururaj

BITS Pilani, Hyderabad Campus

6.Database System Implementation and Tuning


After the logical and physical design is completed, Database system is implemented. This is the responsibility of DBA carried out in conjunction with the database designers. The language statements in the DDL are compiled and tables are created and then data is loaded. If the data is to be converted from an earlier computerized system, conversion routines may be needed reformat the data for loading into the new database. Then database transactions are implemented by application programmers. Then the operational phase of the database starts. Database tuning takes place based on the collected statistics and observations.
18 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj BITS Pilani, Hyderabad Campus

Use of UML Diagrams


UML as a design specification standard
UML is a standard by OMG (Object Management Group).

UML provides a mechanism in the form of diagrammatic notation and associated language syntax to cover the entire life-cycle. UML is used by software developers, data modelers, data designers, database architects, and so on to define the detailed specification of an application.

19

15/10/2013

SSZG 518

Database Design & Applications

Dr.R.Gururaj

BITS Pilani, Hyderabad Campus

The environment of the system (SW, HW) and deployment details can be specified using UML.
UML can be used to specify, visualize, construct, and document software components. UML can be used to represent high-level conceptual schema of the database.

20

15/10/2013

SSZG 518

Database Design & Applications

Dr.R.Gururaj

BITS Pilani, Hyderabad Campus

UML for Database Application Design


UML can be used for Data modeling as well as subsequent phases of database design..
Can be used for designing Relational, Object, and Object Relational Databases. UML Class diagrams are similar to ER diagrams. They give a structural specification of the database schemas. Their normal use in this context is to describe the collections of data objects and their inter-relationships, which is consistent with the goal of conceptual design.

21

15/10/2013

SSZG 518

Database Design & Applications

Dr.R.Gururaj

BITS Pilani, Hyderabad Campus

Different UML Diagrams


We can divide UML diagrams into two categories:
1. Structural diagrams Describe the structural or static relationships among the components. Class diagram, Object diagram, component diagram, and deployment diagram. 2. Behavior diagrams Their purpose is to describe the behavioral or dynamic relationships among components. Use case diagrams, Sequence diagrams, Collaboration diagrams, Statechart diagrams, and activity diagrams.

22

15/10/2013

SSZG 518

Database Design & Applications

Dr.R.Gururaj

BITS Pilani, Hyderabad Campus

Nine types of diagrams in UML


1. Use Case Diagram

2. Class Diagram
3. Sequence Diagram 4. Collaboration Diagram

5. State Diagram
6. Activity Diagram 7. Node Diagram 8. Component Diagram 9. Deployment Diagram
23 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj BITS Pilani, Hyderabad Campus

Class diagrams

Relationships:

Association
24 15/10/2013 SSZG 518

Multiplicity
Database Design & Applications Dr.R.Gururaj

Composition
BITS Pilani, Hyderabad Campus

Class Diagram
25 15/10/2013 SSZG 518 Database Design & Applications

Sequence diagrams: A sequence diagram shows the time ordering of sequence of method calls. Shows communication pattern among objects. Represent message sequencing in the system.
Dr.R.Gururaj BITS Pilani, Hyderabad Campus

Rational Rose for Database Design


Rational Rose is one of the most important modeling tools used in the industry to develop information systems. Rational Rose Data Modeler is a visual modeling tool for designing databases. Supported by DB2, Oracle, SQL Server, Sybase etc. This also supports process modeling for database applications. We can perform Reverse Engineering Forward Engineering Conceptual database design in UML notation Communication among design teams
26 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj BITS Pilani, Hyderabad Campus

Other automated Design Tools


Company Embarcadero Technologies Oracle Computer Associates Rational (IBM) Resolution Ltd. Tool ER Studio DB Artisan Developer 2000 and Designer 2000 Platinum Model Mart, ERWin, Component Modeler Rational Rose XCase Functionality ER Modeling DB Administraion DB modeling and Application Development Data Modeling, Object Modeling Modeling in UML Conceptual modeling

Sybase
Visio

Enterprise Application Suite


Visio enterprise

Data Modeling and business logic modeling


Data modeling, Design and Reengineering
Dr.R.Gururaj BITS Pilani, Hyderabad Campus

27

15/10/2013

SSZG 518

Database Design & Applications

Summary
What is Database Design activity The importance of IT and Databases in large Orgs The Information system life-cycle Macro/Micro The database system application life-cycle Main phases in database design UML in modeling and diagrams Rational Rose in database modeling Other automated tools for database design

28

15/10/2013

SSZG 518

Database Design & Applications

Dr.R.Gururaj

BITS Pilani, Hyderabad Campus

You might also like