To select one to profession, click the line selector on the need job. To select several areas, hold-down the fresh new Ctrl key, and click this new row selector for every single field.
If you prefer the order of your own areas during the a multiple-industry top key to differ from your order of those areas on table, simply click Indexes to your toolbar to display the newest Indexes dialogue package, immediately http://www.datingranking.net/tr/imeetzu-inceleme after which reorder industry names with the index called PrimaryKey.
Referential ethics
Referential ethics is actually a network of laws and regulations that Availability uses to help you make certain that dating between ideas from inside the related dining tables was valid, and that you don’t eventually delete or transform related investigation. You can set referential ethics when all the following requirements is actually true:
- The brand new matching career on the primary desk are a primary trick otherwise provides a different directory.
- New associated fields have the same study kind of. There’s two conditions. An enthusiastic AutoNumber profession would be associated with a number career you to has actually a great FieldSize property setting out-of Enough time Integer, and you may a keen AutoNumber profession who has got good FieldSize property form regarding Duplication ID can be associated with several occupation who’s got an excellent FieldSize possessions function regarding Duplication ID.
- One another dining tables belong to a similar Availableness databases. In the event your dining tables try connected dining tables, they have to be dining tables in the Accessibility format, and you also have to unlock new database where he could be kept to create referential stability. Referential ethics cannot be implemented having linked dining tables off database inside other formats.
- You simply cannot enter an admiration on the international key world of new related desk that does not exists in the primary trick of your own number one dining table. not, you can enter an excellent Null well worth on the foreign trick. That it determine that records are unrelated. Such as for instance, you simply cannot keeps your order which is assigned to a customers that would maybe not are present. Although not, you could have your order which is allotted to no-one by typing an effective Null well worth in the CustomerID job.
- You cannot remove an archive away from a primary table when the matching details exists in an associated desk. Eg, you simply can’t erase a member of staff checklist from the “Employees” table when the discover commands assigned to the brand new worker on the “Orders” desk.
- You cannot change a primary key value throughout the priple, you simply can’t changes a keen employee’s ID regarding the “Employees” desk in the event the you will find requests assigned to you to definitely personnel throughout the “Orders” table.
Cascading standing and you will deletes
To own dating where referential integrity try enforced, you might establish whether or not you desire Use of immediately cascade modify or cascade remove associated suggestions. For people who lay these types of options, erase and update operations that would constantly be prevented from the referential ethics legislation is allowed. Once you remove ideas otherwise transform number one secret philosophy within the a great first dining table, Availability makes the necessary changes to help you related dining tables in preserving referential stability.
For those who click to choose the Cascade Posting Related Fields see container after you determine a relationship, at any time that you change the number 1 secret from accurate documentation however table, Microsoft Availableness instantly updates the primary key to brand new well worth in most relevant info. Such as for instance, for individuals who transform a customer’s ID throughout the “Customers” desk, this new CustomerID job regarding the “Orders” dining table are automatically upgraded for each certainly one of one to customer’s sales so the relationship isn’t broken. Availability cascades position rather than showing any content.
In the event the first type in the main desk is an enthusiastic AutoNumber occupation, deciding on the Cascade Enhance Related Fields evaluate box doesn’t have perception as you never replace the worthy of when you look at the an AutoNumber job.