Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Ensayo

BTEC - LEVEL 3 - Unit 18- Database Design A2

Puntuación
3.0
(3)
Vendido
6
Páginas
3
Subido en
06-07-2018
Escrito en
2017/2018

Assignment 2 M1 D1 D2

Institución
Grado

Vista previa del contenido

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

Libro relacionado

Escuela, estudio y materia

Nivel de Estudio
Editores
Tema
Curso

Información del documento

Subido en
6 de julio de 2018
Número de páginas
3
Escrito en
2017/2018
Tipo
ENSAYO
Profesor(es)
Desconocido
Grado
Desconocido

Temas

$6.11
Accede al documento completo:
Comprado por 6 estudiantes

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF


Documento también disponible en un lote

Reseñas de compradores verificados

Se muestran los 3 comentarios
5 año hace

6 año hace

6 año hace

3.0

3 reseñas

5
1
4
0
3
0
2
2
1
0
Reseñas confiables sobre Stuvia

Todas las reseñas las realizan usuarios reales de Stuvia después de compras verificadas.

Conoce al vendedor

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
OllieJ10 PEARSON
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
125
Miembro desde
7 año
Número de seguidores
99
Documentos
44
Última venta
2 año hace

3.6

38 reseñas

5
13
4
11
3
3
2
6
1
5

Documentos populares

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes