Magnus Lie Hetland wrote: > > Chuck Esterbrook <[EMAIL PROTECTED]>: > > Or do all Workers go in the > > same table? Or does each class get its own table only with its > > additional attributes? > > > > How is a reference to a Worker stored in the db?
PostgreSQL does support table inheritance. Interesting you should choose an example (I guess it's pretty typical) similar to the one in Momjian's book (http://www.ca.postgresql.org/docs/aw_pgsql_book). Here's an excerpt: "Consider a practical example that records information about employees and managers. The table employee can hold information about nonmanagerial employees; the table manager can hold information about managers. The manager table can inherit all the columns from employee and have additional columns as well. You can then access nonmanagerial employees using employee, managers using manager, and all employees including managers using employee*. "POSTGRESQL release 7.1 and later [7.2 is the latest] automatically accesses any inherited tables. An asterisk is not needed after the table name. The keyword ONLY is used to prevent inherited table access." -- Steve. Stephen C. Waterbury Code 562, NASA/GSFC _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
