[Nottingham] SQLite and 'locking'

Martin martin at ml1.co.uk
Tue Feb 27 11:59:40 GMT 2007


Martin Garton wrote:
> On Tue, 2007-02-27 at 11:21 +0000, Duncan John Fyfe wrote:
> 
>> If you use NULL to flag 'available' how do you record a seat as
>> 'unavailable and not booked' (eg. seat 10 has been broken) ?
>> Here is a new perfectly reasonable 'not booked' state.
> 
> Fair point.  For this simple example I was assuming the only reason a
> seat would not be available was because it was booked.  How would you
> handle this case?  With an additional "broken seats" table?

Is this not all cleared up by using an enumerated status column?

Then it's a simple case (later) to add new status options for additional
states such as seat broken, seat too dirty, baby seat, oversized seat,
... all without breaking too much of the existing code.

???

Cheers,
Martin

-- 
----------------
Martin Lomas
martin at ml1.co.uk
----------------



More information about the Nottingham mailing list