COSC 304 Midterm #1

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

1/42

flashcard set

Earn XP

Description and Tags

Covers topics from Slides 1-6.

Last updated 3:32 AM on 10/7/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

43 Terms

1
New cards

DDL

Data Definition Language

2
New cards

DML

Data Manipulation Language

3
New cards

DB External Level

The user’s view of the database that provides the part of the database relevant to the user

4
New cards

DB Conceptual Level

The logical structure of the database that describes what data is stored and its relationships

5
New cards

DB Internal Level

The physical representation of the database

6
New cards

Schema

A description of the structure of the database

7
New cards

Relation

A table with columns and rows

8
New cards

Attribute

A column of a relation

9
New cards

Tuple

A row of a relation

10
New cards

Domain

A set of allowable values for an attribute

11
New cards

Degree of a relation

How many attributes the relation contains

12
New cards

Cardinality of a relation

How many tuples the relation contains

13
New cards

Intension

The structure (schema) of the relation, including its attributes and domains

14
New cards

Extension

The set of tuples currently in the relation

15
New cards

Relation schema

Consists of attributes where each attribute has a name and a domain

16
New cards

Relation instance

A set of n-tuples where each is an element of the domain or is NULL

17
New cards

Superkey

A set of attributes that uniquely identifies a tuple in a relation

18
New cards

Candidate key

A minimal set of attributes that uniquely identifies a tuple in a relation

19
New cards

Primary key

The candidate key selected as the primary identifier for tuples in the relation

20
New cards

Foreign key

A set of attributes in one relation that refers to a key in the same or another relation

21
New cards

Domain constraint

Every value for an attribute must be an element of the attribute’s domain or be NULL

22
New cards

Entity integrity constraint

No attribute of a primary key can be NULL

23
New cards

Referential integrity constraint

A non-NULL foreign key value must match an existing value of the referenced key

24
New cards

σ

Selection operator - filter rows

25
New cards

π

Projection operator - keep only certain columns

26
New cards

×

Cartesian product operator - combine two tables in all possible ways

27
New cards

⋈

Join operator - combine two tables based on a condition

28
New cards

U

Union operator - keep rows in either of two tables

29
New cards

-

Difference operator - keep rows in first table that are not in second

30
New cards

∩

Intersection operator - keep rows that are in both tables

31
New cards

Predicate

The filtering condition of a boolean expression

32
New cards

Union-compatible

1) Both relations must have the same number of attributes
2) Corresponding attributes must have compatible domains/data types

33
New cards

A cartesian product has a total number of R _ S attributes and R _ S tuples.

+, *

34
New cards

Equijoin

A join that only contains the equality operator the the formula

35
New cards

Natural join

Equijoins attributes having the same name in both relations and includes one copy of each named attribute

36
New cards

Left outer join

Returns the normal join result plus unmatched tuples from the left relation, padded with NULL values for attributes from the right relation

37
New cards

Right outer join

Returns the normal join result plus unmatched tuples from the right relation, padded with NULL values for attributes from the left relation

38
New cards

Full outer join

Returns the normal join result plus unmatched tuples from both relations

39
New cards

Semi-join

Returns tuples from the first relation that have at least one matching tuple in the second relation.

40
New cards

Anti-join

Returns tuples from the first relation that have no matching tuple in the second relation

41
New cards

SQL Identifiers

Used to identify objects in the database such as tables, views, and columns

42
New cards

Equity Integrity Constraint

The primary key of a table must contain a unique, non-null value for each row

43
New cards

Referential Integrity Constraint

If a foreign key contains a value that is not NULL, that value must be present in some tuple in the relation containing the referenced key