ss zg518-l17.ppt

29
BITS Pilani Hyderabad Campus Database Management Systems Dr.R.Gururaj CS&IS Dept.

Upload: anup-raghuveer

Post on 29-Nov-2015

38 views

Category:

Documents


0 download

DESCRIPTION

,;lkmjmjmkmjk

TRANSCRIPT

Page 1: SS ZG518-L17.ppt

BITS PilaniHyderabad Campus

Database Management Systems

Dr.R.GururajCS&IS Dept.

Page 2: SS ZG518-L17.ppt

BITS Pilani, Hyderabad Campus

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 OrgsThe Information system life-cycleThe database system application life-cycleMain phases in database designUML in modelingRational Rose

1 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj

Page 3: SS ZG518-L17.ppt

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

Page 4: SS ZG518-L17.ppt

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.

3 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj

Page 5: SS ZG518-L17.ppt

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. External schemas – use of same data by multiple applications

4 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj

Page 6: SS ZG518-L17.ppt

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 DBMS3.Many Orgs use Data dictionaries and Information repositories which are mini databases that manage data and help in effective information resource management.

5 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj

Page 7: SS ZG518-L17.ppt

BITS Pilani, Hyderabad Campus

The information System Life-cycle

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 itselfDBMSPersonnel who use and manage dataApplication that access and process the dataApplication 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

Page 8: SS ZG518-L17.ppt

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

7 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj

Page 9: SS ZG518-L17.ppt

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

8 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj

Page 10: SS ZG518-L17.ppt

BITS Pilani, Hyderabad Campus

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.

The Database Design and implementation process

9 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj

Page 11: SS ZG518-L17.ppt

BITS Pilani, Hyderabad Campus

Main phases of database design and implementation

Requirements collection and analysisConceptual designChoice of a DBMSData model mapping (logical database design)Physical database designDatabase system implementation and tuning

10 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj

Page 12: SS ZG518-L17.ppt

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

Page 13: SS ZG518-L17.ppt

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 designThis 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

Page 14: SS ZG518-L17.ppt

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

Page 15: SS ZG518-L17.ppt

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 transactions2.Update transactions3.Mixed transactions

14 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj

Page 16: SS ZG518-L17.ppt

BITS Pilani, Hyderabad Campus

3. Choice of a DBMS

The choice of a DBMS is governed by a number of factors- technical, 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 complexity2.Sharing among applications3.Dynamically evolving or growing data4.Ad hoc retrieval of data5.Data volume and need for control

15 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj

Page 17: SS ZG518-L17.ppt

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

Page 18: SS ZG518-L17.ppt

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 time2.Space utilization (for access paths)3.Transaction throughput

17 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj

Page 19: SS ZG518-L17.ppt

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

Page 20: SS ZG518-L17.ppt

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

Page 21: SS ZG518-L17.ppt

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

Page 22: SS ZG518-L17.ppt

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

Page 23: SS ZG518-L17.ppt

BITS Pilani, Hyderabad Campus

Different UML Diagrams

We can divide UML diagrams into two categories:

1.Structural diagramsDescribe the structural or static relationships among the components.Class diagram, Object diagram, component diagram, and deployment diagram.

2.Behavior diagramsTheir 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

Page 24: SS ZG518-L17.ppt

BITS Pilani, Hyderabad Campus

Nine types of diagrams in UML

23 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj

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

Page 25: SS ZG518-L17.ppt

BITS Pilani, Hyderabad Campus

Class diagrams

Relationships:

                                                                                                                            

MultiplicityAssociation Composition24 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj

Page 26: SS ZG518-L17.ppt

BITS Pilani, Hyderabad Campus

Class Diagram

25 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj

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.

Page 27: SS ZG518-L17.ppt

BITS Pilani, Hyderabad Campus

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 EngineeringForward EngineeringConceptual database design in UML notationCommunication among design teams

Rational Rose for Database Design

26 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj

Page 28: SS ZG518-L17.ppt

BITS Pilani, Hyderabad Campus

Company Tool Functionality

Embarcadero Technologies

ER Studio ER Modeling

DB Artisan DB Administraion

Oracle Developer 2000 and Designer 2000 DB modeling and Application Development

Computer Associates

Platinum Model Mart, ERWin, Component Modeler

Data Modeling, Object Modeling

Rational (IBM) Rational Rose Modeling in UML

Resolution Ltd. XCase Conceptual modeling

Sybase Enterprise Application Suite Data Modeling and business logic modeling

Visio Visio enterprise Data modeling, Design and Reengineering

Other automated Design Tools

27 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj

Page 29: SS ZG518-L17.ppt

BITS Pilani, Hyderabad Campus

Summary

What is Database Design activity The importance of IT and Databases in large OrgsThe Information system life-cycle Macro/MicroThe database system application life-cycleMain phases in database design UML in modeling and diagramsRational Rose in database modelingOther automated tools for database design

28 15/10/2013 SSZG 518 Database Design & Applications Dr.R.Gururaj