Oracle 12c: SQL
Oracle 12c: SQL
3rd Edition
ISBN: 9781305251038
Author: Joan Casteel
Publisher: Cengage Learning
bartleby

Concept explainers

Expert Solution & Answer
Book Icon
Chapter 1, Problem 7RQ

Explanation of Solution

Difference between a foreign key and a primary key:

Foreign keyPrimary key
A primary key attribute in one table is the foreign key for another table. In a logical way, a foreign key is used to establish a link between two tables.In relational databases, a primary key is a key that is used for identifying and defining the characteristics uniquely of each row.
A foreign key is used for identifying a row of another table uniquely.A primary key may have a single attribute or multiple attributes.
A foreign key may be a field or group of fields in a table. As a foreign key may be a column or group of columns.The primary key will contain a unique value for each row of data.
Foreign key must not be null when the minimum cardinality of a data in a column of a table is implied as one...

Blurred answer
Students have asked these similar questions
How is a foreign key different from a primary key?
Explain the difference between Primary Key and Foreign Key , give example
Candidate Key is a key that     may have many duplicates     may be absent     may be a foreign key     contain only unique values and fully defines all other attributes in a row
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Text book image
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning
Text book image
Principles of Information Systems (MindTap Course...
Computer Science
ISBN:9781305971776
Author:Ralph Stair, George Reynolds
Publisher:Cengage Learning
Text book image
CMPTR
Computer Science
ISBN:9781337681872
Author:PINARD
Publisher:Cengage
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
Principles of Information Systems (MindTap Course...
Computer Science
ISBN:9781285867168
Author:Ralph Stair, George Reynolds
Publisher:Cengage Learning
Text book image
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr