Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Model Base"

(DTP Model Base SQL Model/DBdefinition model/Query model)
 
(47 intermediate revisions by 4 users not shown)
Line 1: Line 1:
←[[Data Tools Platform Project | Back to DTP Main Page]]
+
{{Back To|name=DTP Main Page|href=Data Tools Platform Project}}
 +
 
 
==DTP Model Base Project Wiki==
 
==DTP Model Base Project Wiki==
 
'''What is the process to propose a change to SQLModel model?'''
 
'''What is the process to propose a change to SQLModel model?'''
Line 27: Line 28:
  
 
2. New SQL Model elements being considered (7/15/06) – SQL Catalog object
 
2. New SQL Model elements being considered (7/15/06) – SQL Catalog object
   a. Our goal is to evaluate both proposals by considering migration
+
    
 +
  Our goal is to evaluate both proposals by considering migration
 
       impact to existing models and SQL spec vs implementation.
 
       impact to existing models and SQL spec vs implementation.
   b. Proposal 1:
+
 
       [[Image:migration1.jpg]]
+
   <s>strike Proposal 1:</s>
 +
     
 +
       [[Image:Pic27606.jpg]]
 +
       
 +
      <s>strike (WTP existing adopter has to incorporate following changes
 +
      in their code):
 +
  old:
 +
      database.getSchema()
 +
      schema.setDatabase(database)
 +
  new:
 +
      ((NonCatalogDatabase)database).getSchema()
 +
      schema.setCatalog((NonCatalogDatabase)database) or
 +
      ((NonCatalogSchema)schema).setDatabase(database)</s>
 
   
 
   
   c. Proposal 2:
+
 
 +
   Proposal 2: '''''(Proposal accepted/implemented)'''''
 
       [[Image:migration2.jpg]]
 
       [[Image:migration2.jpg]]
 +
     
 +
  a. eliminates the need for migration, both at code and persisted resource
 +
      level, for  existing consumers of WTP as well as DTP by maintaining model
 +
      compatibility.
 +
     
 +
  b. introduces a Catalog element to address the need of vendors who support multiple
 +
      catalogs (Sybase, SQLServer).
 +
       
 +
  c. does not  compel vendors who do not support multiple catalogs (DB2, Oracle,
 +
        Informix, Derb, etc) to model the Catalog.
 +
       
 +
  d. for WTP consumers, the Database.getSchemas() method will be modified as follows:<span style="color:blue">
 +
      EList catalogList = database.getCatalogs();
 +
      if (!catalogList.isEmpty()) {
 +
        EList schemaList = new BasicEList();
 +
        Iterator catalogIter = catalogList.iterator();
 +
        while(catalogIter.hasNext()) {
 +
            Catalog currentCatalog = (Catalog)catalogIter.next();
 +
            schemaList.addAll(currentCatalog.getSchemas());
 +
        }
 +
        return schemaList ;
 +
      }
 +
      else {
 +
        // do what the Database.getSchemas() method does today
 +
      }</span>
 
3. OMG is also propose enhancement and changes on SQLModel as part of their plan to adopt SQLModel from DTP.
 
3. OMG is also propose enhancement and changes on SQLModel as part of their plan to adopt SQLModel from DTP.
  
Line 40: Line 80:
 
   a. Remove SQL 99 spec content from the UML model, replaced with just a
 
   a. Remove SQL 99 spec content from the UML model, replaced with just a
 
       reference.
 
       reference.
 +
 +
 +
----
 +
  
 
'''OMG SQLModel discussion 8/04/06'''
 
'''OMG SQLModel discussion 8/04/06'''
Line 75: Line 119:
 
|}
 
|}
  
 +
SQL Spec.
 
10.8 .......
 
10.8 .......
 +
 
3) If <constraint check time> is not specified, then INITIALLY IMMEDIATE is implicit.  
 
3) If <constraint check time> is not specified, then INITIALLY IMMEDIATE is implicit.  
 
4) Case:  
 
4) Case:  
Line 94: Line 140:
 
5. Table - What is the purpose for ReferenceType enum?
 
5. Table - What is the purpose for ReferenceType enum?
  
Attributes for ReferenceType  
+
''''Attributes for ReferenceType''''
Name Class Type Initial Value  
+
 
SYSTEM_GENERATED  
+
{| border="1" cellpadding="2"
ReferenceType  
+
!width="150"|Name
   
+
!width="150"|Class
USER_GENERATED  
+
!width="150"|Type
ReferenceType  
+
!width="150"|Initial Value
   
+
|-
DERIVED_SELF_REF  
+
|SYSTEM_GENERATED
ReferenceType  
+
|ReferenceType
 
+
|     
 +
|     
 +
|-
 +
|USER_GENERATED
 +
|ReferenceType
 +
|     
 +
|     
 +
|-
 +
|DERIVED_SELF_REF  
 +
|ReferenceType  
 +
|     
 +
|   
 +
|
 +
|}
 +
 +
 
 +
<ins>A table based on a UDT is called as a "typed" or "referenceable" table. in such a table, for every attribute definition of the UDT, there is a corresponding column definition. In addition, in a such a table, there is a extra column called as the "self-referencing" column. This is equivalent of OID in OO terminology.
 +
All typed tables have a self-referencing column. The ReferenceType enum describes the options for generating the values of the self-referencing column.</ins>
 +
 
 +
===DTP Model Base SQL Model/DBdefinition model/Query model===
 +
[http://www.eclipse.org/datatools/project_modelbase/ Link to the UML Models]
 +
 
 +
===ModelBase Plan for DTP V1.0===
 +
{| border="1" cellpadding="2"
 +
!width="250"|Task
 +
!width="150"|Resource
 +
!width="150"|Person Day
 +
|-
 +
|<del>Proposal to add Catalog SQL element
 +
|Alex/Hemant</del>
 +
|3     
 +
|-
 +
|Enhancement proposal from OMG
 +
|Alex/Hemant<span style="color:blue"> On going...</span>
 +
|10     
 +
|-
 +
|<del>SQL 99 Spec contents in UML model
 +
|Alex
 +
|0.5</del>     
 +
|-
 +
|Regen SQLModel/DBDefinition Model using Eclipse V3.2.x
 +
|Hemant <span style="color:blue"> Done for SQLModel - working on DBDefinition...</span>
 +
|2
 +
|-     
 +
|Single jarring SQLModel and Database Definition model.
 +
|Larry
 +
|2
 +
|-     
 +
|Public API
 +
|Larry/Der Ping
 +
|4
 +
|-
 +
|JUnit Testing
 +
|Der Ping/Neil <span style="color:blue"> Will start in the week of 10/02/06 </span>
 +
|5
 +
|-
 +
|}     
  
A table based on a UDT is called as a "typed" or "referenceable" table. in such a table, for every attribute definition of the UDT, there is a corresponding column definition. In addition, in a such a table, there is a extra column called as the "self-referencing" column. This is equivalent of OID in OO terminology.
 
All typed tables have a self-referencing column. The ReferenceType enum describes the options for generating the values of the self-referencing column.
 
  
 
===DTP Callisto Model Base Features===
 
===DTP Callisto Model Base Features===
 
[[Model Base Callisto Features | Discussion page for Callisto Model Base features]]
 
[[Model Base Callisto Features | Discussion page for Callisto Model Base features]]
 +
 +
 +
===Proposal for improvements to the Authorization & Access Control package of SQLModel===
 +
 +
The attached zip contains a document describing a proposal for improvements to the Authorization & Access Control package of SQLModel.
 +
 +
[[Media:Proposed_improvements_for_Authorization_&_Access_Control_package.zip]]
 +
 +
[[Category:Data Tools Platform]]
 +
 +
===DTP Model Base Ganymede===
 +
# '''Enhance SQLModel to support Collection (ARRAY and multiset)Dataypes.'''
 +
# '''Enhancing dbdefinition model and database vendor doc.''' - Migrate the enhancement in WTP V1.5.5
 +
# '''<s>Contribute Teradata vendor doc.</s>'''
 +
# '''Collaboration with OMG for SQLModel/Model base related change.'''
 +
# '''Respond to request for model change proposal.'''

Latest revision as of 20:57, 7 January 2008

Back to DTP Main Page


DTP Model Base Project Wiki

What is the process to propose a change to SQLModel model?

1. DTP model base committer accept proposals

     a. The proposal can be accepted as UML model or
     b. Direct editing using Eclipse Ecore model editor.
     c. Code or patches on top of existing SQLModel. - Optional

2. Public proposal review - Offer DTP-DEV a best/commonly accepted proposal.

3. Model base committer will change UML model and generate new EMF code for documentation purpose.

4. Making necessary code change in various DTP projects which is impacted by the change.

5. Build and testing.

6. Enhancing WTP to DTP migration guide to help WTP adopter to migrate to DTP.



SQLModel Migration guide from WTP to DTP

1. SQLModel Namespace changes from:

  org.eclipse.wst.rdb.models.sql - > org.eclipse.datatools.modelbase.sql

2. New SQL Model elements being considered (7/15/06) – SQL Catalog object

  Our goal is to evaluate both proposals by considering migration
     impact to existing models and SQL spec vs implementation.
  strike Proposal 1:
      
     Pic27606.jpg
       
     strike (WTP existing adopter has to incorporate following changes 
     in their code):
  old:
     database.getSchema()
     schema.setDatabase(database)
  new:
     ((NonCatalogDatabase)database).getSchema()
     schema.setCatalog((NonCatalogDatabase)database) or
     ((NonCatalogSchema)schema).setDatabase(database)

  Proposal 2: (Proposal accepted/implemented)
     Migration2.jpg
      
  a. eliminates the need for migration, both at code and persisted resource
     level, for   existing consumers of WTP as well as DTP by maintaining model
     compatibility.
     
  b. introduces a Catalog element to address the need of vendors who support multiple
      catalogs (Sybase, SQLServer).
        
  c. does not  compel vendors who do not support multiple catalogs (DB2, Oracle,
       Informix, Derb, etc) to model the Catalog.
        
  d. for WTP consumers, the Database.getSchemas() method will be modified as follows: 
     EList catalogList = database.getCatalogs();
     if (!catalogList.isEmpty()) {
        EList schemaList = new BasicEList();
        Iterator catalogIter = catalogList.iterator();
        while(catalogIter.hasNext()) {
            Catalog currentCatalog = (Catalog)catalogIter.next();
            schemaList.addAll(currentCatalog.getSchemas());
        }
        return schemaList ;
     }
     else {
        // do what the Database.getSchemas() method does today
     }

3. OMG is also propose enhancement and changes on SQLModel as part of their plan to adopt SQLModel from DTP.

4. Other changes which is already in WTP, will be in DTP when item #2 is finalized

  a. Remove SQL 99 spec content from the UML model, replaced with just a
     reference.




OMG SQLModel discussion 8/04/06

Following is a list of questions related to SQLModel which was discussed during our meeting today.

1. Table can have 0 column

EMF code generation does not enforce the cardinality. However it makes a difference when it comes to cloning, especially if the relationship is not a composition. We should have no issue for WTP migration to change the cardinality from 1..n to 0..n. since the Table-Column relationship is modeled as a containment.

2. Constraint is modeled as a enumerated value in CWM, unlike 3 attributes defined for Constraint object in DTP SQLModel. Attributes for Constraint

Name Class Type Initial Value
deferrable Constraint boolean
initiallyDeferred Constraint boolean false
enforced Constraint boolean true

SQL Spec. 10.8 .......

3) If <constraint check time> is not specified, then INITIALLY IMMEDIATE is implicit. 4) Case: a) If INITIALLY DEFERRED is specified, then: i) NOT DEFERRABLE shall not be specified. ii) If DEFERRABLE is not specified, then DEFERRABLE is implicit.

The only invalid combination is NOT DEFERRABLE INITIALLY DEFFERED. If needed, we can put a note in the model. I guess modeling as enum only helps eliminate checking for valid combinations by the end user application code. Btw in Oracle reference manual, both properties are modeled separately as well.

3. Question regarding why Trigger object in SQLModel need a timestamp attribute? And why a Trigger object can have 1..n SQLStatement? - Hemant's action item.

The trigger action body can be made up of group of statements. The end user application may decide to map the entire group of statements to one SQLModel SQL statement or to map each statement to its own SQLModel SQL statement.

Note: Some WTP adopted commercial product maps the entire group of statements to one SQLModel SQL statement.

4. User Defined Type - No issue after the short discussion.

5. Table - What is the purpose for ReferenceType enum?

'Attributes for ReferenceType'

Name Class Type Initial Value
SYSTEM_GENERATED ReferenceType
USER_GENERATED ReferenceType
DERIVED_SELF_REF ReferenceType


A table based on a UDT is called as a "typed" or "referenceable" table. in such a table, for every attribute definition of the UDT, there is a corresponding column definition. In addition, in a such a table, there is a extra column called as the "self-referencing" column. This is equivalent of OID in OO terminology. All typed tables have a self-referencing column. The ReferenceType enum describes the options for generating the values of the self-referencing column.

DTP Model Base SQL Model/DBdefinition model/Query model

Link to the UML Models

ModelBase Plan for DTP V1.0

Task Resource Person Day
Proposal to add Catalog SQL element Alex/Hemant 3
Enhancement proposal from OMG Alex/Hemant On going... 10
SQL 99 Spec contents in UML model Alex 0.5
Regen SQLModel/DBDefinition Model using Eclipse V3.2.x Hemant Done for SQLModel - working on DBDefinition... 2
Single jarring SQLModel and Database Definition model. Larry 2
Public API Larry/Der Ping 4
JUnit Testing Der Ping/Neil Will start in the week of 10/02/06 5


DTP Callisto Model Base Features

Discussion page for Callisto Model Base features


Proposal for improvements to the Authorization & Access Control package of SQLModel

The attached zip contains a document describing a proposal for improvements to the Authorization & Access Control package of SQLModel.

Media:Proposed_improvements_for_Authorization_&_Access_Control_package.zip

DTP Model Base Ganymede

  1. Enhance SQLModel to support Collection (ARRAY and multiset)Dataypes.
  2. Enhancing dbdefinition model and database vendor doc. - Migrate the enhancement in WTP V1.5.5
  3. Contribute Teradata vendor doc.
  4. Collaboration with OMG for SQLModel/Model base related change.
  5. Respond to request for model change proposal.

Back to the top