[GENERAL] Relational database design book

2008-12-14 Thread Michael Hall
This is slightly off topic perhaps, but maybe not too much ... I'm wondering if anyone can recommend a good general book on relational database design. I am using PostgreSQL, so a PG-centric book would be best, but I'm mainly interested in the art/science of good SQL database design regardless

Re: [GENERAL] Serial/sequence problem

2008-11-25 Thread Michael Hall
The 3636 INSERT-Statements contains a fix value for the ID-Column, right? Thats wrong, omit the id-column and value or use simply 'default' for it. That's right. I thought that might be the case. - how can I rectify the situation? Set the sequence to the new value, 3636+9, via

Re: [GENERAL] Equivalent for AUTOINCREMENT?

2008-10-31 Thread Michael Hall
I have a table where I have a serialnumber which shuld be increased be each INSERT. I know I can use max() to get the highest number, but how can I use it in a INSERT statement? Have a look in the manual for the SERIAL data type. For fields with a SERIAL data type, you can use DEFAULT in