Whats the difference between a “one-to-many” relationship and a “one-to-one” relationship?
A one-to-many relationship should be established if only one of the related fields is a primary key or a unique index of some kind. For example, you would want to establish a one-to-many relationship between the Customer ID field in the Customer table (a primary key) and the Customer ID field in the Order table because there will only be one Customer ID in the Customer table that matches many Customer ID’s in the Orders table. (Each time a customer makes an order, their Customer ID is used.) A one-to-one relationship should be established if both of the related fields is a primary key or a unique index of some kind. For example, if you held shipping information in one table (Customer table) and credit card information in another table (Credit table) and you allowed only one credit card to be used per customer, you would want to establish a one-to-one relationship between the Customer ID in the Customer table and the Customer ID in the Credit table. A “many-to-many” relationship is actu