0
Data Warrior LLC  Reverse Engineering (and Re-Engineer) an    Existing Database Using Oracle SQL           Developer Data ...
Data Warrior LLC     Agenda        Bio        Reverse Engineering        Logical Model        Forward Engineer Changes...
Data Warrior LLC     My Bio        Oracle ACE (BI/DW)        Certified Data Vault Master        Data Architecture and D...
Data Warrior LLC     Install        Mui Easy!        Download, unzip, execute!         ● http://www.oracle.com/technetwo...
Data Warrior LLC     Reverse Engineering        Called Import         ● From Data Dictionary         ● From DDL files    ...
Data Warrior LLC     Importing a Model (Reverse Engineering)     http://kentgraziano.com           #Kscope
Data Warrior LLC     Importing from DDL        Select Import -> DDL        Click green “+” to add a file to import     ...
Data Warrior LLC     Supported Databases to Import     http://kentgraziano.com         #Kscope
Data Warrior LLC     Merging the Import     http://kentgraziano.com   #Kscope
Data Warrior LLC     Viola!     http://kentgraziano.com   #Kscope
Data Warrior LLC     Adding in FKs        Many times existing DBs have no FKs         ● Use the NEW “Discover Foreign Key...
Data Warrior LLC     Discover FKs (New Feature)     http://kentgraziano.com      #Kscope
Data Warrior LLC     Adding in FKs     http://kentgraziano.com   #Kscope
Data Warrior LLC     Creating the Logical Model        One button push!         ● Creates entities             ●   All up...
Data Warrior LLC     Creating the Logical Model     http://kentgraziano.com      #Kscope
Data Warrior LLC     Creating the Logical Model         ● Creates relationships             ●   Using Barker Notation     ...
Data Warrior LLC     Logical Model - Barker     http://kentgraziano.com   #Kscope
Data Warrior LLC     Logical Model - Bachman     http://kentgraziano.com   #Kscope
Data Warrior LLC     Forward Engineering Changes        Edit the Logical         ●   Add relationship names         ●   C...
Data Warrior LLC     Engineer to Relational     http://kentgraziano.com   #Kscope
Data Warrior LLC     Generating New DDL        Use the new Reconcile button to sync the         database and the model   ...
Data Warrior LLC     Generate Sync Changes     http://kentgraziano.com   #Kscope
Data Warrior LLC     Sync DDL (Alter)     ALTER TABLE HR.COUNTRIES       MODIFY ( COUNTRY_NAME NOT NULL )     ;     ALTER ...
Data Warrior LLC     Sync DDL (Recreate)     ALTER TABLE HR.JOBS RENAME TO bcp_JOBS     ;     CREATE TABLE HR.JOBS       (...
Data Warrior LLC     Building a Multidimensional Model        Create from 3NF Logical         Model         ● Right mouse...
Data Warrior LLC     Build a Dimension (from Entity)        Create Dim container        Create Level or Levels         ●...
Data Warrior LLC     Build a Dimension     http://kentgraziano.com   #Kscope
Data Warrior LLC     Cool Multidimensional Diagram!     http://kentgraziano.com          #Kscope
Data Warrior LLC     Convert to Tables     http://kentgraziano.com   #Kscope
Data Warrior LLC     Other Cool Features        Can have         ● Multiple Relational Models             ●   From one lo...
Data Warrior LLC     Other Cool Features        Standards Enforcement         ● Can define and apply design rules        ...
Data Warrior LLC     Design Rules     http://kentgraziano.com   #Kscope
Data Warrior LLC     The Good News        It’s FREE!        Easy to learn         ● You can easily be productive in a fe...
Data Warrior LLC     http://kentgraziano.com   #Kscope
Data Warrior LLC     http://kentgraziano.com   #Kscope
Data Warrior LLC                        Contact Information                              Kent Graziano                    ...
Upcoming SlideShare
Loading in...5
×

Reverse Engineering an Existing Database Using Oracle SQL Developer Data Modeler

11,511

Published on

SQL Developer Data Modeler (SDDM) is a full function data modeling tool provided for FREE by Oracle. It has many features built in that can be leveraged to capture the design of an existing (probably undocumented) database, retrofit it to a logical model, re-engineer it to multiple physical models (including multi-dimensional), and even apply standards, then generate revised DDL to implement your newly standardized design. You can even use one logical model to develop multiple physical models that can be deployed to different RDBMS. The presentation will provide step-by-step instructions on how to do all this so the attendees can go back to the office and quickly create diagrams of all their existing databases (Oracle and non-Oracle!). See more content like this by following my blog http://kentgraziano.com or follow me on twitter @kentgraziano.

Published in: Technology
2 Comments
2 Likes
Statistics
Notes
No Downloads
Views
Total Views
11,511
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
122
Comments
2
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "Reverse Engineering an Existing Database Using Oracle SQL Developer Data Modeler"

  1. 1. Data Warrior LLC Reverse Engineering (and Re-Engineer) an Existing Database Using Oracle SQL Developer Data Modeler Kent Graziano Data Warrior LLC http://kentgraziano.com #Kscope
  2. 2. Data Warrior LLC Agenda  Bio  Reverse Engineering  Logical Model  Forward Engineer Changes  Generate DDL  Multidimensional Model  Cool Features  Demo, demo, demo http://kentgraziano.com #Kscope
  3. 3. Data Warrior LLC My Bio  Oracle ACE (BI/DW)  Certified Data Vault Master  Data Architecture and Data Warehouse Specialist  Co-Author of ● The Business of Data Vault Modeling (2008) ● The Data Model Resource Book (1st Edition) ● Oracle Designer: A Template for Developing an Enterprise Standards Document  Past-President of ODTUG and Rocky Mountain Oracle User Group  Co-Chair BIDW SIG for ODTUG  KScope12 Fitness Guru http://kentgraziano.com #Kscope
  4. 4. Data Warrior LLC Install  Mui Easy!  Download, unzip, execute! ● http://www.oracle.com/technetwork/developer- tools/datamodeler/overview/index.html  The best part – it is Free! http://kentgraziano.com #Kscope
  5. 5. Data Warrior LLC Reverse Engineering  Called Import ● From Data Dictionary ● From DDL files http://kentgraziano.com #Kscope
  6. 6. Data Warrior LLC Importing a Model (Reverse Engineering) http://kentgraziano.com #Kscope
  7. 7. Data Warrior LLC Importing from DDL  Select Import -> DDL  Click green “+” to add a file to import  Pick text file with DDL from browser  Click OK  Specify what DB the DDL came from  Navigate the Merge wizard to select what to import ● Press Merge button http://kentgraziano.com #Kscope
  8. 8. Data Warrior LLC Supported Databases to Import http://kentgraziano.com #Kscope
  9. 9. Data Warrior LLC Merging the Import http://kentgraziano.com #Kscope
  10. 10. Data Warrior LLC Viola! http://kentgraziano.com #Kscope
  11. 11. Data Warrior LLC Adding in FKs  Many times existing DBs have no FKs ● Use the NEW “Discover Foreign Keys” ● Or draw them in by hand  Automatically tries to generate a new migrating column in the target table ● Will only show candidate columns with exact data type and size match ● If you select an existing column, it will not save the generated column http://kentgraziano.com #Kscope
  12. 12. Data Warrior LLC Discover FKs (New Feature) http://kentgraziano.com #Kscope
  13. 13. Data Warrior LLC Adding in FKs http://kentgraziano.com #Kscope
  14. 14. Data Warrior LLC Creating the Logical Model  One button push! ● Creates entities ● All upper case ● Creates Attributes ● Retains case like relational model http://kentgraziano.com #Kscope
  15. 15. Data Warrior LLC Creating the Logical Model http://kentgraziano.com #Kscope
  16. 16. Data Warrior LLC Creating the Logical Model ● Creates relationships ● Using Barker Notation ● Drops inherited PK columns ● Drops inherited FK column ● Using Bachman Notation or Information Engineering ● Displays inherited attributes ● Can change notation on the fly with right mouse menu ● Keeps layout of physical model! http://kentgraziano.com #Kscope
  17. 17. Data Warrior LLC Logical Model - Barker http://kentgraziano.com #Kscope
  18. 18. Data Warrior LLC Logical Model - Bachman http://kentgraziano.com #Kscope
  19. 19. Data Warrior LLC Forward Engineering Changes  Edit the Logical ● Add relationship names ● Change or add attributes ● Add new entities ● Add new relationships  Press the ‘engineer to relational model’ button ● Check dialog for changes ● Uncheck any unwanted changes http://kentgraziano.com #Kscope
  20. 20. Data Warrior LLC Engineer to Relational http://kentgraziano.com #Kscope
  21. 21. Data Warrior LLC Generating New DDL  Use the new Reconcile button to sync the database and the model ● Get Compare dialog to select what to change  Will generate alters if appropriate ● New columns ● Change in mandatory setting  Will generate a complete replacement script that copies existing data ● Change in data type or precision http://kentgraziano.com #Kscope
  22. 22. Data Warrior LLC Generate Sync Changes http://kentgraziano.com #Kscope
  23. 23. Data Warrior LLC Sync DDL (Alter) ALTER TABLE HR.COUNTRIES MODIFY ( COUNTRY_NAME NOT NULL ) ; ALTER TABLE HR.COUNTRIES ADD ( Country_Abbreviation VARCHAR2 (4) NOT NULL ) ; ALTER TABLE HR.JOBS MODIFY ( MIN_SALARY NOT NULL ) ; ALTER TABLE HR.REGIONS MODIFY ( REGION_NAME NOT NULL ) ; http://kentgraziano.com #Kscope
  24. 24. Data Warrior LLC Sync DDL (Recreate) ALTER TABLE HR.JOBS RENAME TO bcp_JOBS ; CREATE TABLE HR.JOBS ( JOB_ID VARCHAR2 (10 BYTE) NOT NULL , JOB_TITLE VARCHAR2 (35 BYTE) CONSTRAINT JOB_TITLE_NN NOT NULL , MIN_SALARY NUMBER (20) NOT NULL , MAX_SALARY NUMBER (6) ) ; INSERT INTO HR.JOBS (JOB_ID , JOB_TITLE , MIN_SALARY , MAX_SALARY ) SELECT JOB_ID , JOB_TITLE , MIN_SALARY , MAX_SALARY FROM bcp_JOBS ; http://kentgraziano.com #Kscope
  25. 25. Data Warrior LLC Building a Multidimensional Model  Create from 3NF Logical Model ● Right mouse – New MDD ● Create Dimensions, Levels, Hierarchies, Cubes using MDD diagramming icons http://kentgraziano.com #Kscope
  26. 26. Data Warrior LLC Build a Dimension (from Entity)  Create Dim container  Create Level or Levels ● Pick Entity to base Level on ● Pick Level Key and Attributes  Link 1st Level to Dimension  Link other levels together to build hierarchies  Dim levels can be from different entities  Right mouse option to Engineer to Oracle Model ● Creates Oracle Dimensions in physical model http://kentgraziano.com #Kscope
  27. 27. Data Warrior LLC Build a Dimension http://kentgraziano.com #Kscope
  28. 28. Data Warrior LLC Cool Multidimensional Diagram! http://kentgraziano.com #Kscope
  29. 29. Data Warrior LLC Convert to Tables http://kentgraziano.com #Kscope
  30. 30. Data Warrior LLC Other Cool Features  Can have ● Multiple Relational Models ● From one logical ● Multiple Physical Designs ● Different database implementations from one relational ● Multiple dimensional models  Cool visual query builder for views  Real time view query tester  And much more…. http://kentgraziano.com #Kscope
  31. 31. Data Warrior LLC Other Cool Features  Standards Enforcement ● Can define and apply design rules ● One button to check the whole model and all rules ● Rules checked when generating DDL ● Vary by RDBMS and version ● Even with errors it generates the code http://kentgraziano.com #Kscope
  32. 32. Data Warrior LLC Design Rules http://kentgraziano.com #Kscope
  33. 33. Data Warrior LLC The Good News  It’s FREE!  Easy to learn ● You can easily be productive in a few hours  Just read the dialog boxes to see all the properties  Bonus: There is a also a process modeler that does data flow diagrams!  Plus lots of other business related meta data http://kentgraziano.com #Kscope
  34. 34. Data Warrior LLC http://kentgraziano.com #Kscope
  35. 35. Data Warrior LLC http://kentgraziano.com #Kscope
  36. 36. Data Warrior LLC Contact Information Kent Graziano The Oracle Data Warrior Data Warrior LLC Kent.graziano@att.net Visit my blog at http://kentgraziano.com http://kentgraziano.com #Kscope
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×