Relational Data Concepts Flashcards

1
Q

What is a primary key?

A
  • A column or combination of columns
  • Uniquely identifies each row in a table
  • Cannot contain NULL values
  • Must be unique across all records
  • Used to maintain data integrity
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is referential integrity?

A
  • Ensures relationships between tables remain consistent
  • Foreign key must reference a valid primary key
  • Prevents orphaned records
  • Maintains data accuracy
  • Core concept in relational databases
How well did you know this?
1
Not at all
2
3
4
5
Perfectly