460 - Topic 8 - Structured Query Language (SQL)

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

1/14

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 7:01 PM on 4/15/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

15 Terms

1
New cards

What is the form of SELECT?

knowt flashcard image
2
New cards

What is the form of a project? (remember: there is no project operator in SQL)

knowt flashcard image
3
New cards

How to alias a column in SQL?

knowt flashcard image
4
New cards

Why does SQL not remove duplicate tuples by default?

  1. Duplicates can be meaningful sometimes

    1. overhead

5
New cards

How does ascending/descending ORDER BY work?

knowt flashcard image
6
New cards

What is a computed column? Give an example

A column which is created via basic arithmetic with field values

<p>A column which is created via basic arithmetic with field values</p>
7
New cards

SQL supports pattern matching, what is its form and what are the 2 wildcards and meaning

Form:
WHERE attribute [optional: not] LIKE ‘pattern’

Wildcards:
_ (underscore) matches any single character
EX: Lon__n (would match ‘London’)
% matches 0 or more characters
EX: ‘%Tucson%’ (would match ‘CSC 460 Dr Tucson AZ"‘

8
New cards

What are the 6 different REGEXP_LIFE options for <pattern>?

knowt flashcard image
9
New cards

What is a barebones/conventional Cartesian Product in SQL?

SELECT *
FROM S, R;

10
New cards

What is set difference named in Oracle? SQL?

MINUS, EXCEPT

11
New cards

What is the purpose of GROUP BY?

To apply aggregates to sub-groups of tuples

^ (McCann def.)
It arranges the data into groups based on some common value specified, and is often used with aggregate functions

12
New cards

What is the purpose of HAVING?

To filter the groups returned by GROUP BY based on some condition(s)

13
New cards

What are IN and NOT IN operators used for?

Testing membership in a set

EX: WHERE guestName IN authorizedGuestList;

14
New cards

What is the EXISTS operator used for?

Testing if a relation holds at least one tuple

15
New cards

What is an informal description of how the count(*) division trick works in SQL?

This solution involves counting the number of distinct items in the divisor relation, and finding all