From: Jim S. <ja...@ne...> - 2004-09-07 17:55:37
|
Leyne, Sean wrote: >> <metadata> >> <table name="EMPLOYEE"> >> <column name="SALARY" type="double" scale="-2" >> >> >nullable="yes"/> > >This presentation is 'unexpected' (I didn't expect it). > >Although "double" is the true datatype, it is not the SQL datatype which >I expected to be used in the DDL (i.e. NUMERIC( 10, 2)). Doesn't this >representation loose the accuracy of data schema? > > I haven't a clue what the original DDL looked like, but the database created from the standard employee.fbk file has the employee salary field defined with a double (aka long float) and a scale of -2. I report what I see. >How would a value with a datatype of NUMERIC( 10, 2) be presented? > ><column name="SALARY" type="numeric" size="10" precision="2" >nullable="yes"/>??? > > Probably type="bigint" scale="-2". I've adopted, for better or worse, more or less JDBC conventions and usages. The reasoning is that I believe that C++ JDBC binding used in IscDbc should become the primary API for Firebird, leaving the dreadful DSQL interface as an exercise in backwards compatibility. JDBC has it's fair share of limitation, warts, and flaws, but it's miles ahead of any competitors. > >Further, keeping "small is beautiful" in mind, wouldn't it be better to >use 'NotNull="yes"' instead of 'nullable="yes"', since NotNull is the >exception more than the norm? > > > > I have a personal aversion to negativity. Nullable is clear. Not nullable is also clear. Not NotNull violates our innate distrust of double negatives (not, he said pointedly, "long floating" negatives). It also give me something to bargain with if/when you come up with a more substantial objection. Remember my stock advice to fledgling language designers: Always pick bad keywords so meddlers have something to change. -- Jim Starkey Netfrastructure, Inc. 978 526-1376 |