From: Jim S. <ja...@ne...> - 2004-09-07 15:53:26
|
Lester Caine wrote: > > Looking nice - but what about > default="xxx" > and how about 'Not Null'? > > Also Primary Key? > > Primary key is handled but the samples don't have any, so you don't see it. Not null is now there. Default value and domain (global field) definitions are more problematic. First, they're not supported by JDBC on which IscDbc is modelled. Second, I don't really know how to differentiate between bona fide and artificial domains. I would like to support the former and not clutter up the world with the latter. <metadata> <table name="EMPLOYEE"> <column name="SALARY" type="double" scale="-2" nullable="yes"/> <column name="HIRE_DATE" type="timestamp" nullable="yes"/> <column name="JOB_GRADE" type="smallint" nullable="yes"/> <column name="PHONE_EXT" type="varchar" precision="4"/> <column name="LAST_NAME" type="varchar" precision="20" nullable="yes"/> <column name="EMP_NO" type="smallint" nullable="yes"/> <column name="FULL_NAME" type="varchar" precision="37"/> <column name="JOB_COUNTRY" type="varchar" precision="15" nullable="yes"/> <column name="JOB_CODE" type="varchar" precision="5" nullable="yes"/> <column name="DEPT_NO" type="char" precision="4" nullable="yes"/> <column name="FIRST_NAME" type="varchar" precision="15" nullable="yes"/> <primary_key> <column name="EMP_NO"/> </primary_key> <index name="NAMEX"> <column name="LAST_NAME"/> <column name="FIRST_NAME"/> </index> <index name="RDB$FOREIGN8"> <column name="DEPT_NO"/> </index> <index name="RDB$FOREIGN9"> <column name="JOB_CODE"/> <column name="JOB_GRADE"/> <column name="JOB_COUNTRY"/> </index> <index name="RDB$PRIMARY7" type="unique"> <column name="EMP_NO"/> </index> </table> Note that the primary key is referenced twice, once as primary key and once of unique index. Gotta figure out how handle that. Also have to add foreign key support. -- Jim Starkey Netfrastructure, Inc. 978 526-1376 |