This section lists the SQL statements supported in the Cameo Data Modeler plugin. They are parsed and mapped into model constructs.
The following table provides SQL2 SQL schema statements and their support status in the Cameo Data Modeler plugin. Yes indicates that a statement can be generated into a DLL script from model constructs and reverse engineered from a script into model constructs.
SQL schema statement | Supported | (Yes/No) |
---|---|---|
SQL schema definition statement | Schema definition | Yes |
Table definition | Yes | |
View definition | Yes | |
Alter table statement | Yes | |
Grant statement | No | |
Domain definition | No | |
Assertion definition | No | |
Character set definition | No | |
Collation definition | No | |
Translation definition | No | |
SQL schema manipulation statement | Drop table statement | Yes |
Drop view statement | Yes | |
Revoke statement | No | |
Alter domain statement | No | |
Drop assertion statement | No | |
Drop domain statement | No | |
Drop character set statement | No | |
Drop collation statement | No | |
Drop translation statement | No |
Some SQL schema statements (e.g. schema definition, table definition) allow implicit catalog names and unqualified schema names. In addition to SQL schema statements, the following SQL session statements must be supported:
- Set catalog statement - sets the current default catalog name.
- Set schema statement - sets the current default unqualified schema name.
Cameo Data Modeler supports the following widely used dialect statements that are not part of SQL2:
- Database definition statement (CREATE DATABASE) that creates a database
- Index statements (CREATE INDEX, DROP INDEX) that create or remove an index on a table
- Trigger statements (CREATE TRIGGER, DROP TRIGGER) that create or remove trigger(s) on a table
The following table provides details on mapping on the supported SQL schema manipulation statements into SQL constructs.
DDL Statement or Concept | Action, model Item | Description | Visible |
---|---|---|---|
Alter table statement | Modify class | Elements: table name and alter table action. Alter table action – one of: add column, add table constraint, alter column, drop table constraint, drop column. | Yes |
Add column definition | Define attribute | Elements: column definition. | Yes |
Add table constraint definition | Define method | Elements: table constraint definition. | Yes |
Alter column definition | Modify attribute | Elements: mandatory column name, default clause (for add default statement only). | Yes |
Drop table constraint definition | Delete method | Elements: constraint name, drop behavior | Yes |
Drop column definition | Delete attribute | Elements: column name, drop behavior | Yes |
Drop schema statement | Delete package | Elements: schema name, drop behavior | Yes |
Drop table statement | Delete class | Elements: table name, drop behavior | Yes |
Drop view statement | Delete class | Elements: table name, drop behavior | Yes |
Drop behavior | Action property | Modifiers: CASCADE, RESTRICT | No |