DdlUtils
  1. DdlUtils
  2. DDLUTILS-28

Capture and creation of non-table entities - constraints, triggers, stored procedures and others

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Labels:
      None
    • Environment:
      SQL Server, Oracle

      Description

      Database build includes many non-table items - commonly constraints, triggers, stored procedures and others which may be database dependant (Oracle sequences as an example).

      Even the the common entities are generally not transportable between database types. The schema should allow multiple versions of each item to be created, one per database type which the user requires to support.

      Can the ddl-utils package use user-customisable sql templates to create non-standard items from (new) generic XML tags?

        Activity

        Hide
        Achille Carette added a comment -

        I would say that being independent of the database does not mean support only a (sub)set of common features. It means being able to flexibly adapt to various implementations.

        This means that (for us at least), the schema definition file(s) should contain only once what is common to all databases (the database structure), but should also provide a way to define database-specific elements.

        I see four points:
        (1) What is to be defined in the schema dtd (for example, should the dtd define elements for sequences and stored procedures ?).
        (1.1) The xml schema used is Turbine's one. What if DdlUtils needs more or different elements ? (DdlUtils needs informations an ORM does not)
        (2) How to permit the inclusion of database-specific definitions in the schma definition file(s) ?
        (3) How to provide a way to get the xml schema definition file(s) from an existing database, containing the non standard elements.

        Show
        Achille Carette added a comment - I would say that being independent of the database does not mean support only a (sub)set of common features. It means being able to flexibly adapt to various implementations. This means that (for us at least), the schema definition file(s) should contain only once what is common to all databases (the database structure), but should also provide a way to define database-specific elements. I see four points: (1) What is to be defined in the schema dtd (for example, should the dtd define elements for sequences and stored procedures ?). (1.1) The xml schema used is Turbine's one. What if DdlUtils needs more or different elements ? (DdlUtils needs informations an ORM does not) (2) How to permit the inclusion of database-specific definitions in the schma definition file(s) ? (3) How to provide a way to get the xml schema definition file(s) from an existing database, containing the non standard elements.
        Hide
        Thomas Dudziak added a comment -

        I don't know, there is no platform independent way to support sequences, stored procedures etc. And the aim of DdlUtils is to enable the app to be database independent. Besides, I'm not sure, that I get enough info from the JDBC driver about these entities. Eg. I doubt that the Oracle JDBC driver gives the definition of a stored procedure. And in the end, you can always use Ant's sql task to execute database-specific commands.
        However, there might be a few common cases that can be supported in a generic way across several databases.
        As for entities that are incompatible between database types, DdlUtils maps them (using default mappings) to their JDBC counterparts (eg. JDBC types for database specific types), and for these, adding support for overriding should be doable. At the Api level, this already possible (though not documented yet in the user guide).

        Show
        Thomas Dudziak added a comment - I don't know, there is no platform independent way to support sequences, stored procedures etc. And the aim of DdlUtils is to enable the app to be database independent. Besides, I'm not sure, that I get enough info from the JDBC driver about these entities. Eg. I doubt that the Oracle JDBC driver gives the definition of a stored procedure. And in the end, you can always use Ant's sql task to execute database-specific commands. However, there might be a few common cases that can be supported in a generic way across several databases. As for entities that are incompatible between database types, DdlUtils maps them (using default mappings) to their JDBC counterparts (eg. JDBC types for database specific types), and for these, adding support for overriding should be doable. At the Api level, this already possible (though not documented yet in the user guide).

          People

          • Assignee:
            Thomas Dudziak
            Reporter:
            Peter Millington
          • Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:

              Development