SQL and Database Final Exam Guide

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

1/52

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.

53 Terms

1
New cards

DBMS

Database Management System, software that enables users to create, update, and manage databases.

2
New cards

Relational database

Organizes data into tables (relations) consisting of rows and columns.

3
New cards

Primary key

A column (or set of columns) that uniquely identifies each row in a table.

4
New cards

Composite primary key

A primary key that consists of two or more columns.

5
New cards

Foreign key

A column in one table that refers to the primary key in another table.

6
New cards

Data type

Specifies the type of data a column can hold, such as integers, strings, or dates.

7
New cards

Default value

The value assigned to a column when no explicit value is provided.

8
New cards

Standard SQL

A standardized language for querying and manipulating relational databases.

9
New cards

Transact-SQL

A proprietary extension of SQL used in Microsoft SQL Server.

10
New cards

Table

A collection of related data organized into rows and columns.

11
New cards

Row

An individual record in a table.

12
New cards

Column

The field defining data attributes in a table.

13
New cards

Null value

Represents missing or unknown data.

14
New cards

Identity column

Automatically generates a unique number for each new row.

15
New cards

Result set

The collection of rows returned by a query.

16
New cards

Inner join

Retrieves rows with matching values in both tables.

17
New cards

Outer join

Includes all rows from one table and matching rows from another, with nulls for non-matches.

18
New cards

Schema

The structure that defines how data is organized, including tables and relationships.

19
New cards

Database diagram

Visually represents the structure of a database, including tables and relationships.

20
New cards

Cascading update

Automatically updates foreign key values in related tables when the primary key value is updated.

21
New cards

Boolean expression

A logical statement that evaluates to true or false.

22
New cards

Column alias

A temporary name assigned to a column in a query result.

23
New cards

Scalar function

Operates on a single value and returns a single value.

24
New cards

Aggregate functions

Perform calculations on a group of values and return a single value.

25
New cards

Subquery

A query nested inside another query.

26
New cards

String data types

Store alphanumeric characters, including CHAR and VARCHAR.

27
New cards

Implicit conversion

Automatically performed by SQL to change data types.

28
New cards

Explicit conversion

Requires functions like CAST() or CONVERT() to change data types.

29
New cards

View

A virtual table based on a query result.

30
New cards

Stored procedure

A precompiled collection of SQL statements stored in the database.

31
New cards

Normalization

Reduces redundancy and improves data integrity by organizing data.

32
New cards

First normal form (1NF)

Each column contains atomic values and each row is unique.

33
New cards

Referential integrity

Ensures relationships between tables remain consistent.

34
New cards

Index

Improves query performance by providing quick data lookups.

35
New cards

Logical operators

AND, OR, NOT operators used to combine or negate Boolean expressions.

36
New cards

Nested sort

Specifies multiple levels of sorting using ORDER BY with multiple columns.

37
New cards

Types of joins

Include inner join, outer join, and cross join.

38
New cards

Calculated value

Derived from existing data using expressions or functions.

39
New cards

System stored procedures

Built-in procedures provided by SQL Server.

40
New cards

Return value

A single value returned by a stored procedure.

41
New cards

Data structure design steps

Include identifying entities, defining attributes, and establishing relationships.

42
New cards

Second normal form (2NF)

In 1NF and all non-key attributes are fully dependent on the primary key.

43
New cards

Third normal form (3NF)

In 2NF and all attributes are dependent only on the primary key.

44
New cards

Fully-qualified object name

Specifies the database, schema, and object name.

45
New cards

Correlation name

A table alias used in queries.

46
New cards

Entity

An object or concept in a database, with attributes defining its properties.

47
New cards

Composite key

A combination of two or more columns that uniquely identify a row in a table.

48
New cards

Unnormalized data structure

Contains data that has not been organized to eliminate redundancy.

49
New cards

Wildcard

A character used in search patterns, such as % or _.

50
New cards

Concatenation operator

Combines two or more strings into a single string.

51
New cards

Benefits of views

Simplify complex queries and enhance security by restricting data access.

52
New cards

Script

A collection of SQL statements written in a file or batch for execution.

53
New cards

Normalization in database design

Organizes data to reduce redundancy, improve consistency, and simplify maintenance.