Typically two tables with a one to one relationship should be combined
If one performs a full RDA (Relational Data Analysis) all fields (without
repeating data) that can be identified by the same (Primary) Key are
generally designed as a single relation during the optimisation step. It
should be noted that one of the recognised dangers of rigid optimisation
based solely on the (Primary) Key is that subsets of the general population
of that relation may not be properly recognised.
There are sometimes physical implications as to why the data may be split,
however that is another matter.
There are also good reasons to use the 1 to 1 relationship, modelling
subtypes, eliminating nulls and for security.
In brief
Subtypes, when fields may only apply if the relation/table can have several
roles/responsibilites they can be moved to a separate table. For example an
Employee tables could have a 1 to 1 relationship with the Engineer table.
The Employee table contains information about all employes, the Engineer
table contains information about all Engineers who are a subset/subtype of
Employees. There could be other tables for other types of Employess.
Elimination of Nulls, Nulls cause problems in a database because they are
not a value as such. When a field has an unknown value it can only contain a
Null or some database engine managed Default (not seen in Jet). Many posts
here have been concerned with things not working as expected and many times
this is down to Nulls, many problems are resolved using functions such as
Nz() or setting the value to an empty string. The problem is that in some
databases we need to know that the Name is Unknown as opposed to known to be
nothing. If Nz() is used unwisely to update the fields in the database as
opposed to converting them temporarily in a query for the purpose of a
report or form you would not know whether the value was unknown or known as
nothing. If you do not know the Annual Turnover of a firm your database
should reflect that rather than saying it is zero. Of course you could
manage the empty strings and zero value fields, however this would require
an RDBMS such as DB2 or SQL Server etc.
To avoid some of these problems you could move some data from a table to a 1
to 1 relationship say a table of Company and one for CompanyFinancialStatus
now when you run a report using the FinancialStatus fields you could have
already set the fields in that table to required so that the table cannot be
partially completed if you need all fields to have known values.
Security, fields that contain sensitive data may be implemented in a
separate table as part of a 1 to 1 relationship and much tighter
security/encryption can be applied to that table and its fields.
Solid Database Design helps develop Solid Applications.
--
Slainte
Craig Alexander Morrison
Crawbridge Data (Scotland) Limited