[SQL] REFERENCES and INHERITS restrictions?

2008-02-27 Thread Stefan Scheidegger
Hi all I’m confronted with the following problem: I have a base table with several child tables which also use the parent’s primary key as their own primary key: CREATE TABLE tbl_parent ( p_id serial NOT NULL, p_time timestamp(6) with time zone NOT NULL DEFAULT '1970-01-01 01:00:00+01'::

Re: [SQL] INSERT INTO relational tables

2007-12-10 Thread Stefan Scheidegger
mer folgendes: > > am Mon, dem 10.12.2007, um 11:42:04 +0100 mailte Stefan Scheidegger > folgendes: > > > Thanks for your hints so far. > > > > > > I'm looking for both syntax simplicity and referential integrity. I'm > > > using c++ with

Re: [SQL] INSERT INTO relational tables

2007-12-10 Thread Stefan Scheidegger
Thanks for your hints so far. I'm looking for both syntax simplicity and referential integrity. I'm using c++ with libpqxx, but I didn't find a good object-relational mapper. And I'm too lazy to implement a whole persistency layer as I don't have a huge DB with many relations. I tried Andreas'

[SQL] INSERT INTO relational tables

2007-12-07 Thread Stefan Scheidegger
Hi all I'm new to SQL and I'm facing a problem I can't find any information about (google, forums). By now I wonder if I understood something wrong about relational DBs. An example to explain my Problem: Lets say I have a table containing information about the customer (name, address, ...) and