Get the profession otherwise sphere that you like to identify since the the main key

Get the profession otherwise sphere that you like to identify since the the main key

To select one profession, click on the line selector toward need career. To choose numerous fields, hold down this new Ctrl key, and click brand new row selector for every single profession.

If you prefer the transaction of your sphere into the a multiple-profession first the answer to range from the order of them areas about desk, click Spiders for the toolbar to exhibit the Spiders dialogue box, then reorder the field labels on list called PrimaryKey.

Referential integrity

Referential integrity was a system from legislation you to definitely Availableness spends to help you make certain that relationships between suggestions in the related dining tables try legitimate, and that you don’t happen to remove otherwise changes related studies. You might set referential integrity whenever all the pursuing the standards are true:

  • The brand new coordinating profession regarding the primary table is actually an initial trick or features another type of directory.
  • The new related sphere have the same analysis type of. There are 2 exceptions. An enthusiastic AutoNumber job will likely be related to lots occupation that features good FieldSize property means regarding Enough time Integer, and an AutoNumber industry that good FieldSize assets means off Duplication ID would be linked to a variety job who has got an effective FieldSize possessions function of Replication ID.
  • One another dining tables get into the same Availability database. If the dining tables is actually linked tables, they must be tables for the Availableness format, and you need open the database where he could be kept to set referential stability. Referential integrity can not be implemented to have connected tables out-of database during the almost every other formats.
  • You can not enter into an esteem regarding international secret arena of the new related table that does not can be found however trick of top dining table. Yet not, you might get into a Null value regarding the foreign secret. That it specifies the records are unrelated. Such as, you simply cannot has your order that’s assigned to a customer who maybe not exists. But not, it’s possible to have an order that’s assigned to no body from the entering a Null worth about CustomerID career.
  • You can not erase a record from an initial table in the event the coordinating information can be found during the an associated table. Including, you simply can’t delete a member of staff checklist regarding the “Employees” dining table if the you will find purchases assigned to the new employee on the “Orders” table.
  • You simply can’t changes a first secret worth regarding priple, you can’t alter an enthusiastic employee’s ID about “Employees” desk if the you can find purchases allotted to that staff regarding the “Orders” dining table.

Flowing position chat zozo and you will deletes

Having matchmaking in which referential integrity try enforced, you can identify whether or not you need Access to immediately cascade improve or cascade remove relevant suggestions. For many who lay such alternatives, remove and update surgery who does usually be prevented from the referential integrity rules is allowed. After you delete suggestions or changes number one key beliefs within the a beneficial no. 1 table, Availability helps make the necessary alter so you’re able to associated tables to preserve referential integrity.

For folks who simply click to select the Cascade Improve Associated Areas evaluate package once you explain a love, when that you replace the number 1 secret of a record however desk, Microsoft Supply automatically reputation an important the answer to the newest worthy of in all related facts. Particularly, if you changes a consumer’s ID in the “Customers” desk, brand new CustomerID industry regarding the “Orders” desk is actually instantly up-to-date for each and every certainly one of you to user’s instructions so the dating isn’t busted. Accessibility cascades standing instead of demonstrating one message.

If your first input an important table is actually an AutoNumber occupation, choosing the Cascade Posting Associated Industries take a look at field doesn’t have effect as you don’t replace the value in an AutoNumber community.

Add a Comment

Your email address will not be published. Required fields are marked *