Select the job otherwise areas you want so you can identify since the primary key

To pick one community, click the line selector towards the desired career. To select several areas, hold-down the Ctrl secret, and then click the new line selector for every single community.

If you want your order of sphere in a simultaneous-profession no. 1 key to vary from the order of those industries throughout the desk, click Spiders on the toolbar to exhibit this new Indexes dialog field, and reorder the field brands to the index titled PrimaryKey.

Referential integrity

Referential ethics try a network away from legislation one Availability spends to help you make certain relationships ranging from information inside relevant dining tables was valid, and that you don’t affect remove or changes related studies. You could potentially put referential integrity when all the following the conditions is true:

  • The fresh coordinating field regarding the number 1 dining table is actually an initial trick otherwise has actually another index.
  • The fresh new associated sphere have a similar data sorts of. There have been two exceptions. A keen AutoNumber occupation will be associated with lots job one provides a FieldSize possessions form out of A lot of time Integer, and you can a keen AutoNumber job who’s good FieldSize property mode from Duplication ID are going to be related to a variety industry who may have an effective FieldSize property function from Duplication ID.
  • Each other dining tables fall under an identical Availableness database. Whether your dining tables try linked tables, they must be tables in the Availability structure, and you also must unlock the newest database in which he is held to put referential integrity. Referential integrity cannot be implemented getting connected tables of database from inside the most other chatspin forms.
  • You cannot enter a regard throughout the international secret field of the associated dining table that will not are present however secret of your no. 1 table. Although not, you can go into an excellent Null value on foreign key. It determine your information try unrelated. For example, you cannot enjoys an order that’s assigned to a customer who not exist. But not, you could have an order that is assigned to no body from the typing a great Null really worth about CustomerID occupation.
  • You cannot erase an archive off a first desk in the event the complimentary information occur inside the a related dining table. Including, you can’t remove a member of staff record regarding “Employees” dining table in the event the you’ll find sales assigned to the fresh new personnel throughout the “Orders” desk.
  • You can’t alter a primary key worth throughout the priple, you simply cannot change an employee’s ID regarding “Employees” dining table if there are purchases assigned to you to definitely staff member regarding “Orders” desk.

Cascading reputation and you will deletes

To possess relationship in which referential integrity is implemented, you could identify whether or not you desire Accessibility immediately cascade up-date otherwise cascade remove related facts. For folks who put such choices, erase and update procedures who constantly be prevented of the referential integrity guidelines is enabled. Once you remove suggestions otherwise change no. 1 trick thinking when you look at the a great first table, Supply makes the called for alter to relevant tables in preserving referential stability.

For individuals who click to choose the Cascade Inform Related Areas consider box after you establish a love, at any time that you change the top trick away from a record however table, Microsoft Supply automatically status the main the answer to the value in all related ideas. Including, for folks who alter a consumer’s ID regarding “Customers” desk, the CustomerID occupation on the “Orders” table try instantly current each certainly one customer’s orders so the relationships is not damaged. Access cascades reputation versus displaying one message.

When your first type in the main dining table are an AutoNumber career, selecting the Cascade Improve Associated Fields glance at box does not have any effect since you dont alter the worth within the an AutoNumber job.