|
Posted by --CELKO-- on 11/25/07 18:53
I think that you missed the concept of IDENTITY and the Relational
Model. A data type in SQL has to:
1) NULL-able
2) More than one column can have the same data type
3) Has to take CHECK() constraints
4) Appropriate computations can done on it (numeric, string or
temporal)
IDENTITY has none of the properties of a data type because it is not a
data type at all. It is an exposed physical locator attached to a
table, not a property of a column. It is derived from the physical
storage used on one machine, like pointer chains in the old
navigational DBs or row_ids or hash tables.
>> For me is important to be 1,2,3,4,5,6 ... because it is important for the business logic of application, now, I have some random values instead. <<
What does this mean in your Logical data model? Since it has to
reference something in the reality of that data model to be a valid
RDBMS, how do you validate and verify it?
I would guess that you do none of these basic things, but are
mimicking a sequential tape file application which depends on counting
records in procedural code. Do you have cursors, too?
The whole idea of SQL is to use sets and declarative code. This is
probably just the tip of the iceberg and all you will have is more and
more kludges piled on each other. The thing will run for awhile, but
it will choke from lack of data integrity or the inability to scale up
or to port to another platform.
Fix the design, then fix the application.
Navigation:
[Reply to this message]
|