Re: Is there a bitfield type field in oracle?
On Jan 30, 4:50 pm, dean <deanbrow...@xxxxxxxxx> wrote:
I have a general question here on how best to implement this: We have
a table called TRAIN that holds around 10K records of railroad data. A
client of ours wants to be able add a field that specifies which of
the 365 days of a year the train runs.
Are you talking about days of every year (i.e. day 176) or are you
talking about particular dates (2nd March 2009)?
I can think of a few ways of doing this:
1) Add 365 fields of varchar2(1), each of which holds a 'Y' or a 'N'
entry to state whether the train runs that day.
2) Add a foreign key to an external table that holds unique date
ranges.
Why would you want to add a FK to your TRAINS table? IMHO a more
natural solution would be to add another table TRAIN_RUNS with two
columns, TRAIN_PK (FK into TRAINS), DATE or NUMBER(3) and enter all
valid combinations.
Kind regards
robert
.
Relevant Pages
- Re: BBC: Is this the new age of the train?
... In this case I was able to schedule the short meeting in Birmingham for 11.30, which gave me ample time to get there on the first off-peak train of the day, and also get home again by mid afternoon. ... My other client in Birmingham has longer meetings, however, and I fear that off-peak tickets will no longer be possible, after the recent timing changes. ... (uk.railway) - Re: Is there a bitfield type field in oracle?
... a table called TRAIN that holds around 10K records of railroad data. ... client of ours wants to be able add a field that specifies which of ... Is there a bitmap-kind of field that could hold one entry in a bit ... (comp.databases.oracle.server) - Re: verizon broadband and poker
... I have been using the service while riding the train to and ... from work and while on travelling for business. ... client and servers is extremely light. ... (rec.gambling.poker) - Re: Greenpeace scaremongering or what?
... any consultant working for a particular client will sway ... I was waiting on Saxmunden Station some 18 months ago when in rolled two Class 20s and a Nuclear Flask Wagon, presumably from Sizewell. ... I was a little suprised to see the two drivers depart from the train and walk to signal box, ... If this is a regular movement,and tea stop?, it would surely be an opportunity for terrorists to strike, nick train and acquire some dangerous material. ... (uk.railway) - Re: Greenpeace scaremongering or what?
... of a flask being involved in a tunnel fire. ... any consultant working for a particular client will sway ... I was waiting on Saxmunden Station some 18 months ago when in rolled two Class 20s and a Nuclear Flask Wagon, presumably from Sizewell. ... I was a little suprised to see the two drivers depart from the train and walk to signal box, ... (uk.railway) |
|