Ask a question from expert

Ask now

Understanding Relationships and Keys in Databases

2 Pages813 Words269 Views
   

Added on  2019-09-16

About This Document

This article explains the concepts of relationships, primary and foreign keys, referential integrity, and data validation in databases. It also highlights the advantages of using databases for businesses. The article covers one-to-many and many-to-many relationships, and how entities can be related to each other using primary and foreign keys. It also discusses referential integrity and how it ensures consistency in relationships between tables. Finally, the article explains how data can be validated when entered into a database.

Understanding Relationships and Keys in Databases

   Added on 2019-09-16

BookmarkShareRelated Documents
Transcript of Copy of Unit 18 P1Entities can be related to each other through the Primary Key and Foreign Key because, instead of typing the entities all over again you can use a key on another part of a database and link the entities through it. What are Relationships? What do they do?What is a Primary Key?What advantages are there with using a database1. Databases save time. Retrieving a single record, which may take several minutes of digging in a paper-based filing system, can be done with just a few clicks in a computerized database. Merging database records with documents makes producing paper reports almost instantaneous2. Databases give you lots of different ways to look at your data. A request for a specific answer or list from your database called a "query" can take just a minute or two to write, as opposed to hand-collating data records or sorting and resorting a spreadsheetUnit 18 P14. Well organized system which enable you to search for a particular name in the most quickest wayA primary key is a unique identifier for a database record. For example, When a table is created one of the fields is assigned as the primary key. While the primary key is often a number, it may also be a text field or other data type.What is a Foreign Key?A Foreign Key is a key that is a column of groups or a group of columns in a relational database table that provides a link between data in two table. For example you may link a ID (Primary Key of a section) to another part of a database and then itwill make a copy of an id and will then be transferred as a Foreign key.A one-to-many relationship occurs when a parent record in one table can potentially reference several child records in another table. In a one-to-many relationship, the parent is not required to have child records; therefore, the one-to-many relationship allows zero child records, a single child record or multiple child records. The important thing is that the child cannot have more than one parent record.
Understanding Relationships and Keys in Databases_1

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
ASSIGNMENT | ASSIGNMENT 0N REPORT.
|13
|1369
|19

Systems Analysis and Database Design
|6
|1361
|25

Diploma of Information Technology: Assessment Task 1
|7
|1343
|389

Entity Relationship Diagram in Library Management System
|25
|2195
|76

Conceptual and Logical Database Model
|12
|1314
|479

Database Design and Implementation | Normalization
|11
|1603
|21