The SQL statement to create a table for our Person business objects looks like this:
CREATE TABLE TPERSON ( IBOXFID INTEGER NOT NULL PRIMARY KEY, FLASTNAME VARCHAR(254), FFIRSTNAME VARCHAR(254), FPHONE VARCHAR(254) )Signsoft intelliBO needs the field IBOXFID for the automatic generation of primary keys with a sequence table. Therefore we also need another table:
CREATE TABLE TSEQUENCE (FNAME CHAR(200), FKEY INTEGER);
INSERT INTO TSEQUENCE (FNAME, FKEY) VALUES ('default', 100);
The Signsoft intelliBO schema generator can create this SQL statements for you analyzing the information in the class files and the metadata from the JDO files (see also tool documentation section "Schema Generator").
You start the schema generator with the target "schemagen" from our sample build.xml file. It creates the files create.sql, drop.sql and select.sql in the sql directory. There are statements to create and delete database tables and for queries too. The create-statements described above are to be found in the create.sql file.
Please create the database tables now using the statements above. You can use the "createdatabase" target from our sample build.xml for it.
That is the end of the preparatory work. Now you have suitable business objects with the corresponding database and can use it in an application.