chap02database design methodology-12-10-2011

31
Phase 02 Conceptual Database Design: It consists of two phases   a)Conceptual schema design b)Transaction and application design

Upload: vaibhav-sampat

Post on 07-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 1/31

Phase 02

Conceptual Database Design:

It consists of two phases — 

a)Conceptual schema designb)Transaction and application design

Page 2: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 2/31

a)Conceptual schema design

Goal is to design conceptual schemadesign of databasestructure,meaning,relationships etc.

Is a stable description of databasecontents

Imp for database users and applicationdesigners.

Diagrammatic description is vehicle of communication.

Page 3: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 3/31

 Approaches to conceptual schemadesign

 A)Centralized schema design approach.

B)View integration approach.

Page 4: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 4/31

Strategies for conceptual schemadesign

Top-down strategy

Bottom-up strategy

Inside-out strategy Mixed strategy

Page 5: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 5/31

Schema (view) Integration

First design individual schema and thenmerge them.

Design of the schema simplified.

So methodology for integrating views intoglobal schema required.

Page 6: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 6/31

Schema integration divided intosubtasks:

1.Indentifying corrospondence and conflictsamong the schemas->

-Represents same real world objects.

-And this corrospondance identified fromdifferent views before integration.

Page 7: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 7/31

During this process several types of conflicts among the schema should be

identified:i) Naming conflicts:

Two types:->

a) synonyms:two schema using the two differentname for describing the same concept.

e.g. customer in one schema may havesame meaning as that of other schema

client.

Page 8: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 8/31

b) Homonym :

when same name used to describe thedifferent concepts.

e.g. entity type part in one describes

computer parts in one schema andfurniture parts in other schema.

Page 9: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 9/31

ii) Type conflicts:

-same concept used in two schema by

different modeling constructs.-like department used as entity in one

schema and as an attribute in other

schemas.

iii) Domain conflicts:

 An attribute have two different domains intwo schemas.

Page 10: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 10/31

e.g. dept_id used as integer in one andchar in other.

iv) Conflicts among constraints:

-Two schema have different constraints.

-different structural constraints onrelationship

e.g. works_on relationship may have 1:N inone schema

 And M:N in other schema.

Page 11: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 11/31

2) Modifying views to confirm to oneanother.

->Schema modified according to anotherschemas that are related to each other.

->conflicts are resolved.

3) Merging of views:

->global schema is created by mergingindividual schemas.

->Most difficult step.

Page 12: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 12/31

4) Restructing:

Global schema is analyzed and restructuredComplexity is removed.

Page 13: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 13/31

Strategies for view integration process

Binary ladder integration:->Two similar schemas are integrated firstand then resulting schema integrated with

another schema.->process continues till all schemas are

integrated.

Page 14: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 14/31

N-ary integration:

->all schemas are integrated into oneprocedure.

->requires computerized tools for design.

->yet not available in market.

Binary balanced strategy:

->pairs of schemas are integrated first.

->repeat till final global schema is created.

Page 15: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 15/31

Mixed Strategy:

Schemas are partitioned into groups basedon their similarity.

 And each group is integrated separately.

Page 16: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 16/31

Phase 2b:Transaction Design Identify transactions on the database.

Functional characteristics of transactions.in early stages. Knowing Importance of transactions at design time.

Common technique is identify Input,output, and

functional behavior. Transactions are of three types:

a) Retrieval transactions:

Display datab) Update transactions:Modify data.c)Mixed transactions:Display data and moidify data.

Page 17: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 17/31

Phase 3:Choice of DBMS

Technical ,economical and politics of organization.

Nontechnical includes financial status.

Economical and organizational factorsthat affect the choice of DBMS:

1) Software acquisition cost:

2) Maintenance Cost:Keep Version uptodate

3) Hardware acquisition cost:

Page 18: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 18/31

4)Database creation and conversion cost:

5) Personal Cost:Reorganization of dataprocessing department.

6)Training cost:

7)Operating Cost:

Page 19: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 19/31

Moving from file based to datacentered approach:

Depends on following factors:

1)Data complexity:

Need for DBMS that handles data

2)Sharing among application: greatersharing greater redundancy among files soneed DBMS.

Page 20: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 20/31

 

3)Dynamically evolving or growing data:

Data changes frequently.

4) Frequency of ad hoc requests of data:

5)Data volume and need of control:

Page 21: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 21/31

Several Economic and organizationalfactors

1)Organization wide adoption of certainphilosophy:

Dominant factor that affect acceptabilityof data model, development methodologyand design tools.

2)Familiarity of personal with the system:

Reduces training cost and learning time.

Page 22: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 22/31

3)Availability of vendor services:

-For solving problems is very important.-Moving from non-DBMS to DBMS.

Page 23: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 23/31

Hardware

Versions that run on manyhardware/software configurations.

Need for backup, recovery, integrity, security

 

Page 24: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 24/31

Phase 4:Data Model Mapping

It's LOGICAL DATABASE DESIGN

1)System independent mapping:

Independent of DBMS.

Features not considered.

2)Tailoring the schema to a specific DBMS:

While designing the database features of DBMS considered.

Page 25: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 25/31

Phase 5:Physical Database design

Chose storage structures Chose access path.

indexing, linking related records.Criteria for choosing physical database

design:

 A) Response Time

submit database transaction and

receiving response.

Page 26: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 26/31

B) Space utilization:

Storage space used by database files.

C)Transaction throughput:

 Average number of transactions processedper minute.

Page 27: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 27/31

Phase 6:Database systemImplementation and Tuning

 After logical and physical designcomplemented, implement databasesystem.

Page 28: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 28/31

 Advanced SQL

Data types in SQL

Page 29: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 29/31

What is SQL? - Stands forStructured Query Language 

What is SQL?  SQL stands for Structured Query Language and is the lingua franca in the

database world. SQL is a standard that is used by all database vendors andprogrammers to define, extract and access the information that is stored indatabases. SQL began life as an IBM creation but was standardized by the American National Standards Institute (ANSI) and the InternationalOrganization for Standardization (ISO) as ANSI/ISO SQL in 1988. Since then ANSI/ISO SQL standard continued to evolve. The ANSI-SQL group has sincepublished three standards over the years:

1. SQL89 (SQL1) 2. SQL92 (SQL2) 3. SQL99 (SQL3) SQL is a query language. It is English-like and easy to use. However,

although there are more than 90 SQL reserved words, most programmersseldom use more than the following handful of commands - SELECT,INSERT, UPDATE, DELETE, FROM, WHERE, HAVING, BETWEEN, LIKE, OR, AND, NOT, IN, ORDER, GROUP and BY.

Page 30: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 30/31

The most central data modelling notions included inSQL3 are illustrated in and support specification of:

Classification hierarchies,

Embedded structures that support composite attributes,

Collection data-types (sets, lists/arrays, and multi-sets)that can be used for multi-valued attribute types,

Large OBject types, LOBs, within the DB, as opposed torequiring external storage, and

User defined data-types and functions (UDT/UDF) thatcan be used to define complex structures and derivedattribute value calculations, among many other functionextensions.

Page 31: chap02database design methodology-12-10-2011

8/3/2019 chap02database design methodology-12-10-2011

http://slidepdf.com/reader/full/chap02database-design-methodology-12-10-2011 31/31