+ All Categories
Home > Documents > © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert...

© 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert...

Date post: 22-Dec-2015
Category:
Upload: chloe-nichols
View: 216 times
Download: 2 times
Share this document with a friend
Popular Tags:
36
© 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD [email protected]
Transcript
Page 1: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

© 2008 Quest Software, Inc. ALL RIGHTS RESERVED.

Managing Database Change with Data Modeling

Bert Scalzo, [email protected]

Page 2: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

2

Bert Scalzo …Database Expert & Product Architect for Quest Software

Oracle Background:• Worked with Oracle databases for over two decades (starting with version 4)• Work history includes time at both “Oracle Education” and “Oracle Consulting”

Academic Background:• Several Oracle Masters certifications• BS, MS and PhD in Computer Science• MBA (general business)• Several insurance industry designations

Key Interests:• Data Modeling• Database Benchmarking• Database Tuning & Optimization• "Star Schema" Data Warehouses• Oracle on Linux – and specifically: RAC on Linux

Articles for:• Oracle’s Technology Network (OTN)• Oracle Magazine,• Oracle Informant• PC Week (eWeek)

Articles for:• Dell Power Solutions

Magazine• The Linux Journal• www.linux.com• www.orafaq.com

Page 3: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

3

Books by Bert … Coming in 2009 …

2nd Edition

Coming Soon

Out Now …

Page 4: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

Agenda

• Define Database Change Management

• Examine Common DBA Options for Managing

Database Structural Changes

• Examine the World of Modeling

• Why Data Modeling Often Makes Sense as the

Change Management Methodology

• Examples using Toad Data Modeler

Page 5: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

Presentation Objectives

To demonstrate:

• Why a change management system is essential

• That database structural changes can be accomplished in many ways

• How data modeling tools can be an essential part of database change management

• The advantages of data modeling in change management

Page 6: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

What is Database Change Management?

…Ensuring that the source and target databases are in sync after changes to the environment:

• Development database• Test database(s)• Production database• Distributed databases• Replicated databases

Task is harder than you may think!

Page 7: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

Common Database Change Management Tasks

•Create/Drop tables

•Add/Drop table columns

•Resize table columns

•Add/Drop index columns

•Reorder index columns

•Add/Drop column constraints

•Modify column constraint logic

•Add/Drop table & index partitions

•Add/Drop object grants and roles

•Resize or Relocate database objects

Page 8: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

Change Management Can Be Tedious…

• Some database sync tasks require lots extra, indirect work (depending on the Oracle server version)– Drop table columns– Resize (i.e. shorten) table columns– And a few others …

• Therefore, the DBA must– Be aware of all these scenarios– Write extended alteration scripts– E.G. copy table, copy data, rename, grants

Page 9: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

Common Change Management Options

• Direct to Database

• One Way DDL Scripts

• One Way DDL Scripts + Version Control

• Two Way DDL Scripts

• Two Way DDL Scripts + Version Control

• DB Schema Managers

Page 10: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

#1: Direct to Database

TOADDBA

Database

OEM

SQLPlus

•Pros:•Method of least resistance (i.e. easy)•Manually alter the database directly•Often use highly visual tools like TOAD DBA and OEM•Requires no extra tools (no extra $ or learn curve)

•Cons:•The database is the Master•Totally ad-hoc database mods can be problematic•Extended alters require lots manual DBA time•History of structural changes is lost

Page 11: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

#2: One Way DDL Scripts

DDLScript Editor

SQLPlus

Database

•Pros:•An Old Timer’s favorite•Manually edit a Master DDL script•Requires no extra tools (no extra $ or learn curve)

•Cons:•The DDL Script is the Master•Can forget & thus loose ad-hoc database mods•Extended alters require lots manual DBA time•History of structural changes is lost

Page 12: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

#3: One Way DDL Scripts + Version Control

DDLScript Editor

SQLPlus

Database

SourceCode

Control

Check-Out

Check-In

•Pros:•Manually edit a version of Master DDL script•Requires source control tool (free on UNIX)•Addresses history shortcoming of prior method

•Cons:•The DDL Script is the Master•Can forget & thus loose ad-hoc database mods•Extended alters require lots manual DBA time

Page 13: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

#4: Two Way DDL Scripts

EditorSQLPlus

DatabaseDDL

ExtractTool

GenDDL

Script

FileDiffTool

NewDDL

Script

OrigDDL

Script

•Pros:•Manually create DDL script based upon compare•Requires DDL extract tool (can be SQL script)

•Cons:•The DDL Script is the Master•Can miss & over-ride ad-hoc database mods•Extended alters require lots manual DBA time•History of structural changes is lost

Page 14: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

#5: Two Way DDL Scripts + Version Control

EditorSQLPlus

DatabaseDDL

ExtractTool

GenDDL

Script

FileDiffTool

NewDDL

Script

DDLScript

SourceCode

Control

Check-Out

Check-In

•Pros:•Manually create DDL script based upon compare•Requires DDL extract tool (can be scripts)•Requires diff & source control tools (free on UNIX)•Addresses history shortcoming of prior method

•Cons:•The DDL Script is the Master•Can miss & override ad-hoc database mods•Extended alters require lots manual DBA time

Page 15: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

#6: DB Schema Managers

DatabaseCompare

andSync

DBDefFile

TOADDBA

DatabaseCompare

andSync

QuestSchemaManager

Deltas inDatabase

•Pros:•Automatically create DDL script or directly apply selected changes (i.e. sync) based upon compare•Requires DB comp & sync tool, but then no other tools•Addresses history shortcoming of prior methods•Extended alters as easy as any other modification

•Cons:•Disconnect between data models and database

Page 16: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.
Page 17: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.
Page 18: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.
Page 19: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.
Page 20: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

Data Modeling as a Change Management Methodology

• Works off the meta-data documenting the business requirements (i.e. the true source code so to speak)

• Requires using just one tool – the data modeling tool

• Eliminates having multiple steps and branch points

• Sometimes picture of what’s changed is more readily apparent and understandable than the alternatives

• By very nature, keeps database & its requirements in sync!

Page 21: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

The World of Modeling …

• Identify all data & relationships - E/R (Entity/Rel’ship) diagrams - DB independent view• Business Rules?

Conceptual Data Modeling(CDM – E/R)

Physical Data Modeling(PDM)

Business Process Modeling(BPM)

Object-Oriented Modeling(OOM - UML)

• DB-specific model• Reverse engineer existing DB• Create/Update DB from model• Data Warehouse Modeling

• DBA• DB Developer• DB Architect

• Bus. Analyst • Data Architect• Data Analyst

• System Architect• System Analyst• App Developer

• End-user• IT Partner/Liaison• Business Analyst

• Support for all UML diagrams - Analyze requirements - Design application• Reverse/forward engineer code

• Improve process efficiency• Define/document Bus. Processes - create correct and complete application requirements

Page 22: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

#6: Data Modeling Tools

DatabaseCompare

andSync

DataModel

QDesigner

DatabaseCompare

andSync

QDesigner

Deltas inDatabase

Toad Data Modeler

Toad Data Modeler

•Pros:•Automatically create DDL script or directly apply selected changes (i.e. sync) based upon compare•Requires DB compare & sync tool, but then no other tools•Addresses history shortcoming of prior methods•Extended alters as easy as any other modification•No disconnect between data models and database

Page 23: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

Handle Like Programming Code

DeveloperIDE

Compiler

SourceCode

Control

Check-Out

Check-In

ObjectCode

Linker Executable

ModelingIDE

Compare

ModelRepository

Check-Out

Check-In

DDLScript

Sync Database

Page 24: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

Compare & Sync Combinations

• Can compare & sync– Logical to Logical– Logical to Physical– Physical to Logical– Physical to Physical– Script to Physical– Database to Physical– Database to Database– Version to Version

Page 25: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

MOVIES Data Model

Page 26: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

Here we go …

• “Best laid plans of mice and men” • Real life is not as rigid or structured as we plan• Thus even when adopting a data modeling change

management approach, two way compare/sync will still be critical (need to catch exceptions to method)

• In following demo:– Will change some live database objects using

Toad (e.g. alter table, create table, drop table)– Will change some source code or data modeling

items (e.g. alter entity, create entity, drop entity)– See how modeling tool can find and fix these!

Page 27: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.
Page 28: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.
Page 29: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.
Page 30: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.
Page 31: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.
Page 32: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.
Page 33: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.
Page 34: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.
Page 35: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

Parting Thoughts• Data modeling can be an invaluable method for

managing and addressing change in your DB environments

• There are many other issues data modeling can address:– Modeling accurate business requirements– Transforming logical into physical models– Breaking data models into sub-models– Round-trip Engineering:

• Conceptual -> Physical Model compare and sync• Physical Model -> Database compare and sync

– Repository-based collaborative modeling– Horizontal and Vertical Partitioning– Data Warehousing (Star Schema design)– Object-Relational Mapping

Page 36: © 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Managing Database Change with Data Modeling Bert Scalzo, PhD Bert.Scalzo@Quest.com.

Presenter:Bert Scalzo: [email protected]

Questions and Answers …

Thank You


Recommended