On Friday 05 September 2008 22:43:15 Nicolas Williams wrote:
> On Fri, Sep 05, 2008 at 09:31:43PM +0200, Andreas Ntaflos wrote:
> > In the Room table the primary key is a combination of two attributes. How
> > could I auto-increment the roomID? "roomID INTEGER AUTOINCREMENT" is
> > syntactically in
Andreas Ntaflos wrote:
>
> Naturally a room cannot be identified without a building so it is a weak
> entity (this seems to be the canonical example in all database books I've
> seen).
>
That is only true if you allow the same roomID to be used in multiple
buildings (i.e. there exists a room
On Fri, Sep 05, 2008 at 09:31:43PM +0200, Andreas Ntaflos wrote:
> In the Room table the primary key is a combination of two attributes. How
> could I auto-increment the roomID? "roomID INTEGER AUTOINCREMENT" is
> syntactically incorrect and the AUTOINCREMENT keyword seems to cannot appear
> any
Hi list,
this question is about the AUTOINCREMENT usage in SQLite when modelling weak
entities. Suppose there are two tables 'Building' and 'Room':
CREATE TABLE Building (
buildingID INTEGER PRIMARY KEY AUTOINCREMENT,
...
);
CREATE TABLE Room (
roomID INTEGER,
buildingID INTEGE
4 matches
Mail list logo