Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'eclipselink/org.eclipse.emf.teneo.eclipselink.examples.library.orm.tests/createDDL.jdbc')
-rwxr-xr-xeclipselink/org.eclipse.emf.teneo.eclipselink.examples.library.orm.tests/createDDL.jdbc28
1 files changed, 28 insertions, 0 deletions
diff --git a/eclipselink/org.eclipse.emf.teneo.eclipselink.examples.library.orm.tests/createDDL.jdbc b/eclipselink/org.eclipse.emf.teneo.eclipselink.examples.library.orm.tests/createDDL.jdbc
new file mode 100755
index 000000000..028bc1eec
--- /dev/null
+++ b/eclipselink/org.eclipse.emf.teneo.eclipselink.examples.library.orm.tests/createDDL.jdbc
@@ -0,0 +1,28 @@
+CREATE TABLE EMFLIB_STYLE (ID BIGINT NOT NULL, NAME VARCHAR(255), PRIMARY KEY (ID))
+CREATE TABLE EMFLIB_PUBLISHER (ID BIGINT NOT NULL, NAME VARCHAR(255), PRIMARY KEY (ID))
+CREATE TABLE EMFLIB_PUBLISHER_WRITER (publishers_ID BIGINT NOT NULL, writers_ID BIGINT NOT NULL, PRIMARY KEY (publishers_ID, writers_ID))
+CREATE TABLE EMFLIB_COVER (ID BIGINT NOT NULL, COLORED SMALLINT DEFAULT 0, ECONT_FEAT_ID INTEGER, ECONTAINER_ID BIGINT, PRIMARY KEY (ID))
+CREATE TABLE EMFLIB_LIBRARY (ID BIGINT NOT NULL, NAME VARCHAR(255), PRIMARY KEY (ID))
+CREATE TABLE EMFLIB_TRANSLATOR (ID BIGINT NOT NULL, LOCATION VARCHAR(255), NAME VARCHAR(255), PRIMARY KEY (ID))
+CREATE TABLE EMFLIB_LIBRARY_BOOK_MAP (MAPKEY VARCHAR(255) NOT NULL, ECONT_FEAT_ID INTEGER, LIBRARY_ID BIGINT NOT NULL, BOOK_ID BIGINT, PRIMARY KEY (MAPKEY, LIBRARY_ID))
+CREATE TABLE EMFLIB_BOOK_STYLE_MAP (MAPKEY VARCHAR(255) NOT NULL, ECONT_FEAT_ID INTEGER, BOOK_ID BIGINT NOT NULL, STYLE_ID BIGINT, PRIMARY KEY (MAPKEY, BOOK_ID))
+CREATE TABLE EMFLIB_ADDRESS (ID BIGINT NOT NULL, TOWN VARCHAR(255), ECONT_FEAT_ID INTEGER, PRIMARY KEY (ID))
+CREATE TABLE EMFLIB_TYPEWRITER (ID BIGINT NOT NULL, MAKER VARCHAR(255), TYPE VARCHAR(255), PRIMARY KEY (ID))
+CREATE TABLE EMFLIB_WRITER (ID BIGINT NOT NULL, NAME VARCHAR(255), ECONT_FEAT_ID INTEGER, ECONTAINER_ID BIGINT, ADDRESS_ID BIGINT, PRIMARY KEY (ID))
+CREATE TABLE EMFLIB_BOOK (ID BIGINT NOT NULL, TITLE VARCHAR(255), PAGES INTEGER, ECONT_FEAT_ID INTEGER, AUTHOR_ID BIGINT, TRANSLATOR_ID BIGINT, PRIMARY KEY (ID))
+CREATE TABLE EMFLIB_WRITER_TYPEWRITER (Writer_ID BIGINT NOT NULL, typewriters_ID BIGINT NOT NULL, PRIMARY KEY (Writer_ID, typewriters_ID))
+ALTER TABLE EMFLIB_PUBLISHER_WRITER ADD CONSTRAINT MFLBPBLSHRWRwrtrsD FOREIGN KEY (writers_ID) REFERENCES EMFLIB_WRITER (ID)
+ALTER TABLE EMFLIB_PUBLISHER_WRITER ADD CONSTRAINT MFLBPBLSHRpblshrsD FOREIGN KEY (publishers_ID) REFERENCES EMFLIB_PUBLISHER (ID)
+ALTER TABLE EMFLIB_COVER ADD CONSTRAINT MFLBCOVERCNTINERID FOREIGN KEY (ECONTAINER_ID) REFERENCES EMFLIB_BOOK (ID)
+ALTER TABLE EMFLIB_LIBRARY_BOOK_MAP ADD CONSTRAINT MFLBLBRRYBKMLBRRYD FOREIGN KEY (LIBRARY_ID) REFERENCES EMFLIB_LIBRARY (ID)
+ALTER TABLE EMFLIB_LIBRARY_BOOK_MAP ADD CONSTRAINT MFLBLBRRYBOKMAPBKD FOREIGN KEY (BOOK_ID) REFERENCES EMFLIB_BOOK (ID)
+ALTER TABLE EMFLIB_BOOK_STYLE_MAP ADD CONSTRAINT MFLBBOKSTYLEMAPBKD FOREIGN KEY (BOOK_ID) REFERENCES EMFLIB_BOOK (ID)
+ALTER TABLE EMFLIB_BOOK_STYLE_MAP ADD CONSTRAINT MFLBBKSTYLMAPSTYLD FOREIGN KEY (STYLE_ID) REFERENCES EMFLIB_STYLE (ID)
+ALTER TABLE EMFLIB_WRITER ADD CONSTRAINT MFLBWRITERCNTNERID FOREIGN KEY (ECONTAINER_ID) REFERENCES EMFLIB_LIBRARY (ID)
+ALTER TABLE EMFLIB_WRITER ADD CONSTRAINT MFLBWRITERDDRESSID FOREIGN KEY (ADDRESS_ID) REFERENCES EMFLIB_ADDRESS (ID)
+ALTER TABLE EMFLIB_BOOK ADD CONSTRAINT EMFLIBBOOKAUTHORID FOREIGN KEY (AUTHOR_ID) REFERENCES EMFLIB_WRITER (ID)
+ALTER TABLE EMFLIB_BOOK ADD CONSTRAINT MFLBBOOKTRNSLTORID FOREIGN KEY (TRANSLATOR_ID) REFERENCES EMFLIB_TRANSLATOR (ID)
+ALTER TABLE EMFLIB_WRITER_TYPEWRITER ADD CONSTRAINT MFLBWRTRTtypwrtrsD FOREIGN KEY (typewriters_ID) REFERENCES EMFLIB_TYPEWRITER (ID)
+ALTER TABLE EMFLIB_WRITER_TYPEWRITER ADD CONSTRAINT MFLBWRTRTYPWRWrtrD FOREIGN KEY (Writer_ID) REFERENCES EMFLIB_WRITER (ID)
+CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL, PRIMARY KEY (SEQ_NAME))
+INSERT INTO SEQUENCE(SEQ_NAME, SEQ_COUNT) values ('SEQ_GEN', 0)

Back to the top