100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Essay

BTEC - LEVEL 3 - Unit 18- Database Design A2

Rating
3.0
(3)
Sold
6
Pages
3
Uploaded on
06-07-2018
Written in
2017/2018

Assignment 2 M1 D1 D2









Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
July 6, 2018
Number of pages
3
Written in
2017/2018
Type
Essay
Professor(s)
Unknown
Grade
Unknown

Subjects

Content preview

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

Reviews from verified buyers

Showing all 3 reviews
4 year ago

5 year ago

6 year ago

3.0

3 reviews

5
1
4
0
3
0
2
2
1
0
Trustworthy reviews on Stuvia

All reviews are made by real Stuvia users after verified purchases.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
OllieJ10 PEARSON
View profile
Follow You need to be logged in order to follow users or courses
Sold
125
Member since
7 year
Number of followers
99
Documents
44
Last sold
2 year ago

3.6

38 reviews

5
13
4
11
3
3
2
6
1
5

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions