Find the career or fields you want so you can establish since the the primary key
To select that industry, click the row selector to the desired career. To pick numerous areas, hold-down the newest Ctrl key, and then click this new row selector for every single field.
If you want the order of industries when you look at the a multiple-career number 1 the answer to differ from the order of them fields regarding the desk, mouse click Spiders on toolbar showing this new Indexes dialogue field, following reorder the field brands to your index called PrimaryKey.
Referential stability
Referential integrity was a system of legislation you to Availability spends in order to ensure that relationships ranging from ideas into the related dining tables try valid, and you do not happen to remove otherwise change relevant investigation. You can lay referential stability when all after the criteria is actually true:
- This new matching career throughout the first table is actually an initial key otherwise has actually another type of index.
- The new associated areas have the same research form of. There are two main conditions. An enthusiastic AutoNumber career are pertaining to a number job that enjoys a great FieldSize property setting off Enough time Integer, and you can an AutoNumber profession having a good FieldSize possessions function off Replication ID would be associated with a number job that has good FieldSize possessions setting of Duplication ID.
- One another dining tables fall under an equivalent Supply databases. If your tables try connected tables, they have to be tables into the Availableness style, while need unlock the new databases where they are held setting referential stability. Referential stability can’t be implemented to have connected dining tables out-of database inside the almost every other forms.
- You simply cannot get into a value on the international trick arena of the fresh new associated dining table that doesn’t exist in the main trick of your first desk. Yet not, you could go into an excellent Null value from the international trick. Which specifies that the details is actually unrelated. Particularly, you cannot has an order that is allotted to a buyers who would logowanie tsdating perhaps not exist. Yet not, it’s possible to have your order that’s assigned to nobody because of the entering a Null value about CustomerID job.
- You simply cannot erase an archive out-of a first table if coordinating facts exist inside a connected dining table. Such, you can’t remove a member of staff checklist regarding “Employees” table in the event that you’ll find commands assigned to the latest staff on “Orders” desk.
- You cannot transform a primary key worth regarding priple, you cannot transform an enthusiastic employee’s ID regarding “Employees” table if you can find commands allotted to you to definitely personnel in the “Orders” table.
Cascading status and you may deletes
Having relationships in which referential ethics is enforced, you could potentially indicate whether need Usage of automatically cascade upgrade otherwise cascade delete related facts. If you set these types of possibilities, delete boost procedures who constantly be avoided from the referential ethics legislation is actually enabled. After you erase records or alter number 1 secret beliefs from inside the a good first desk, Access makes the called for transform to related dining tables in preserving referential integrity.
For individuals who click to determine the Cascade Inform Related Industries view field after you explain a relationship, at any time which you change the top key out-of a record in the main dining table, Microsoft Supply immediately condition an important key to the fresh new really worth in all associated info. Including, for people who alter a customer’s ID about “Customers” desk, the newest CustomerID job from the “Orders” desk is automatically current for each and every certainly one of one owner’s sales so the relationship isn’t broken. Availableness cascades updates rather than exhibiting people content.
If your primary type in the main desk was a keen AutoNumber profession, selecting the Cascade Posting Related Fields evaluate field does not have any effect as you cannot change the worthy of in an enthusiastic AutoNumber field.