Oracle Sql Developer Data Modeler 3 3 new features

6,181 views

Published on

new features in Oracle SQL Developer Data Modeler 3.3. - presented at BGOUG conference - May 2013 http://www.bgoug.org/en/events/details/89.html

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
6,181
On SlideShare
0
From Embeds
0
Number of Embeds
2,388
Actions
Shares
0
Downloads
56
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide
  • First step to separate to valid constraints based on discriminator value – 3 here
    It’s in form:
    col!=value OR (b AND c AND d)
    2) Use distribution – a OR (b AND c) == (a OR b) AND (a OR c)
    Here “a” is “col!=value”
    3) Split the expression over AND on separate simple constraints
  • Oracle Sql Developer Data Modeler 3 3 new features

    1. 1. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.1
    2. 2. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.2 Oracle SQL Developer Data Modeler 3.3/4.0 New Features Philip Stoyanov Senior Software Development Manager
    3. 3. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.3 Legal 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.
    4. 4. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.4 Agenda  Search, report and edit  References between relational models  Logical model – surrogate keys, relationships  Logical model – sub-typing
    5. 5. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.5 Agenda  DDL Generation - demo  DB Synchronization - demo  View definitions and Query Builder - demo  Next generation of Oracle Database – identity column  Next generation of Oracle Database - masking  Q/A
    6. 6. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.6 Search functionality – simple search Simple and Advanced search : Simple search: • Just type the word you are looking for and all searchable properties of all objects are checked for match; dynamic properties are also checked • Content of the property is checked, if property is another object (Domain, Structured type, …) then the name of that object is checked • The name of the property is checked if content is “true”, “yes”, “y” – using “partit” as search pattern on physical model will return all partitioned tables • Search could be triggered in two ways – set in preferences; could be slow for large and complete designs
    7. 7. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.7 Search functionality – advanced search Advanced search: • Narrowed to specific object type and properties • AND/OR expressions can be constructed • Available at model level Regular expressions can be used in both modes
    8. 8. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.8 Search functionality – global search Global search: • Spans all open designs and models • Only simple search is available • Located at top right corner in standalone version • Available through menu “View>Data Modeler>Global Search” in SQL Developer (with DM 3.3)
    9. 9. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.9 Search functionality – global search
    10. 10. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.10 Search functionality – model level Model level search:  Searches through the whole model not just current diagram  For relational model – searches through all open physical models  Activated using “Find” icon on tool bar (or Ctrl-F on diagram) or “Find” in context menu for the model in browser  Advanced mode can be used to search on specific properties
    11. 11. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.11 Search functionality – result  Search result(model level) can be pinned, another window will appear on next search  Search conditions can be saved and reused later  Search result can be filtered by model (in global search) and object type  Double click on a row in search result will bring up properties editor for that object  Selecting a row in result list will show diagrams where that object (or its container) is used – double click on diagram will focus on object on that diagram  Filtering on model and object type will unlock another functionality – “Properties” (setting common properties on objects) and “Reports”
    12. 12. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.12 Search functionality – result
    13. 13. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.13 Search functionality – setting common properties  “Old Value” shows if there are common properties set, empty otherwise  Three types of data – String (text), boolean (true/false) and object (domain, schema/user, tablespace …) – additional dialog appear to select related object  More than one properties can be set at once  Data type can be only one of domain, logical type, distinct type, structured type or collection type
    14. 14. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.14 Search functionality – setting common properties
    15. 15. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.15 Search functionality – custom reports  Custom reports can contain only one type of objects – columns, tables, entities, sequences… ; this is the reason they are available only when search result is filtered by model and object type  Report templates can be created for each type of object  Optimization on boolean values – true and false can be replaced with provided constants  Supported formats – HTML, PDF, RTF and Excel (XLS, XLSX)  Standard report can be generated on search result if there is a standard report for objects in search result
    16. 16. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.16 Search functionality – custom reports, templates  Up to 30 properties can be included, properties in red are read-only, those in blue could be read-only when edited in Excel  Order of columns and custom names can be set  Sort order can be defined – by Entity and Name in example  Column width is for HTML reports
    17. 17. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.17 Search functionality – custom reports
    18. 18. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.18 Search functionality – custom reports, Excel file  Reports in XLS and XLSX format can be edited in Excel  Read-only properties will remain read-only in Excel  Properties that represent object (in blue in template – domain, schema/user, tablespace …) will be presented with look up field
    19. 19. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.19 Search functionality – custom reports, Excel file  Updated Excel file can be returned back to the source model – context menu for the model in browser  Verification that file is for the same model  Log will be generated for updates done during import  Be aware that changes in data type of FK column/attribute won’t be applied because they inherit data type from referred column/attribute
    20. 20. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.20 Engineering to relational model – surrogate keys  Default settings in preferences used when new entity or relationship is created  Can be reset in entity/relationship dialog  Can be set on group of entities using search and set common properties functionality  Table will get surrogate primary key in following cases: – Set to related entity – Set to relationship to use surrogate key – Entity doesn’t have PK and relationship is referring that entity
    21. 21. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.21 Engineering to relational model – surrogate keys  Default data type for surrogate key column is logical data type Numeric without precision set. Precision can be set in preferences or domain can be set to be used as column data type
    22. 22. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.22 Relationships  Can be bound to specific unique identifier  Or set to use surrogate key – FK attributes are not maintained in this case  Added “transferable” property to each relationship end  Delete rule is transferred to foreign key in relational model as it’s set
    23. 23. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.23 Relationships, attributes  M:N relationship – attributes become columns of intersection table  1:N relationship attributes become columns of child table; for optional relationship - additional constraint is required to assure proper existence of these columns; mandatory attributes will be transformed into optional columns
    24. 24. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.24 Relationships, attributes  Dependent columns constraint is created for start_date column; definition is also manageable in column dialog
    25. 25. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.25 Foreign key, DDL for dependent columns constraint – DM 4.0  ALTER TABLE employee ADD CHECK  (  ( department_department_ID IS NULL AND start_date IS NULL) OR  (  department_department_ID IS NOT NULL AND start_date IS NOT NULL  )  )  ;
    26. 26. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.26 Logical model – sub-typing and engineering to RM  Setting of engineering strategy in entity dialog is removed – “engineering strategy” property is not used any more.  “Engineer to” property is used to define which entity from hierarchy will be transformed to table.
    27. 27. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.27 Logical model – sub-typing and engineering to RM  New page is added to entity dialog with 3 sections: – for quick reset of “engineer to“ property of current edited entity and its subtypes; – for subtypes implementation; – settings related to generation of discriminator column;
    28. 28. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.28 Logical model – sub-typing and engineering to RM “Sub-tree generation” has 4 options:  “Do not preset” – “engineer to” property won’t be changed when apply /ok button is pressed  “Single” table” – “engineer to” property of current entity will be set to selected and it’ll be cleared for all subtypes in current entity sub tree  "Table per child” - only leaves entities in current sub tree will be selected for engineering, ‘engineer to” property for other entities will be cleared  “Table for each entity” – all entities in current sub tree will be selected for engineering “Apply to model” - allow changes to “engineer to” property to be applied for all relational models or to specific model
    29. 29. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.29 Logical model – sub-typing and engineering to RM Subtypes implementation - defines additional details on implementation of entity hierarchy References:  None - no foreign keys are created between tables  Arc implementation - optional foreign keys (in arc ) from super-type to subtypes are created. Arc is mandatory if subtypes hierarchy is complete
    30. 30. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.30 Logical model – sub-typing and engineering to RM References: Identifying - identifying foreign keys are created from subtypes tables to super- type table.  Reverse arc is created showing that record in only one child table can exist for each record in super-type table.  Arc is mandatory if subtypes hierarchy is complete
    31. 31. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.31 Logical model – sub-typing and engineering to RM Mixed settings for references
    32. 32. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.32 Logical model – sub-typing and engineering to RM Discriminator column related settings  “Generate discriminator” - Discriminator column is generated if property is set  “Use attribute” - Allow existing attribute to be set to use as discriminator column  “Column name” - Defines the name of generated discriminator column. Name template is used if name is not set Not used if discriminator attribute is set.  “Discriminator value” - Defines the value that is related to current entity and can exist in discriminator column. Entity short name or entity name is used if not defined  “Complete subtypes” - Defines the list of subtypes as complete. Has impact on generated arcs and list of possible values for discriminator column. If the list of subtypes is not complete then optional arcs are generated and value for current entity is included in permitted list of values for discriminator column.
    33. 33. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.33 Entity hierarchy – single table implementation  Mandatory attributes in sub-types become optional columns, existence dependency constraint is generated in addition to LOV constraint generated for discriminator column
    34. 34. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.34 Table – LOV constraint ALTER TABLE TITLE ADD CONSTRAINT CH_INH_TTE CHECK ( TTE_TYPE IN ('MO', 'OF', 'ON’) ) ;
    35. 35. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.35 Table - existence dependency constraint, “single statement” level of DDL  ALTER TABLE TITLE  ADD CONSTRAINT TTE_ExDep  CHECK ( (TTE_TYPE = 'MO' AND offg_oflg1 IS NULL AND GME_CATEGORY IS NULL AND GME_MEDIUM IS NULL AND GME_MINIMUM_MEMORY IS NULL AND onlg_og1 IS NULL AND MVE_CATEGORY IS NOT NULL AND MVE_DURATION IS NOT NULL AND MVE_MONOCHROME IS NOT NULL)  OR (TTE_TYPE = 'OF' AND GME_CATEGORY IS NOT NULL AND GME_MEDIUM IS NOT NULL AND onlg_og1 IS NULL AND MVE_CATEGORY IS NULL AND MVE_AGE_RATING IS NULL AND MVE_DURATION IS NULL AND MVE_MONOCHROME IS NULL AND MVE_AUDIO IS NULL AND MVE_PREVIEW IS NULL)  OR (TTE_TYPE = 'ON' AND offg_oflg1 IS NULL AND GME_CATEGORY IS NOT NULL AND GME_MEDIUM IS NOT NULL AND MVE_CATEGORY IS NULL AND MVE_AGE_RATING IS NULL AND MVE_DURATION IS NULL AND MVE_MONOCHROME IS NULL AND MVE_AUDIO IS NULL AND MVE_PREVIEW IS NULL)) ;
    36. 36. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.36 Table - existence dependency constraint Three levels of generation:  Single statement- difficult to find what is wrong if constraint is violated (DDL on previous page)  Discriminator value  Column
    37. 37. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.37 Table - existence dependency constraint, “column” level of DDL  ALTER TABLE TITLE  ADD CONSTRAINT TTE_ExDep1  CHECK ( TTE_TYPE != 'MO' OR offg_oflg1 IS NULL )  ;  ALTER TABLE TITLE  ADD CONSTRAINT TTE_ExDep2  CHECK ( TTE_TYPE != 'MO' OR GME_CATEGORY IS NULL )  ;  …………..  ALTER TABLE TITLE  ADD CONSTRAINT TTE_ExDep26  CHECK ( TTE_TYPE != 'ON' OR MVE_PREVIEW IS NULL )
    38. 38. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.38 Table - existence dependency constraint, “discriminator value” level of DDL ALTER TABLE TITLE  ADD CONSTRAINT TTE_ExDep1  CHECK ( TTE_TYPE != 'MO'  OR ( offg_oflg1 IS NULL AND GME_CATEGORY IS NULL AND GME_MEDIUM IS NULL AND GME_MINIMUM_MEMORY IS NULL AND onlg_og1 IS NULL AND MVE_CATEGORY IS NOT NULL AND MVE_DURATION IS NOT NULL AND MVE_MONOCHROME IS NOT NULL)) ;  ALTER TABLE TITLE  ADD CONSTRAINT TTE_ExDep2  CHECK ( TTE_TYPE != 'OF'  OR ( GME_CATEGORY IS NOT NULL AND GME_MEDIUM IS NOT NULL AND onlg_og1 IS NULL AND MVE_CATEGORY IS NULL AND MVE_AGE_RATING IS NULL AND MVE_DURATION IS NULL AND MVE_MONOCHROME IS NULL AND MVE_AUDIO IS NULL AND MVE_PREVIEW IS NULL)) ;  ALTER TABLE TITLE  ADD CONSTRAINT TTE_ExDep3  CHECK ( TTE_TYPE != 'ON'  OR ( offg_oflg1 IS NULL AND GME_CATEGORY IS NOT NULL AND GME_MEDIUM IS NOT NULL AND MVE_CATEGORY IS NULL AND MVE_AGE_RATING IS NULL AND MVE_DURATION IS NULL AND MVE_MONOCHROME IS NULL AND MVE_AUDIO IS NULL AND MVE_PREVIEW IS NULL)) ;
    39. 39. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.39 Next generation of Oracle Database – identity column  DM supports identity (auto increment) columns in Oracle Database 11g through usage of sequence and trigger and that’s a viable option. Native support for identity column at database side just brings another option to consider  DM 4.0 will provide enough options to utilize new features of Oracle Database or stay with sequence trigger approach
    40. 40. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.40 Next generation of Oracle Database – identity column, Trigger – that’s the approach used before DM 4.0 CREATE TABLE Course ( Course_ID NUMBER NOT NULL ) ; ALTER TABLE Course ADD CONSTRAINT Course_PK PRIMARY KEY ( Course_ID ) ; CREATE SEQUENCE Course_Course_ID_SEQ START WITH 1 NOCACHE ORDER ; CREATE OR REPLACE TRIGGER Course_Course_ID_TRG BEFORE INSERT ON Course FOR EACH ROW WHEN (NEW.Course_ID IS NULL) BEGIN :NEW.Course_ID := Course_Course_ID_SEQ.NEXTVAL; END; /
    41. 41. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.41 Next generation of Oracle Database – identity column – identity clause CREATE TABLE Course ( Course_ID NUMBER GENERATED BY DEFAULT AS IDENTITY ( START WITH 1 NOCACHE ORDER ) NOT NULL ) ; ALTER TABLE Course ADD CONSTRAINT Course_PK PRIMARY KEY ( Course_ID ) ;
    42. 42. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.42 Next generation of Oracle Database – identity column, default clause CREATE SEQUENCE Course_Course_ID_SEQ START WITH 1 NOCACHE ORDER ; CREATE TABLE Course ( Course_ID NUMBER DEFAULT Course_Course_ID_SEQ.NEXTVAL NOT NULL ) ; ALTER TABLE Course ADD CONSTRAINT Course_PK PRIMARY KEY ( Course_ID ) ;
    43. 43. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.43 Who’s looking at my sensitive data?
    44. 44. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.44 Next generation of Oracle Database - masking DM 4.0 will support 2 way of masking extending current support for defining and visualizing of sensitive data  REDACTION policies - each redaction policy can operate only over one table providing masking definition(s) and condition when it's applied for one or more columns belonging to that table.  TSDP (Transparent Sensitive Data Protection) policies - TSDP policy can protect multiple columns belonging to multiple tables, and more than one TSDP policies can be used to protect columns belonging to one table. However it's important to note that TSDP policies are implemented using Redaction policies and therefore it's not possible to have Redaction policy and TSDP policy protecting one and the same table.  Implementation on both approaches starts with masking templates
    45. 45. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.45 Redaction  Enables to mask (redact) data that is returned from the queries issued by low privileged users or application  Part of Oracle data security  Real-time  works well in dynamic production environment  All referential-integrity of back-end data is preserved during the redaction process  Different masking styles through different policies  To comply with industry regulations  Payment Card Industry Data Security Standard (PCI-DSS)  Sarbanes-Oxley Act
    46. 46. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.46 Oracle Data Redaction Partial Before After
    47. 47. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.47 Masking Templates  Masking templates for Character, Numeric and Date columns can be defined  “Tools>Masking Templates Administration”  Used in Redaction and TSDP policies
    48. 48. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.48 Redaction policy  Definition of masking type and masking template at column level  Only masking template related to column data type (Character, Numeric and Date) are available for particular column
    49. 49. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.49 Redaction policy
    50. 50. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.50 TSDP policy Following steps are required 1. Templates 2. To create sensitive type - sensitive types appear as kind of classification for associated with them columns. Sensitive types are not "sensitive" to data type of columns associated to them. 3. Associate columns to sensitive type – directly from sensitive type dialog or through domain defined as “sensitive” 4. To create TSDP policy 5. Associate sensitive types to TSDP policy Templates, Sensitive types and TSDP policies can be used in all designs
    51. 51. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.51 TSDP policy, sensitive type  Can be created in the browser
    52. 52. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.52 TSDP policy, sensitive type
    53. 53. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.53 TSDP policy, sensitive domain  Domain can be associated with “sensitive type” and later assigned to columns/attributes
    54. 54. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.54 TSDP policy, create
    55. 55. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.55 TSDP policy, sub-policies  It’s a collection of sub-policies – can be restricted to specific schema, table, data type
    56. 56. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.56 TSDP policy, sensitive types
    57. 57. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.57 Learn More..  SQL Developer Data Modeler on OTN - http://www.oracle.com/technetwork/developer-tools/datamodeler  SQL Developer Data Modeler forum https://forums.oracle.com/forums/forum.jspa?forumID=1317  Oracle Learning Library http://apex.oracle.com/pls/apex/f?p=44785:2:0:FORCE_QUERY::2,RIR ,CIR:P2_TAGS:Data%20Modeler  Jeff Smith http://www.thatjeffsmith.com/  Ashley Chen http://oracletoolsgirl.blogspot.co.uk/  Kris Rice http://krisrice.blogspot.co.uk/
    58. 58. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.58
    59. 59. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.59

    ×