Your SlideShare is downloading. ×
Schema webinar
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Schema webinar

1,629
views

Published on

Schema 101 Webinar

Schema 101 Webinar

Published in: Technology

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

  • Be the first to like this

No Downloads
Views
Total Views
1,629
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • I am the VP of productsWorking in Clarify for 15 years2 years as a customer, 4 years at Clarify as a Principal Consultant, 9 years here at DovetailI love sharing my knowledge of all things ClarifyMy blog at dovetailsoftware.comI actively participate in the Clarify forum on IT Toolbox
  • For the Clarify schema, we’re really talking about the 2nd: “data about the containers of data”
  • Clarify used to refer to tables as Objects. Fine in 1990. Not so good when we got into OO development.
  • Case_creation_time = non-unique, performance indexcase_index = id_number (case object).name_index = first_name:last_name:phone (contact object).Typically only unique indexes which affect application behavior are stored in ADP. Not perf indexes.
  • It is used internally by the Clarify meta data.It is also used by some database objects to describe which object is being referenced (prop_name).Clarify uses object numbers in the range 0 - 429, and 5000 - 9999.The range of legal numbers for customer-defined objects is 430 - 511, and 2000 - 4999.POMS orders table access in transactions using the object number in order to prevent deadlocks. Always access the condition object first.
  • GUID – are present in newer Amdocs versions, such as 7.5GUID = Globally unique identifierGUIDS arent actually globally unique in Amdocs. Blurg.
  • Views can provide advantages over tables:Views can represent a subset of the data contained in a tableViews can join and simplify multiple tables into a single virtual tableViews can act as aggregated tables, where the database engine aggregates data (sum, average etc.) and presents the calculated results as part of the dataViews can hide the complexity of data; for example a view could appear as Sales2000 or Sales2001, transparently partitioning the actual underlying tableViews take very little space to store; the database contains only the definition of a view, not a copy of all the data it presentsDepending on the SQL engine used, views can provide extra securityViews can limit the degree of exposure of a table or tables to the outer worldhttp://en.wikipedia.org/wiki/Database_view
  • Why? Reporting, interfaces, debugging
  • Db admin tool – shows you the physical, but not the ADP infoData Dictionary Guide is out of dateSchema file is difficult to navigate Report – may or may not be currentDovetail XML file – good for computers – not for humansBOLT is the clear winner here. And it’s free!
  • ADP ERD
  • Account manager ERD
  • There’s other minor stuff:Drop/create/grant csp_get_{table} stored procedureMay need to initialize the column
  • Still have to use a schema file for many changes (add a join, add a table, add a relation)
  • Command line = good for automationI’ve seen some versions where db errors bubble up as “(null) (null)”
  • differences in actual processing and results between DDE and ddcomp
  • Command line = good for automationMore efficient than ddcomp
  • Command line = good for automationschemaEditor files are all written as valid XML. This means that industry standard tools and editors can be used for editing these files. Dovetail provides XSD (XML Schema Definition) files, which allows schema files to be validated for proper syntax before any database connection is even made. In addition, XSD files can be used with XML editors to provide intellisense, making editing schema files easy for developers. All of this results in improved developer productivity.
  • Let me give you a couple specific examples
  • Only necessary changes to the database are applied, and changes are made using native syntax that is optimal for the database platform in use. As an example of this, when adding a column using other tools, a temp table is often created, all of the data is moved to this temp table, the original table is dropped, then re-created with the new column, the data is copied back into the new table, and then the temp table is dropped. All of this is highly inefficient and can require substantial storage for all of the moving around of the data. SchemaEditor simply performs an “alter table” command, which adds a new column in-place, without moving data. This results in quicker changes, less downtime, and fewer concerns about running out of space in your database.Index PreservationA common issue with other schema-editing tools is their unanticipated side effects. For example, it’s common that database indexes are mysteriously dropped when making schema changes. In most cases, this isn’t known or discovered until users report poor performance from the application, and forces developers to investigate. All of this results in wasted time and productivity. Dovetail SchemaEditor preserves existing indexes, eliminating this wasteful scenario.
  • I’ll show an example using schemascript
  • SchemaScript is a capability only found in Dovetail SchemaEditor. SchemaScript is a simple, imperative way of specifying the changes to be made to the database schema. A complete Clarify schema file, because of its size and complexity, can quickly become unwieldy and cumbersome to work with. SchemaScript simplifies the process of schema changes by allowing a user to specify only the changes to be made, as opposed to the complete schema.The simple, intuitive style of SchemaScript improves developer productivity and reduces the time to craft schema edits.
  • Break to demo here
  • Restore point: DB backup, point-in-time recovery, flashback recovery, etc. Your DBA should be able to offer guidance as to the easiest/quickest way to get you back to that point.
  • This becomes important for Clarify upgrades.Fields, Relations, TablesIt also is useful to “extract” custom schema. Reverse SchemaScript.
  • Generic Field IDs are something we’ll cover in Schema 201Discuss: just last week, ran into a customer’s schema that had a custom table w/out an objid column. Not good.
  • Lets checkpoint where we are
  • Thanks!
  • Transcript

    • 1. Clarify & DovetailSchema 101
      a webinar
      presented by garysherman
      May 17, 2011
    • 2. Me
      dovetailsoftware.com/blog/gsherman
    • 3. Topics
      Schema Concepts
      Viewing your Schema
      Editing Your Schema
      Tools
      Schema Customization
      Tips
      Q&A
    • 4. Schema concepts
    • 5. Data Model
      A data model explicitly determines the structure of data or structured data.
      http://en.wikipedia.org/wiki/Data_model
    • 6. In Clarify, we use the term Data Model or Schema to refer to the definition of our database structure.
    • 7. Database Structures
      Tables (Objects)
      Fields (Columns)
      Relations
      Indexes
      Views
      View Fields
      Joins
    • 8. Metadata
      “data about data”
      OR
      “data about the containers of data”
      http://en.wikipedia.org/wiki/Metadata#Database_management
    • 9. Database Metadata
      Each relational database system has its own mechanisms for storing metadata.
      Examples of relational-database metadata include:
      Tables of all tables in a database, their names, sizes and number of rows in each table.
      Tables of columns in each database, what tables they are used in, and the type of data stored in each column.
      http://en.wikipedia.org/wiki/Metadata#Database_management
    • 10. ADP (ADaPter) Layer
      Metadata defining the Clarify schema
      Set of tables in the Clarify database which contain “data about the containers of data”
      These table names all start with adp_
    • 11. ADP Data Used by
      Clarify applications
      Clarify Client
      UI Editor
      CB Toolkit
      cbbatch

      Clarify / Amdocs APIs
      C APIs
      ClearBasic
      CBOs (Clarify Business Objects)
    • 12. ADP Data Used by
      Dovetail SDK
      Dovetail Applications
      Agent
      Mobile
      Rulemanager
      Seeker

    • 13. Database structures and ADP data must remain in sync!
      This is why we need schema editing tools.We’ll get into tools in just a bit.
    • 14. Database Structures
    • 15. Tables
      A Table
      is an entity encompassing a single concept
      Has many fields (columns)
      which are the attributes of the entity
      Can have one or more relations
      which link entities together
    • 16. Table Indexes
      A Table
      Can have one or more indexes
      which improve database performance
      or defines uniqueness
      Note: Not all indexes are stored in the ADP tables.
    • 17. Table - IDs
      A Table
      Has a unique id number
    • 18. Table - Rows
      Each row in a table
      Has a unique key (objid). Unique within table.
      May also have a GUID.
    • 19. Views
      A View
      is an “virtual table” composed of the result set of a query
      Has many view fields (view columns)
      which contain data from the table used in the query
      Can have one or more joins
      which combines rows from two tables
    • 20. Theory is nice, but…
      In theory, the complexity and actual implementation of the schema is abstracted away from you.
      But, in reality – you’re gonna want to understand how it all works.
    • 21. Viewing your schema
    • 22. Viewing your schema
      Database vendor tools (not so great)
      Clarify Data Dictionary Guide
      Clarify Data Models Doc (ERDs)
      Clarify schema file (.sch or .xml)
      Report that generates a Data Dictionary Guide
      Dovetail schema file (xml)
      Dovetail BOLT
    • 23. ERDs
      Entity-Relationship Diagrams can be useful.
    • 24. Some ERDs are OK…
    • 25. …some will hurt your eyes
    • 26. Dovetail BOLT
      A better way.
      Web application for real-time viewing of your schema.
      Never out of date
      Includes your customizations
    • 27. Let’s take a quick look at BOLT
    • 28. “I gotta get me some of that BOLT goodness”
      Download for free: http://bit.ly/getBOLT
    • 29. EDITING your schema
    • 30. Why do I need a schema tool?
      Recall from earlier:
      Database structures and ADP data must remain in sync!
      So we need a tool that will do the right thing, and keep both in sync.
    • 31. When adding a new column to table:
      Physical ChangeAdd column to table
      Metadata ChangeAdd data to ADP
    • 32. Schema Editing Tools
      Clarify DD Editor (Data Dictionary Editor)
      Clarify ddcomp (Data Dictionary Compiler)
      Amdocs Schema Manager
      Dovetail SchemaEditor
    • 33. Clarify DD Editor (DDE)
      User Interface – which some people like
      Big differences depending on Clarify version
    • 34. Clarify DD Editor (DDE)
      Older versions
      add a new column or view column using UI
      else, edit schema file, apply using DDE
      Later versions
      really just a UI wrapper for ddcomp
    • 35. Clarify DD Editor (DDE)
      Not very good at telling you specifics if something is wrong
      Invalid syntax in schema file
      Validation step failed during database validation
      Error occurred when applying changes
    • 36. Clarify ddcomp
      ddcomp is a command line application
      Have to use a schema file
      Better at reporting syntax errors
      Better at reporting database errors (sometimes)
    • 37. ddcomp vs. DD Editor
      My recommendation:
      use ddcomp rather than DD Editor
    • 38. Amdocs Schema Manager
      Introduced in Amdocs 6 (Clarify 13)
      Command line, Java application
      Replaces ddcomp
      Requires CBO (Clarify Business Objects)
      Schema files are XML
    • 39. Dovetail SchemaEditor
      Command line, .NET application
      Works with any Clarify version
      Schema files are XML
      Intellisense & Validation for your schema files
      User_Defined is the default
    • 40. Dovetail SchemaEditor
      Faster
      “I have used both the Dovetail SchemaEditor and Amdocs SchemaManager to add one new field to the schema.
      Using our test database, Dovetail SchemaEditor took 5 minutes to complete, and Amdocs SchemaManager took 50 minutes.”
      - KS, Micros Systems
    • 41. Dovetail SchemaEditor
      Faster
    • 42. Dovetail SchemaEditor
      Faster
      Actual customer stats (Micros Systems)
    • 43. Dovetail SchemaEditor
      Faster
      Actual customer stats
    • 44. Dovetail SchemaEditor
      Why is it Faster?
      It doesn’t do unnecessary work.
    • 45. Add a new column to table_case
      OMG!
    • 46. Dovetail SchemaEditor
      Schema Files
      Data Dictionary – complete schema
      SchemaScript – just the changes you want to make
    • 47. SchemaScript
      <schemaScriptxmlns="http://www.dovetailsoftware.com/2006/10/SchemaScript.xsd">
      <addColumnname="x_test" table="case" dataType="Integer" />
      </schemaScript>
      This is a completeschemascript file
    • 48. Customizing Your Schema
      SchemaScript in Action
    • 49. Let customize with Dovetail SchemaEditor and SchemaScript
    • 50. Tips
    • 51. A few big ones
      Give yourself a restore point!
      Preview changes before apply!
      Dev, then test, then production!
    • 52. Table/View IDs
      The valid range for new table and view ids is 430-571 and 2000-4999.
      This prevents any conflicts with existing or future Clarify defined id numbers.
      How do I know which ones are in use?BOLT will tell you: http://localhost/bolt/schema_id_info.asp
    • 53. Custom Fields
      Use of x_ prefix
      My $0.02:
      Use x_prefix for custom fields on baseline tables
      I don’t use x_ when adding custom view columns
      I don’t use x_ for custom table names, but I do tend to use a customer/company prefix
    • 54. Generating a Clarify Schema File
      Can’t generate a schema file using ddcomp
      Can use DD Editor(but you’ve probably already figured out I don’t like DD Editor)
      Use dataex
      dataex –gen_sc MySchema.sch
    • 55. Mark your custom schema as User Defined
      Clarify ddcomp (.SCH):
      USER_DEFINED
      Amdocs SchemaManager (XML):
      baseline = "false"
      Dovetail SchmaEditor (XML):
      isUserDefined = "true"
      This is the default
    • 56. Schema Files
      Use source code control for your schema files!
    • 57. SchemaEditor Reports
      Check in your scripts & reports
      Great for auditing & compliance
      SchemaDifferenceReport.txt:
      Dovetail SchemaEditor Difference Report
      ----------------------------------------------------------------
      Date: 2011-03-29 17:40:51
      Action: Apply
      User: fcsgary
      Database Name: dovetail
      Input File: TestChanges.SchemaScript.xml
      ----------------------------------------------------------------
      Changed schema
      Changed table "case"
      Added column "x_test" with type "Integer"
    • 58. Indexes
      Performance Indexes should be part of dbtune.sql – not the schema
    • 59. Custom Tables
      All objects are required to have an OBJID field, with GEN_FIELD_ID=3.
    • 60. Additional Tips – Clarify schema files
      Customer Fields must appear after all Clarify Fields for that object.
      Do NOT swap around ordering of existing fields and relations in an object.
      Define custom tables and views at the end of the schema file.
    • 61. Additional Tips – Clarify schema files
      Customer Relations must appear after all Clarify Relations for that object.
      All relations must have corresponding inverse relation on the target object.
      All inverse relations on a target object must be defined with the appropriate inverse cardinality.
    • 62. </tips>
    • 63. presentation
      demonstration
      postlude
      q & a
      drink beer
    • 64. Postlude
      More Info on Dovetail SchemaEditor
      http://dovetal.es/dtSchema
      More Info (and free download) for Dovetail BOLT
      http://dovetal.es/dtBolt
      Feel free to contact me:
      gary@dovetailsoftware.com
      dovetailsoftware.com/blog/gsherman
      512-610-5466
      @gsherman
      These slides
      will be available on my blog at dovetailsoftware.com
    • 65. Interested in Schema 201?
      I’m considering doing a Schema 201 webinar
      Interested? Please let me know.
    • 74. Questions, Comments, Queries?
      Use the Q&A widget within WebEx
    • 75. </WEBINAR>