| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Table design question
>> The one-field [sic] user table smells like a design problem.
Merging user and user_history tables introduces ugly problems with
relational integrity. <<
First of all, fields and columns are totally different. Next, there is no such thing as just "id"; I think that you meant to follow ISO-11179 and use "user_id" instead. Also, why did you use an ASCII picture instead of using DDL; I have no idea what the DRI actions should be.
CREATE TABLE Users
(user_id INTEGER NOT NULL PRIMARY KEY,
...);
CREATE TABLE Calendar
(cal_date DATETIME NOT NULL PRIMARY KEY,
..);
CREATE TABLE User_History
(user_id INTEGER NOT NULL
REFERENCES Users(user_id)
ON UPDATE CASCADE,
>> where I'm really not interested in historical data but just the
identity of the user, and those where exact user properties in point
of time matter. <<
You can Google the detials, but the idea of a temproal database is to use durations and not points in time (see Zeno and Einstein for the nature of time).
It is also a good idea to have a calendar table to track holidays, workdays, fdiscal calendars, etc. in the enterprise. You use a BETWEEN predicate to find who was doing what on a given date. Received on Fri Jan 23 2004 - 12:05:35 CST
![]() |
![]() |