>> was using identity fields as primary keys in both tables and after
listening to Joe Celko's rants about how evil that is I went to some
trouble to identify natural primary keys. To my surprise, both tables
had the same natural keys. <<
Unverifiable exposed surrogates tend to hide the real data model like
that. But the question to ask is, "What entity or relationship does
each table model?"
If they are two logically different things, then it makes sense to have
two tables. Example: I use a VIN number for both automobiles and
trucks, but have different rules for how I handle each type of vehicle
in the company (maintenance, depreciation, accounting for mileage, etc.)
If the tables are really two subsets of attributes for the same entity,
then they need to be in one table. Example: one table has the payroll
computation data and another table has the payroll mailing address for
each employee.
If the tables are really one attribute that has been split on a value,
then they need to be put back together. Example: one table shows when
someone arrived at work, and another table shows when they left work.
The real attribute is the duration on the job.
With a long text column like that, I'd suspect that you have a comment
that belongs to the entity in the first table,
--CELKO--
===========================
Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are.
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!