Database Systems Final Exam

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

1/129

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

130 Terms

1
New cards

SQL

is a domain-specific programming language designed for managing and communicating with data held in a relational database management system

2
New cards

SQL is used for:

-creating databases

-adding, modifying and deleting database structures

-inserting, deleting and modifying records in databases

-querying databases

3
New cards

Data Definition Language (DDL)

used to create and modify the structure of the database

example: CREATE ALTER or DROP

4
New cards

Data Manipulation Language (DML)

used to insert, modify, delete and retrieve data

example: INSERT INTO UPDATE or DELETE

5
New cards

Data Retrieval Language (DRL)

used to query or retrieve data from a database

example: SELECT

6
New cards

Data Control Language (DCL)

used for data access control

7
New cards

Transaction Control Language

used for managing database transactions

8
New cards

Keywords

These have a very specific meaning in the language. The statement must have at least one. These often define the operation that is performed

9
New cards

Identifiers

These refer to the names of the tables and columns that are called or manipulated

10
New cards

Null Value

is a marker for data that has not been entered or is missing, unknown, or inapplicable

11
New cards

Not Null Constraint

is only a column constraint and not a table constraint; if you don't specify a _____, the column will accept null values by default

12
New cards

Unique Constraint

forces each value of a column or table to be unique

13
New cards

Check Constraint

allows for limiting a particular column based on a particular value rules

These include:

minimum or maximum value

specified value

range of values

14
New cards

ALTER table

provides the ability to:

-add/drop a column

-alter a column's data type

-rename a column

-rename a table

-add, alter or drop a column's default value or null ability constraint

-add, alter or drop column or table constraints such as primary key, foreign key, unique and check constraint

15
New cards

Select Statement

is the basic building block of any data query request. It is command that pulls specific data from a particular table within the database highlighted

16
New cards

Limit Statement

it limits the number of rows that are shown

17
New cards

Order By

is used to sort by data in a particular column or columns

18
New cards

Select Distinct

eliminates duplicate values

19
New cards

Where

can be used in combination with boolean comparators for columns that are numeric or integers

20
New cards

Like

allows to find similar text, but is case sensitive

21
New cards

%

wildcard placeholder for text used with LIKE or ILIKE statements

22
New cards

ILIKE

same as LIKE statement but not sensitive to capitalization

23
New cards

IN

equivalent to multiple OR statements

24
New cards

Between

can be used to find a range instead of using > and <

25
New cards

NOT

can negate IN, Between, LIKE or conditional statement

26
New cards

derived column

is the result of a calculation and is created with a SELECT --- clause expression that is something other than a simple reference to the column

27
New cards

COALESCE

replaces NULL values with another value

28
New cards

CAST

changes the data type of a column in the query

29
New cards

Concatenating Strings

combining strings together

30
New cards

Trim

removes trailing and leading blank spaces

31
New cards

Upper

displays columns as UPPER case

32
New cards

Lower

displays column as lower case

33
New cards

INITCAP

displays column as proper case

34
New cards

Length

Returns the length in characters of a string

35
New cards

Substring

is any sequence of contiguous characters from the source string

36
New cards

Right

pulls the right n characters of a string

37
New cards

Left

returns left n characters of a string

38
New cards

Mid

Returns the characters n from the left and o from the right

39
New cards

Position

returns the position of a given string

40
New cards

replace

replaces value 1 with value 2 in a column

41
New cards

count

returns the number of times a column appears

42
New cards

count distinct

returns the number of unique columns in a array

43
New cards

avg

calculates the average of a column

44
New cards

sum

adds the values in a column

45
New cards

max

returns the maximum value in a column

46
New cards

min

returns the minimum value in a column

47
New cards

Group By

returns a single value for each value in the column(s) specified in the ____ clause

48
New cards

Having

if you want to use a filter that contains an aggregate function, you can't use WHERE

49
New cards

Date_Part

pulls out a specific date part from a date

50
New cards

Extract

same as date_part

51
New cards

current_date/time

returns the current date or current time

52
New cards

age

returns the difference between two date/time columns

53
New cards

make_date/time

creates a date or time

54
New cards

NOW

returns the current date and time

55
New cards

Date_Trunc

truncates date/time to specified interval

56
New cards

Joins

allows you to combine data from two relational tables for additional insights

57
New cards

Inner Join

selects all rows from both tables as long as there is a match between the columns in both tables

58
New cards

Left (or Right) Join

returns all rows from the left (or right) table, even if there are no matches in the right (or left) table

59
New cards

Full joins

selects all rows from both tables even if there is no match

60
New cards

Cross Joins

returns all rows from the first table in which each row from the first table is combined with all rows from the second table

61
New cards

natural joins

special case of inner join; compares all the columns in one table with corresponding columns that have the same name in the other table

62
New cards

Where

It's possible to use the WHERE syntax instead of ON

63
New cards

Set Operations

UNION, INTERSECT, & EXCEPT

used to combine the results of two or more SELECT statements that are union compatible

64
New cards

Union

used to combine the union compatible results of two SELECT statements by listing all rows from the result of the first SELECT statement and all rows from the result of the other SELECT statement

65
New cards

Intersect

combines the results of two SELECT statements that are union compatible by listing every row that appears in the result of BOTH the SELECT statements

66
New cards

Except

combines the results of two queries into a single result that has the rows that belong to only the first query

67
New cards

Subqueries

when you embed one SELECT statement inside another

68
New cards

nested subquery

is a type of subquery where the outer query uses the results of the inner query to select data

69
New cards

referential integrity constraint

in each row of a relation containing a foreign key, the value of the foreign key EITHER matches one of the values in the primary key column of the referred relation OR the value of the foreign key is null

70
New cards

Delete Restrict

option does not allow a record to be deleted if its primary key value is referred by a foreign key

71
New cards

Delete Cascade

option allows a record to be deleted if its primary key value is referred to by a foreign key value

72
New cards

Delete Set-to-Null

option allows a record to be delete if its primary key value is referred to by a foreign key value

returns it to a null value

73
New cards

Delete Set-to-Default

option allows a record to be deleted if its primary key value is referred to by a foreign key value

allows you to pick the number

74
New cards

Update Restrict

option does not allow a record to be updated if its primary key value if its primary key value is referred to by a foreign key

75
New cards

Update Cascade

option allows a record to be updated if its primary key value is referred to by a foreign key value

76
New cards

Update Set-to-Null

option allows a record to be updated if its primary key value is referred to by a foreign key value

sets value to null

77
New cards

update set-to-default

option allows a record to be updated if its primary key value is referred to by a foreign key value

allows you to set the number

78
New cards

Index

mechanism for increasing the speed of data search and data retrieval on relations with a large number of records

79
New cards

accuracy

the extent to which data correctly reflects the real-world instances it is supposed to depict

80
New cards

uniqueness

requires each real-world instances to be represented only once in the data collection

81
New cards

completeness

the degree to which all the required data is present in the data collection

82
New cards

consistency

the extent to which the data properly conforms to and matches up with the other data

83
New cards

timeliness

the degree to which the data is aligned with the proper time window in its representation real world

84
New cards

conformity

the extent to which the data conforms to its specified format

85
New cards

preventive data quality actions

actions taken to preclude data quality problems

86
New cards

corrective data quality actions

actions taken to correct the data quality problems

87
New cards

data entry forms

enable data input and retrieval for end users

88
New cards

data manipulation forms & search forms

can be used to delete and update items as well

89
New cards

reports

present the data and calculations on the data from one or more tables from the database in a formatted way

90
New cards

application development component

used to develop front-end applications

91
New cards

view materialized

saving a view as an actual physical table

92
New cards

catalog

the data dictionary created by the DBMS

93
New cards

authentication

login procedure using user ID and password

94
New cards

access privileges

assigned to the database user account

95
New cards

authorization matrix

implements the access privileges

provided by the DBMS but managed by the DBA

96
New cards

encryption

scrambles data so that information becomes unreadable unless someone has an encryption key

97
New cards

encryption key

information scrambling algorithm

98
New cards

decryption key

reverts the informations to its original state

99
New cards

backup

saving additional physical copies of the data

100
New cards

recovery

recovering the content of the database after a failure