Intro to database Week 3 (midterm)

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

1/12

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 7:24 AM on 4/12/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

13 Terms

1
New cards

Relations

using math & logic to represent data models

2
New cards

how do you distinguish rows (tuple) in a table (informal)

by using keys

3
New cards

Domain of values (formal)

set of possible values for a certain attribute R(A1,A2,…,An)

4
New cards

What is the informal terms of a table/relation

Table

Column header

All possible column values or data type

Row

Table definition

Populated table

5
New cards

What is the formal terms of a table/relation

Relation

Attribute

Domain

Tuple

Schema

State of the Relation

6
New cards

What are the three main characteristics of Relations

  1. Tuples are NOT ORDERED because relation is a SET of tuples

  2. Attributes in a tuple ARE ORDERED

  3. Values in tuple are ATOMIC null = unknown

7
New cards

What are the three types of key constraints

Super key: set of attributes where no two tuples will have same super key

Candidate key: minimal super key where removal of an attribute from it does not make another key

Primary key: the actual candidate key chosen

8
New cards

Entity integrity

the primary key attributes of each relation cannot have null values

9
New cards

Referential Integrity

when two relations have a relationship however the foreign key can only be an existing primary key of another relation or NULL

10
New cards

What are the two Relations states

Relational database state: a union of all the individual relation states at a particular time

Transaction: group of UPDATE operations

11
New cards

What are the 3 main ways to modify relations

INSERT: insert new tuple to relation

DELETE: remove old tuple

UPDATE: change attribute of tuple of relation

12
New cards

Propagation

Changes that occur automatically to maintain valid constraints

13
New cards

How do you handle violation of constraints

RESTRICT (REJECT): cancel operation that causes violation

CASCADE: propagate the operation (in DELETE, we delete referencing tuples)

SET NULL: set foreign keys of referencing tuples to NULL