100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
BTEC - LEVEL 3 - Unit 18- Database Design A2 £3.99   Add to cart

Essay

BTEC - LEVEL 3 - Unit 18- Database Design A2

3 reviews
 487 views  6 purchases

Assignment 2 M1 D1 D2

Preview 1 out of 3  pages

  • July 6, 2018
  • 3
  • 2017/2018
  • Essay
  • Unknown
  • Unknown
book image

Book Title:

Author(s):

  • Edition:
  • ISBN:
  • Edition:
All documents for this subject (19)

3  reviews

review-writer-avatar

By: Wafi176 • 3 year ago

review-writer-avatar

By: nayayoung • 4 year ago

review-writer-avatar

By: million • 5 year ago

avatar-seller
OllieJ10
Primary Keys And Referential Integrity- M1
We use primary keys for two main functions which are as a means of ensuring that records
in a table are unique and to link records in a table to records in another table. There are
many situations where you will want to ensure that records are unique. For example if you
have a database of names, you may want to ensure that duplicate names cannot be
entered. you might then create a compound primary key of First Name and Last Name. That
way, if you already had a record for John Smith, then an attempt to enter a second John
Smith would fail with an error message about duplicate keys.

You also use a primary key to create one-to-many links between two tables. When using a
primary key to link records, using a numeric primary key is often the most handy way to do
this. In Access, an Autonumber field is automatically filled in with an integer number that is
unique in the database. For example, in a table with an AutoNumber field, the very first
record entered will have 1 in the AutoNumber field, the second record will have 2 entered in
that field, and the third record will have 3 entered in that field.

For example, if you have a Customers table, you might create an AutoNumber field for
Customer ID in the table, to be the primary key. You could then use the CustomerID field as
the key to link data contained in other tables to the Customers table.

MS Access really wants users to have a primary key in all tables, and if you create a new
table without also creating a primary key, Access will offer to create a primary key for you.
When creating a primary key, Access adds an AutoNumber field to your table.

Referential integrity is a relational database concept, which states that table relationships
must always be consistent. In other words, any foreign key field must agree with the primary
key that is referenced by the foreign key. Therefore, any primary key field changes must be
applied to all foreign keys, or not at all. The same restriction also applies to foreign keys in
that any updates must be propagated to the primary parent key.

Using a relational database management system with referential integrity offers several
advantages. These include the prevention of data duplication which can lead to a database
being filled with useless data; as well as prevention of one table from pointing to nonexistent
fields in other tables; the guaranteed consistency of linked tables; the deletion of records that
contain a value referring to a foreign key in another table; and the prevention of records
being added to a table that contains a foreign key unless there is a primary key in the linked
table.




Evaluation Of Database Issues- D1

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller OllieJ10. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for £3.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

64438 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy revision notes and other study material for 14 years now

Start selling
£3.99  6x  sold
  • (3)
  Add to cart