Relational Databases

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/28

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:22 AM on 5/16/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

29 Terms

1
New cards

Database Model

  • Data Structures - how data is organized

  • Operations - Manipulated data structured

  • Rules - Govern valid data

2
New cards

Data Model

Conceptual Tool for describing data relationships, semantics, constraints

3
New cards

Relational Database Management System (RDBMS)

A DBMS based on a relational model for organizing and managing data

4
New cards

Relation

Table in a relational database

5
New cards

Relational Model

Data model based on relations (tables) where it is organized in rows and columns

6
New cards

Table

Has name, fixed tuple of columns, and set of rows

7
New cards

Tuple

Ordered collection of elements; row in relational database

8
New cards

Column

Name and a data type

9
New cards

Row

Unnamed tuple of values

10
New cards

Data Type

Named set of values

11
New cards

ALTER TABLE

Adds, deletes, or modifies columns on an existing table

12
New cards

Relational Operations

  • SELECT

  • PROJECT

  • PRODUCT

  • JOIN

  • UNION

  • INTERSECT

  • DIFFERENCE

  • RENAME

  • AGGREGATE

13
New cards

Relational Rules

Part of relational model, governs data in every relational database

14
New cards

Types of Relational Rules

  • Unique Primary Key

  • Unique column names

  • No duplicate rows

15
New cards

Business Rules

State that defines/constraints something of a business

16
New cards

Constraint

Rules for relations, specifying conditions for valid data

17
New cards

Data Definition Language (DDL)

Defines Database structure

  • CREATE

  • ALTER

  • DROP

18
New cards

Data Manipulation Language (DML)

  • SELECT

  • INSERT

  • UPDATE

  • DELETE

19
New cards

NULL

Unknown/inapplicable/does not exist; NOT zero

20
New cards

INSERT

Adds rows to a table

21
New cards

UPDATE

Modifies existing rows

22
New cards

DELETE

Deletes existing row

23
New cards

Primary Keys

  • Unique

  • Not NULL

  • Usually left side

24
New cards

Composite Primary Key

  • Unique - together they must be unique

  • NOT NULL

  • Minimal - Meaning that all the columns are needed to be unique, and if one were removed, there would be repeating/non-unique pairs

25
New cards

Auto-Increment Column

  • Only once in each table

  • No default value

  • Integer data type ONLY

  • Have an Index

26
New cards

Foreign Keys

  • Data type must be the same as primary key

  • Column names can be different

  • May be NULL

  • Not Unique

27
New cards

Referential Integrity Rule

Relational Rule that requires foreign key values to either be fully NULL or match some primary key value

No partially NULL ALLOWED - Mainly for composite foreign keys

28
New cards

Referential Integrity Violations

  • A primary key (value) is updated (aka changed)

  • A foreign key (value) is updated (to some nonmatching number)

  • A row containing a primary key is deleted

  • A (new) row containing a foreign key is inserted (and doesn’t match)

29
New cards

Referential Integrity Actions

  • RESTRICT - Rejects referential integrity violations

  • SET NULL - sets invalid foreign keys to NULL

  • SET DEFAULT - sets invalid foreign keys to foreign key default

  • CASCADE - when a primary key is deleted, matching foreign key rows are deleted as well