Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Clarify & DovetailSchema 101<br />a webinar<br />presented by garysherman<br />May 17, 2011<br />
Me<br />dovetailsoftware.com/blog/gsherman<br />
Topics<br />Schema Concepts<br />Viewing your Schema<br />Editing Your Schema<br />Tools<br />Schema Customization<br />Ti...
Schema concepts<br />
Data Model<br />A data model explicitly determines the structure of data or structured data.<br />http://en.wikipedia.org/...
In Clarify, we use the term Data Model or Schema to refer to the definition of our database structure.<br />
Database Structures<br />Tables (Objects)<br />Fields (Columns)<br />Relations<br />Indexes<br />Views<br />	View Fields<b...
Metadata<br />“data about data”<br />OR<br />“data about the containers of data”<br />http://en.wikipedia.org/wiki/Metadat...
Database Metadata<br />Each relational database system has its own mechanisms for storing metadata. <br />Examples of rela...
ADP (ADaPter) Layer<br />Metadata defining the Clarify schema<br />Set of tables in the Clarify database which contain “da...
ADP Data Used by<br />Clarify applications<br />Clarify Client<br />UI Editor<br />CB Toolkit<br />cbbatch<br />…<br />Cla...
ADP Data Used by<br />Dovetail SDK<br />Dovetail Applications<br />	Agent<br />	Mobile<br />	Rulemanager<br />	Seeker<br /...
Database structures and ADP data must remain in sync!<br />This is why we need schema editing tools.We’ll get into tools i...
Database Structures<br />
Tables<br />A Table<br />	is an entity encompassing a single concept<br />Has many fields (columns)<br />	which are the at...
Table Indexes<br />A Table<br />Can have one or more indexes<br />	which improve database performance<br />	or defines uni...
Table - IDs<br />A Table<br />	Has a unique id number<br />
Table - Rows<br />Each row in a table<br />	Has a unique key (objid). Unique within table.<br />	May also have a GUID.<br />
Views<br />A View<br />	is an “virtual table” composed of the result set of a query<br />Has many view fields (view column...
Theory is nice, but…<br />In theory, the complexity and actual implementation of the schema is abstracted away from you. <...
Viewing your schema<br />
Viewing your schema<br />Database vendor tools (not so great)<br />Clarify Data Dictionary Guide<br />Clarify Data Models ...
ERDs<br />Entity-Relationship Diagrams can be useful.<br />
Some ERDs are OK…<br />
…some will hurt your eyes<br />
Dovetail BOLT<br />A better way.<br />Web application for real-time viewing of your schema.<br />Never out of date<br />In...
Let’s take a quick look at BOLT<br />
“I gotta get me some of that BOLT goodness”<br />Download for free: http://bit.ly/getBOLT<br />
EDITING your schema<br />
Why do I need a schema tool?<br />Recall from earlier:<br />	Database structures and ADP data must remain in sync!<br />So...
When adding a new column to  table:<br />Physical ChangeAdd column to table<br />Metadata ChangeAdd data to ADP<br />
Schema Editing Tools<br />Clarify DD Editor (Data Dictionary Editor)<br />Clarify ddcomp (Data Dictionary Compiler)<br />A...
Clarify DD Editor (DDE)<br />User Interface – which some people like<br />Big differences depending on Clarify version<br />
Clarify DD Editor (DDE)<br />Older versions<br />	add a new column or view column using UI<br />	else, edit schema file, a...
Clarify DD Editor (DDE)<br />Not very good at telling you specifics if something is wrong<br />Invalid syntax in schema fi...
Clarify ddcomp<br />ddcomp is a command line application<br />Have to use a schema file<br />Better at reporting syntax er...
ddcomp vs. DD Editor<br />My recommendation: <br />	use ddcomp rather than DD Editor<br />
Amdocs Schema Manager<br />Introduced in Amdocs 6 (Clarify 13)<br />Command line, Java application<br />Replaces ddcomp<br...
Dovetail SchemaEditor<br />Command line, .NET application<br />Works with any Clarify version<br />Schema files are XML<br...
Dovetail SchemaEditor<br />Faster<br />“I have used both the Dovetail SchemaEditor and Amdocs SchemaManager to add one new...
Dovetail SchemaEditor<br />Faster<br />
Dovetail SchemaEditor<br />Faster<br />Actual customer stats (Micros Systems)<br />
Dovetail SchemaEditor<br />Faster<br />Actual customer stats<br />
Dovetail SchemaEditor<br />Why is it Faster?<br />It doesn’t do unnecessary work.<br />
Add a new column to table_case<br />OMG!<br />
Dovetail SchemaEditor<br />Schema Files<br />Data Dictionary – complete schema<br />SchemaScript – just the changes you wa...
SchemaScript<br /><schemaScriptxmlns="http://www.dovetailsoftware.com/2006/10/SchemaScript.xsd"><br />  <addColumnname="x_...
Customizing Your Schema<br />SchemaScript in Action<br />
Let customize with Dovetail SchemaEditor and SchemaScript<br />
Tips<br />
A few big ones<br />Give yourself a restore point!<br />Preview changes before apply!<br />Dev, then test, then production...
Table/View IDs<br />The valid range for new table and view ids is 430-571 and 2000-4999. <br />This prevents any conflicts...
Custom Fields<br />Use of x_ prefix<br />My $0.02:<br />Use x_prefix for custom fields on baseline tables<br />I don’t use...
Generating a Clarify Schema File<br />Can’t generate a schema file using ddcomp<br />Can use DD Editor(but you’ve probably...
Mark your custom schema as User Defined<br />Clarify ddcomp (.SCH):<br />USER_DEFINED<br />Amdocs SchemaManager (XML):<br ...
Schema Files<br />Use source code control for your schema files!<br />
SchemaEditor Reports<br />Check in your scripts & reports<br />Great for auditing & compliance<br />SchemaDifferenceReport...
Indexes<br />Performance Indexes should be part of dbtune.sql – not the schema<br />
Custom Tables<br />All objects are required to have an OBJID field, with GEN_FIELD_ID=3.<br />
Additional Tips – Clarify schema files<br />Customer Fields must appear after all Clarify Fields for that object.<br />Do ...
Additional Tips – Clarify schema files<br />Customer Relations must appear after all Clarify Relations for that object.<br...
</tips><br />
presentation<br />demonstration<br />postlude<br />q & a<br />drink beer<br />
Postlude<br />More Info on Dovetail SchemaEditor<br />http://dovetal.es/dtSchema <br />More Info (and free download) for D...
Interested in Schema 201?<br />I’m considering doing a Schema 201 webinar<br /><ul><li>SQL Views
Database Flags
Upcoming SlideShare
Loading in …5
×

Schema webinar

2,308 views

Published on

Schema 101 Webinar

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Schema webinar

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

×