Re: Equivalent for all_catalog
Here is the SQL statement.
MYSQL version is:
Driver Information
Driver Name: MySQL-AB JDBC Driver
Driver Version: mysql-connector-java-3.1.12 ( $Date: 2005-11-17 15:53:48 +0100 (Thu, 17 Nov 2005) $, $Revision$ )
Database Information
Database Name: MySQL
Database Version: 5.0.19-community
Table names are modified :
create table A
(
CreationOrder MEDIUMINT UNSIGNED not null AUTO_INCREMENT,
Name VARCHAR(25) not null,
IsEditable SMALLINT not null,
IsAbstract SMALLINT not null,
IsVirtual SMALLINT not null,
AssociationType INTEGER not null,
PersistentName VARCHAR(30) not null,
Aggregates VARCHAR(25) null ,
Correlative VARCHAR(25) null ,
CorrelativeKeyOffset INTEGER null ,
Lineage VARCHAR(500) null ,
Description VARCHAR(255) null ,
Lexicon VARCHAR(50) null ,
AggregatePrimaryKey VARCHAR(1500) not null,
InheritedPrimaryKey VARCHAR(1500) not null,
Adapter VARCHAR(50) null,
IsEntitleable TINYINT null,
DataSource VARCHAR(255) null,
DSUsername VARCHAR(31) null,
DSPassword VARCHAR(31) null,
DSCatalog VARCHAR(31) null,
DSSchema VARCHAR(31) null,
Ancestors LONGTEXT null,
Descendents LONGTEXT null,
constraint SDO$PEntity primary key (CreationOrder, Name )
)
create table B
(
AssociatedEntityName$ VARCHAR(25) not null,
Name VARCHAR(100) not null,
Occurs VARCHAR(10) not null,
Alias VARCHAR(25) null ,
Dependent VARCHAR(25) not null,
DependentType VARCHAR(20) not null,
Stereotype VARCHAR(50) null ,
AliasType VARCHAR(50) null ,
constraint SDO$PAssociation primary key (AssociatedEntityName$, Name)
)
SQL failing is :
alter table B add constraint SDO$FAssociated$Association$ foreign key (AssociatedEntityName$) references A(Name)