Relational Database Fundamentals

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/24

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering attributes, keys, and integrity rules from relational-database lecture notes.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

25 Terms

1
New cards

Relation

A two-dimensional table whose columns are attributes and rows are tuples; every row must be unique.

2
New cards

Attribute

A column in a relation representing a single data item, e.g., StudentID, Name, Major, GPA.

3
New cards

Tuple

A single row in a relation, such as (101, Alice, ComputerSci, 3.8).

4
New cards

Primary Key

An attribute or minimal set of attributes that uniquely identifies each tuple, e.g., StudentID in STUDENT.

5
New cards

Candidate Key

Any attribute set able to serve as a primary key because it ensures uniqueness, e.g., {StudentID, CourseID} in COURSE_ENROLLMENT.

6
New cards

Composite Key

A primary or candidate key composed of two or more attributes, like StudentID + CourseID in COURSE_ENROLLMENT.

7
New cards

Foreign Key

An attribute in one relation that references the primary key of another, linking the two tables; StudentID in COURSE_ENROLLMENT refers to STUDENT.

8
New cards

StudentID

Primary key of STUDENT and foreign key in COURSE_ENROLLMENT that identifies each student.

9
New cards

CourseID

Attribute identifying a course; forms part of the composite key {StudentID, CourseID}.

10
New cards

EnrollmentDate

Date a student enrolled in a course; not part of the composite key in COURSE_ENROLLMENT.

11
New cards

Unique Row Property

Rule that no two tuples in a relation may be identical; duplicates violate relational integrity.

12
New cards

Multivalued Attribute

An attribute that can store multiple values for a single entity, e.g., CourseTitle in the employee-training table.

13
New cards

Normalization of Multivalued Attributes

Process of ensuring each row holds a single value per attribute, often by moving the multivalued attribute to a separate relation.

14
New cards

BookID

Primary key of BOOK and foreign key referenced in PURCHASE.

15
New cards

PublisherID

Primary key of PUBLISHER; appears as a foreign key in BOOK.

16
New cards

CustomerID

Primary key of CUSTOMER; foreign key in PURCHASE linking orders to customers.

17
New cards

PurchaseID

Primary key of PURCHASE; distinguishes each purchase record.

18
New cards

Composite Key (ENROLLMENT)

The pair (StudentID, CourseID) that uniquely identifies each enrollment record.

19
New cards

Referential Integrity

Constraint ensuring every foreign-key value matches an existing primary-key value in the referenced table.

20
New cards

Non-candidate Composite Set

{StudentID, EnrollmentDate} in COURSE_ENROLLMENT lacks guaranteed uniqueness and is NOT a candidate key.

21
New cards

Invalid Customer Reference

OrderID 103 uses CustomerID 3, which does not exist in CUSTOMER, breaking referential integrity.

22
New cards

Valid ORDER_LINE Entry

Row like (101, 202, 1) where both OrderID 101 and ProductID 202 exist, maintaining referential integrity.

23
New cards

Duplicate Tuple Violation

Having two identical StudentID 101 rows breaks the unique row requirement, making the table an invalid relation.

24
New cards

Reason for Composite Keys

Used when a single attribute cannot uniquely identify a record; multiple attributes together provide uniqueness.

25
New cards

MajorID (Foreign Key)

Attribute in STUDENT and COURSE that references the primary key of MAJOR.