Yes, a one-to-one relationship requires both columns to be indexed uniquely.
Be careful about creating such relationships inappropriately, however. A
one-to-one relationship is generally used to model a Type/Sub-type scenario.
In this the primary key of the sub-type is also a foreign key which
references the primary key of the (super) type. Chris Date in 'An
Introduction to Database Systems' gives the example of Employees with
sub-type Programmers and sub-types of this, Application Programmers and
System Programmers. The primary key in each case is EmployeeID (Note that
this can only be an autonumber in Employees though). This type of model is
characterised by each sub-type sharing all attributes of its (super) type,
but not those of other sub-types. Don't be tempted to create a one-to-one
relationship simply because you feel a table has too many columns; that is
more likely to indicate it contains redundancy and needs decomposing into
tables related one-to-many, or one-to-many-to-one, the latter modelling two
entity types related many-to-many via a third table (sometimes called a
'junction' table – in the sample Northwind database for example the
OrderDetails table models a many-to-many relationship type between Orders and
Products).
When you create a on-to-one relationship the line between the tables in the
relationship window does not show any symbols, even though the relationship
still has a direction (a sub-type references its (super) type, not vice
versa). The same is true of indeterminate relationships, but they are
usually incorrect and arise from neither column being indexed uniquely. I
don't think you can change this appearance. If a one-to-many relationship is
correctly set up then the infinity symbol and the 1 should show.
Ken Sheridan
Stafford,