On Wed, Mar 03, 2010 at 10:29:44AM -0600, Little, Douglas wrote:
> Louis,
> Interesting discussion. Always fun to think about real world stuff.
Indeed.
> We have a similar problem for comparing hotel rooms.
> So the issue is that you aren't originating the data, just classifying it.
> I'd mov
.org] On
Behalf Of Louis-David Mitterrand
Sent: Wednesday, March 03, 2010 10:18 AM
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] check constraint on multiple tables?
On Wed, Mar 03, 2010 at 04:05:43PM -, Oliveiros wrote:
>
> As your table names seem to imply, type and category are cabin
On Wed, Mar 03, 2010 at 10:13:48AM -0600, Little, Douglas wrote:
> Hey Louis,
>
> Ship rooms are just like Hotel rooms. There are lots of ways to
> describe. But there needs to be some consistency between the
> classifiers for them to have any meaning.
>
> A junior suite should mean the same th
On Wed, Mar 03, 2010 at 04:05:43PM -, Oliveiros wrote:
>
> As your table names seem to imply, type and category are cabin's
> characteristics , not ship characteristics.
> Am I right?
Yes and no :)
- I'm scanning cruise line web sites with a spider to collect prices so
I'm building cabin_
ssage-
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On
Behalf Of Louis-David Mitterrand
Sent: Wednesday, March 03, 2010 10:07 AM
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] check constraint on multiple tables?
On Wed, Mar 03, 2010 at 10:03:05AM -0600, Little, Do
On Wed, Mar 03, 2010 at 10:03:05AM -0600, Little, Douglas wrote:
> Hello,
>
> I would have designed as ship > cabin (PK of ship_id, Cabin_id)
> And a separate chain of cabin_type > cabin_category > cabin
Ah, now I'm having second thoughts about my schema ;)
> Type, and category are group classi
- Original Message -
From: "Louis-David Mitterrand"
To:
Sent: Wednesday, March 03, 2010 3:38 PM
Subject: Re: [SQL] check constraint on multiple tables?
On Wed, Mar 03, 2010 at 07:29:22AM -0800, Richard Broersma wrote:
On Wed, Mar 3, 2010 at 7:19 AM, Louis-David Mitterr
March 03, 2010 9:02 AM
To: pgsql-sql@postgresql.org
Subject: [SQL] check constraint on multiple tables?
Hi,
I've got this chain of tables:
ship --> (id_ship) --> cabin_type --> (id_cabin_type) --> cabin_category
--> (id_cabin_category) --> cabin
The 'cabin&
On Wed, Mar 3, 2010 at 7:38 AM, Louis-David Mitterrand
wrote:
> Each ship is different and has specific cabin types and categories. Of
> course there is some overlap between ships but I thought it simpler (or
> more elegant) to use that hierarchy. Maybe my schema is wrong?
I'm probably ignorant
On Wed, Mar 03, 2010 at 07:29:22AM -0800, Richard Broersma wrote:
> On Wed, Mar 3, 2010 at 7:19 AM, Louis-David Mitterrand
> wrote:
>
> > CREATE TABLE cabin_type (
>
> > CREATE TABLE cabin_category (
>
> > CREATE TABLE cabin (
>
> I'm just curious about a few things.
>
> 1) What is the differ
On Wed, Mar 3, 2010 at 7:19 AM, Louis-David Mitterrand
wrote:
> CREATE TABLE cabin_type (
> CREATE TABLE cabin_category (
> CREATE TABLE cabin (
I'm just curious about a few things.
1) What is the difference between a cabin_type and a cabin_category.
2) Does each ship have an exclusive set
On Wed, Mar 03, 2010 at 07:14:29AM -0800, Richard Broersma wrote:
> On Wed, Mar 3, 2010 at 7:02 AM, Louis-David Mitterrand
> wrote:
>
>
> > What is the best solution? Adding an id_ship to 'cabin'? Or check'ing
> > with a join down to 'ship'? (if possible).
>
> Can you post simplified table defi
On Wed, Mar 3, 2010 at 7:02 AM, Louis-David Mitterrand
wrote:
> What is the best solution? Adding an id_ship to 'cabin'? Or check'ing
> with a join down to 'ship'? (if possible).
Can you post simplified table definitions for the relations involved?
--
Regards,
Richard Broersma Jr.
Visit the
Hi,
I've got this chain of tables:
ship --> (id_ship) --> cabin_type --> (id_cabin_type) --> cabin_category
--> (id_cabin_category) --> cabin
The 'cabin' table has (cabin_number, id_cabin_category ref. cabin_category)
How can I guarantee unicity of cabin_number per ship?
For now I adde
Mario Splivalo wrote:
Tom Lane wrote:
Mario Splivalo writes:
I have two tables, tableA and tableB:
CREATE TABLE tableA (idA integer primary key, email character varying
unique);
CREATE TABLE tableB (idB integer primary key, email character varying
unique);
Now, I want to create
Mario Splivalo wrote on 14.09.2009 16:20:
Have you considered refactoring so there's only one table?
Unfortunately I can't do that, due to the
object-relational-mapper-wrapper-mambo-jumbo.
You could still refactor that into one single table, then create two updateable
views with the names th
Tom Lane wrote:
> Mario Splivalo writes:
>> I have two tables, tableA and tableB:
>> CREATE TABLE tableA (idA integer primary key, email character varying
>> unique);
>> CREATE TABLE tableB (idB integer primary key, email character varying
>> unique);
>
>> Now, I want to create check constraint i
Mario Splivalo writes:
> I have two tables, tableA and tableB:
> CREATE TABLE tableA (idA integer primary key, email character varying
> unique);
> CREATE TABLE tableB (idB integer primary key, email character varying
> unique);
> Now, I want to create check constraint in both tables that would
>
How would you do it, without creating third table?
Mario
Ries van Twisk wrote:
> can't you solve it creating a reference between the tables?
>
> Ries
> On Sep 14, 2009, at 8:24 AM, Mario Splivalo wrote:
>
>> I have two tables, tableA and tableB:
>>
>> CREATE TABLE tableA (idA integer pr
can't you solve it creating a reference between the tables?
Ries
On Sep 14, 2009, at 8:24 AM, Mario Splivalo wrote:
I have two tables, tableA and tableB:
CREATE TABLE tableA (idA integer primary key, email character varying
unique);
CREATE TABLE tableB (idB integer primary key, email character
I have two tables, tableA and tableB:
CREATE TABLE tableA (idA integer primary key, email character varying
unique);
CREATE TABLE tableB (idB integer primary key, email character varying
unique);
Now, I want to create check constraint in both tables that would
disallow records to either table whe
21 matches
Mail list logo