Re: Why is MySQL more chosen over PostgreSQL?
Sander Steffann <steffann@nederland.net>
From: "Sander Steffann" <steffann@nederland.net>
To: "Curt Sampson" <cjs@cynic.net>, "Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
Cc: "Hannu Krosing" <hannu@tm.ee>, "Hackers" <pgsql-hackers@postgresql.org>
Date: 2002-07-31T08:35:12Z
Lists: pgsql-hackers
Hi > And what's the problem with networkcard_products being a separate table > that shares a key with the products table? > > CREATE TABLE products (product_id int, ...) > CREATE TABLE networkcard_products_data (product_id int, ...) > CREATE VIEW networkcard_products AS > SELECT products.product_id, ... > FROM products > JOINT networkcard_products_data USING (product_id) > > What functionality does table inheritance offer that this traditional > relational method of doing things doesn't? Well, if you also have soundcard_products, in your example you could have a product which is both a networkcard AND a soundcard. No way to restrict that a product can be only one 'subclass' at a time... If you can make that restriction using the relational model, you can do the same as with subclasses. But afaict that is very hard to do... Sander.