präsentation datemodellierung mit dem sql developer data

54

Upload: others

Post on 19-Feb-2022

8 views

Category:

Documents


0 download

TRANSCRIPT

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Datemodellierung mit dem SQL Developer Data Modeler

Dipl.-Inf. Karin Patenge| Leitende Systemberaterin [email protected] | @kpatenge | oracle-spatial.blogspot.de Oracle Deutschland B.V. & Co. KG | Potsdam DOAG Regiotreffen Nord | Bremen | 10. September 2015

Präsentation

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Safe Harbor Statement

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

3

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Agenda

1

2

3

4

Models and Why Model?

Oracle SQL Developer Data Modeler Overview

Top 10 Features

Special topic: Modeling related to NoSQL

Additional Information

4

5

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

1

2

3

4

Models and Why Model?

Oracle SQL Developer Data Modeler Overview

Top 10 Features

Special topic: Modeling related to NoSQL

Additional Information

5

5

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Why Model?

• Empowers and safeguards change

• Communication method to gather requirements

• Business rules validation

• Target user involvement

• Documentation/Training

6

5 good reasons

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

• Designing a new database Top-Down

– Business information

– One process model

– One logical model

– One multidimensional model

– One or more relational models

– One or more physical models for each relation model

• Modifying an existing database Bottom-Up – Produce relational model by

extracting metadata from an existing database (direct import or from a script)

– Modify relational model and create additional relational models

– Reverse engineer the logical model from the relational model

– Modify and check the design for the logical model

– Generate the modified DDL code

7

• Maintain existing database by adapting to new requirements Targeted modeling

– Decision about where to start (Logical, Relational, Physical) and where to go (Forward or Reverse) depends on the kind of changes

• Add tables, columns, properties

Approaches to Modeling

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

• Data modeling is tightly coupled with application development process

• Data and funcions cannot be treated separately

8

Database and Application Development Life Cycle

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

1

2

3

4

Models and Why Model?

Oracle SQL Developer Data Modeler Overview

Top 10 Features

Special topic: Modeling related to NoSQL

Additional Information

9

5

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Data Modeler - What Is It?

• No cost graphical diagramming and data modeling tool – Standalone (SQL Developer Data Modeler) or

– Integrated in SQL Developer (Tools > Data Modeler)

• Follows Zachman Framework for defining data structures

• Single tool for different users (SW architects, data modelers, application developers, DBAs) and functionality

• Modeling across platforms within one integrated system

• Business rules and process flow documentation and verification

• Standards-driven DDL script generation

• Migration support from other tools

• For installation simply unzip download file

10

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

• Technology and Architecture –Java based

–Metadata stored in XML Files

• Database Support –Oracle 9i, 10g, 11g, and 12c

–3rd party DBs • SQL Server, DB2, UDB, JDBC-ODBC

Bridge

• Platform Support –Windows

–Linux

–OS X

11

Supported Platforms

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Oracle SQL Developer Data Modeler Overview

12

Data Dictionary

Strategy and Analysis

Relational

Database Design

Data Type

Star Schema Physical

Multidimensional

ERD DFD

Logical

DDL Script

Reporting

Import Models

Domains

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Modeling Structure

13

Focus on these topics or next slides and demo

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

How to work Top-Down Based on information about business requirements, the internal environment, and defined processes

14 Oracle Confidential – Internal

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Brief Demo

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

• Support for SQL99 (Object Relational Modeling) – Distinct Types

– Structured Types

– Collection Types

• Can be used in logical and relational models

• Included in import

• Generated in DDL

16

Modeling Data Types

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Logical (or Conceptual) Modeling (1)

• Model entities, attributes, relations and entity type hierarchies

• Transform logical to many relational and multi-dimensional models

• Configurable forward and reverse engineering

• Provide different modeling notations and displays of same model

• Use subviews to work on subset of model

17

Data Model – Entity Relationship Diagram (ERD)

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 18

Logical Modeling- Relationship Matrix

Oracle Confidential – Internal

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Logical Modeling (2)

• Model external agents, processes, information/data flow and information stores

• Different process types: primitive, composite and transformation

• Decompose a process into lower level DFDs

• Depict information flow from one object to another

19

Process Model – Data Flow Diagram

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Multidimensional Modeling

• Model of business activities in terms of facts and dimensions

• Model cubes, measures, dimensions, hierarchies, and levels

• Start from ROLAP, XMLA or from scratch

• Generate Oracle Analytical Workspaces

20

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Relational Modeling (also called: Database Design)

• Model tables, columns and foreign keys

– Values of a column are atomic

– Each row in a table is unique

– Each column value has the same data type

– Sequence of rows and columns don´t matter

– Each column has a unique name

• Map one logical data model to one or more relational models

• Configurable forward and reverse engineering

• Use subviews to work on subset of model

21

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Physical Modeling (also called: Database Generation)

• Define multiple physical implementations of a relational model – Partitioned vs Non-Partitioned

– RAC vs Single Instance

– Production vs Test

– 12c vs 11g

– In-Memory yes/no

– ...

• Define tablespaces, users, stored procedures, partitions, ...

• Supports storage templates for applying common properties across multiple objects

22

Relational

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Export and Code Generation

• DDL generation options – One or many files

– Name substitution

• Reporting Repository – Generate reports w/o access to the design

– Query your models

• Multi-Dimensional Oracle Analytic Workspaces, Cube Views, and XMLA

23

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Recap

• Model used to define business information requirements?

– Logical model

• Model to define database objects?

– Relational model

24 Oracle Confidential – Internal

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Working with Diagrams

• Automatic or manual layouts

• Configurable color schemes

• Multiple displays for alternate layouts and visual options

• Subviews for logical grouping and subsetting objects

• WYSIWYG PDF/PNG/JPG

26

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Working with Objects

27

Properties Window

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Importing Metadata

• Import using direct DB connections – Oracle Database – Oracle Designer repository – Microsoft SQL Server – IBM DB2 and UDB – Generic JDBC based dictionary

• File import – DDL – Domains – Other Modeling tools (CA Erwin, Bachman ) – Multi-Dimensional (Cube views, Microsoft XMLA)

28

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Controlling the Design Environment

• Defaults used during creation, manipulation, generation of all models

• Naming Standards used during creation and transformation

• Diagramming properties

29

Preferences

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Controlling the Design Environment

• Facilitates common tasks

• Create Views from Existing Tables

• Define Domains from Defined Types

• Abbreviation and glossary management

• Design rules

• Compare and merge models

30

Tool Options

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

• Define and apply naming standards to the models

– Name patterns for tables, columns, keys, indexes, constraints and more

• Glossaries support

– Set of accepted terms used in design

• Abbreviations support – Comma-separated values file(s)

31

Glossaries and Naming Standards

Oracle Confidential – Internal

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Reporting

• Integrated reporting

– Generated in RTF, PDF and HTML formats

– HTML reports can include diagram

– Custom report templating

• Optional reporting repository in the Oracle Database

32

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Collaborative Development

33

Version Control

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Collaborative Development

• Version and Control Designs

• One or many users supported

• Pending Changes

– Incoming

– Outgoing

– Side By Side Reporting

• Commit/Revert changes

• Alter Scripting

34

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Recent Feature Additions

• New Features – A selection

http://www.oracle.com/technetwork/developer-tools/datamodeler/downloads/data-modeler-41-newfeatures-2373777.html

– Full list http://www.oracle.com/technetwork/developer-tools/datamodeler/data-modeler-41-fullfeatures-2373779.html

• Design Search and Replace – Search results reporting

– Update multiple model object properties via search results

– Export to Excel, make changes, import back to model

• Database 12c Support – Redaction Policies

– Identity Columns

– Temporal Validity

35

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

1

2

3

4

Models and Why Model?

Oracle SQL Developer Data Modeler Overview

Top 10 Features

Special topic: Modeling related to NoSQL

Additional Information

36

5

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

1. Using Search Feature

2. Applying Data Redaction

3. Generate multi-dimensional model

4. Built-in Reporting Tool

5. The Reporting Repository

– Building a custom report using Oracle SQL Developer

6. DDL Preview

6. Adding Audit Columns to Every Table (Applying transformations)

7. Using Built-in Quality Checks (Design Rules)

– Adding custom design rules

– Defining and applying rule sets

8. Switching Model Notations and Resize Objects

9. Creating Multiple Displays and SubViews

37

Other Cool Features

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Try it yourself or watch others! • Data Modeler Howtos:

– Search function http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldevdm/r40/dmsearch4/dmsearch4.html

– Data Redaction https://apexapps.oracle.com/pls/apex/f?p=44785:24:0::NO:24:P24_CONTENT_ID,P24_PREV_PAGE:8495,29

– Generate multi-dimensional model http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldevdm/r40/datamodel4genmulti/datamodel4genmulti_otn.html

– Using a predefined design rule https://apexapps.oracle.com/pls/apex/f?p=44785:24:111193493757266::NO:24:P24_CONTENT_ID,P24_PREV_PAGE:5947,29#prettyPhoto/0/

– Applying a transformation https://apexapps.oracle.com/pls/apex/f?p=44785:24:111193493757266::NO:24:P24_CONTENT_ID,P24_PREV_PAGE:5950,29

– Collaborative Modeling https://apexapps.oracle.com/pls/apex/f?p=44785:24:111193493757266::NO:24:P24_CONTENT_ID,P24_PREV_PAGE:5953,29#prettyPhoto/0/

– Adding and applying a rule set https://apexapps.oracle.com/pls/apex/f?p=44785:24:111193493757266::NO:24:P24_CONTENT_ID,P24_PREV_PAGE:5949,29#prettyPhoto/0/

– Working with reporting repository http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldevdm/r30/datamodel4reprpt/datamodel4reprpt.htm

– Re-engineering a database http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldevdm/r40/mod1_dm

– Apply Naming Conventions http://www.oracle.com/technetwork/developer-tools/datamodeler/datamodelernamingstandards-167685.pdf

38 Oracle Confidential – Internal

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Brief Demo Adding default columns CREATED_ON, CREATED_BY to all tables

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

• Heli Helskyaho at Oracle Open World 2014: „Getting started with Oracle SQL Developer Data Modeler“

40

Recommendation

Oracle Confidential – Internal

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

1

2

3

4

Models and Why Model?

Oracle SQL Developer Data Modeler Overview

Top 10 Features

Special topic: Modeling related to NoSQL

Additional Information

42

5

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Wachstum Datenvolumen – Prognose für 2020

Quelle: IDC document # 1414, “THE DIGITAL UNIVERSE IN 2020: Big Data, Bigger Digital Shadows, and Biggest Growth in the Far East”

43

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

NoSQL - Eine Definition

„A NoSQL (originally referring to “non SQL” database provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases.” [Quelle: Wikipedia]

• NoSQL „Not only SQL“

• Sammelbegriff für nicht-relationale Datenbanken, die – weitgehend ohne Datenmodell („Schema-less“) arbeiten

– massiv parallelisierbar sind,

– horizontal verteilt auf mehreren Servern Daten ablegen („Sharding“),

– Datenkonsistenz nicht zwingend durchsetzen (nicht ACID compliant),

– sehr große Datenmengen einfach, schnell und kostengünstig speichern und wieder abrufen können,

– keine Join-Operationen oder Multi-Object Transaktionen unterstützen,

– und sehr entwicklerspezifisch sind.

• Zu beachten

– Es gibt keine Standard-Abfragesprache (eben "NoSQL")

– Massive Produktvielfalt (Siehe http://www.nosql-database.org/ )

– Produkte nur schwer vergleichbar

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Typen von NoSQL Datenbanken

Key-Value Stores

Bsp.: Oracle Berkeley DB Redis

Document Stores

Bsp.: MongoDB MarkLogic (XML)

Column Stores / BigTable

Bsp.: HBase Cassandra

Graph Datenbanken

Bsp.: Neo4J Oracle NoSQL + RDF

45

Abbildungen: http://www.thoughtworks.com/insights/blog/nosql-databases-overview

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

• Daten über REST Services abrufen als JSON, z.B.

– Blog Postings als JSON http://oracle-spatial.blogspot.com/feeds/posts/default?alt=json

– Tweets als JSON

– JSON-Sicht auf relationale Daten (in der Oracle DB) https://blogs.oracle.com/jsondb/entry/using_rest_to_access_json

46

Document Store: JSON

Oracle Confidential – Internal

http://json.org/example.html

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Two approaches to polyglot requirements: Single Model and Multi-model

Polyglot (Single-model) Multi-Model

47

Relational Database

JSON Document Store

Graph Database

XML Database

Relational Data

JSON Documents

Graph Data

XML Data

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Polyglot (single-model)

• Oracle supports multiple data stores

– Oracle Database

– Oracle NoSQL Database

– Hadoop

• Oracle integrates polyglot environments

– Big Data SQL

Multimodel

• Oracle Database supports multiple models

– Relational

– XML

– JSON

• Oracle Database provides integrated access to all database objects

Oracle Product Strategy for Polyglot Persistence: Flexible solutions focused on Customer Requirements

- Spatial

- Graph

- OLAP

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

• Tabellen, JSON oder Key-Value

– Table API mit dem höchsten Abstraktionsgrad

– JSON für document-zentrische Anwendungen

– Key-Value sehr flexibel

49

Oracle NoSQL DB aus Datenmodellierungssicht

• Beispiel Table API

– Parent-Child-Tabellen • DDL über Command Line Interface oder

propgrammatisch

• Lesen, Schreiben, Löschen über Methoden wie PUT, GET, POST, DELETE

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

• Youtube, eine Auswahl – Table based Schema Design using Oracle

NoSQL Database https://www.youtube.com/watch?v=o7B94ch8iVs

– Developing Oracle NoSQL Database Applications using JSON Schemas https://www.youtube.com/watch?v=RdWRzFdDQEM

– Oracle NoSQL Database Application Development https://www.youtube.com/watch?v=DCRFrYrEduY

• http://docs.oracle.com

50

Mehr auf Youtube und in der Oracle Online Dokumentation

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

RDBMS and NoSQL technologies comparison

53

A visual representation

*The cost comparison in the table above makes an assumption that the RDBMS is a commercial vendor product, and not a free open-source product such as MySQL

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Agenda

1

2

3

4

Models and Why Model?

Oracle SQL Developer Data Modeler Overview

Top 10 Features

Special topic: Modeling related to NoSQL

Additional Information

54

5

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

More Information

55

• SQL Developer Data Modeler on

– Oracle Technology Network (OTN) http://www.oracle.com/technetwork/developer-tools/datamodeler/overview/index.html

– Learning Library • Oracle by Example:

https://apexapps.oracle.com/pls/apex/f?p=44785:2:0:FORCE_QUERY::2,RIR,CIR:P2_TAGS:Data%20Modeler

• Youtube: http://www.youtube.com/results?search_query=oracle+sql+developer+data+modeler&sm=1

– Public Oracle Forum https://forums.oracle.com/community/developer/english/development_tools/application_development_in_pl_sql/sql_developer_data_modeler

– Blogs http://www.thatjeffsmith.com/data-modeling/

– Enhancement Requests https://apex.oracle.com/pls/apex/f?p=43135:1:1044172866274001:::::

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

[email protected] http://oracle-spatial.blogspot.com/ Twitter: @kpatenge