Discover the field or fields that you want so you’re able to determine given that an important key
To select one to field, click on the line selector to the wished industry. To choose several areas, hold-down the newest Ctrl trick, and then click brand new line selector per field.
If you prefer your order of your own industries for the a simultaneous-community no. 1 the answer to differ from the order of them sphere about table, simply click Indexes towards toolbar to display brand new Indexes dialogue container, and then reorder industry https://datingranking.net/tr/japan-cupid-inceleme/ names on list entitled PrimaryKey.
Referential stability
Referential ethics is a system out of laws one Access uses to make certain that relationships anywhere between suggestions into the associated tables is appropriate, and that you don’t affect erase otherwise transform associated investigation. You could place referential integrity when all of the following requirements is actually true:
- The brand new matching career regarding the no. 1 desk try an initial key otherwise features another list.
- This new relevant areas have the same research sort of. There are two main conditions. A keen AutoNumber career will be connected with a variety career one enjoys an effective FieldSize assets mode regarding Long Integer, and you may an enthusiastic AutoNumber industry having an effective FieldSize possessions setting away from Duplication ID is regarding several field who’s got an effective FieldSize property function out of Duplication ID.
- Both dining tables end up in the same Accessibility databases. If the dining tables are connected tables, they must be tables inside Supply format, and also you need certainly to open the newest databases in which he’s kept setting referential ethics. Referential stability cannot be implemented getting linked tables from databases from inside the most other forms.
- You simply can’t get into an admiration on overseas trick realm of this new related table that will not exists in the primary secret of the no. 1 dining table. However, you could enter good Null worthy of on international key. That it determine that information is actually unrelated. Like, you simply cannot features your order which is allotted to a customers who maybe not exists. Yet not, you’ll have your order that is allotted to nobody from the entering an excellent Null value in the CustomerID field.
- You simply can’t delete accurate documentation of an initial desk in the event that matching ideas are present from inside the a related desk. Such, you can’t remove a worker number from the “Employees” table if the you can find sales assigned to the new employee in the “Orders” dining table.
- You can’t change a primary key worth on priple, you cannot change an enthusiastic employee’s ID regarding the “Employees” table in the event that discover commands assigned to that staff throughout the “Orders” dining table.
Cascading status and you will deletes
To have matchmaking in which referential integrity are enforced, you might identify whether you would like Usage of automatically cascade revision otherwise cascade remove relevant records. For people who lay such possibilities, delete and update surgery who would always be avoided because of the referential ethics legislation is permitted. When you remove suggestions otherwise change top trick viewpoints inside a beneficial number one dining table, Availableness helps to make the needed transform so you can relevant dining tables to preserve referential ethics.
For those who click to select the Cascade Improve Relevant Fields examine box when you describe a romance, when which you alter the top trick from accurate documentation however dining table, Microsoft Access immediately condition the main key to new really worth throughout associated information. Such as, if you changes a customer’s ID regarding “Customers” dining table, brand new CustomerID job regarding the “Orders” dining table is immediately current for each certainly one owner’s orders therefore the matchmaking is not damaged. Availability cascades position in place of exhibiting people content.
When your no. 1 type in an important desk try an AutoNumber field, choosing the Cascade Upgrade Relevant Fields check box doesn’t have impression since you dont change the value within the an AutoNumber profession.
Add Comment