sql and databases

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/39

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.

40 Terms

1
New cards

What is a structured collection of data called?

A database.

2
New cards

What piece of software is typically used to manage a database?

A Database Management System (DBMS).

3
New cards

What are two key functions of a Database Management System (DBMS)?

It allows applications to access and modify data, and it ensures the data structure adheres to the specified data model.

4
New cards

What is a major advantage of databases over Excel in terms of data volume?

Databases can store and process enormous amounts of data, well beyond Excel's capabilities.

5
New cards

What is the most common type of database?

The relational database.

6
New cards

A relational database consists of one or more _.

tables

7
New cards

In a relational database table, what is a record?

A single entry or row in the table.

8
New cards

In a relational database table, what are fields?

The columns of the table, for which each record has values.

9
New cards

What is required for every record in a relational database table for unique identification?

A primary key.

10
New cards

The values in the column designated as the _ must be unique for each record.

primary key

11
New cards

What term describes the situation where the same information is stored multiple times in a database?

Redundancy.

12
New cards

What are two major problems caused by data redundancy?

It costs unnecessary storage space and can lead to inconsistent or contradictory data.

13
New cards

What is the standard solution to avoid redundancy in relational databases?

Using multiple tables and referring to data using primary keys.

14
New cards

When one table refers to the primary key of another table, what is this reference column called?

A foreign key.

15
New cards

A _ establishes a relationship between two tables in a database.

foreign key

16
New cards

What is the definition of how data should be stored in a relational database, including tables, columns, and data types?

The database schema.

17
New cards

What is the industry standard language for processing queries in relational databases?

Structured Query Language (SQL).

18
New cards

What are the three main categories of tasks that SQL can be used for?

Defining the database schema, inserting data, and getting data out of the database.

19
New cards

What is the first step that must be taken before data can be stored in or extracted from a database?

The data model or schema of the database must be defined.

20
New cards

Which SQL command is used to define the schema of a new table?

The CREATE TABLE query.

21
New cards

In a CREATE TABLE statement, what two things must be specified for each column?

The name of the column and its data type (e.g., INTEGER, TEXT).

22
New cards

Which SQL command is used to add new records of data into a database table?

The INSERT INTO query.

23
New cards

In an INSERT INTO statement, how should text values be enclosed?

They should be enclosed by single quotes (accents), for example, 'hello'.

24
New cards

Which SQL command is used to get data out of a database?

The SELECT query.

25
New cards

In a SELECT query, what does the FROM clause specify?

The name of the table from which to extract data.

26
New cards

What is the meaning of the asterisk (*) in the query SELECT * FROM Person;?

It means to select all columns from the table.

27
New cards

Which SQL clause is used to filter the results of a SELECT query based on a condition?

The WHERE clause.

28
New cards

Which SQL clause is used to sort the data returned by a SELECT query?

The ORDER BY clause.

29
New cards

What type of functions, such as COUNT() or AVG(), can be used to compute a value over multiple records?

Aggregate functions.

30
New cards

Which SQL aggregate function computes the number of records?

COUNT(*)

31
New cards

Which SQL aggregate function computes the average of the values in a column?

AVG()

32
New cards

Which SQL aggregate function computes the sum of the values in a column?

SUM()

33
New cards

Which SQL clause is used with aggregate functions to compute values on a 'per group' basis?

The GROUP BY clause.

34
New cards

What is the most powerful SQL operation used to combine rows from multiple related tables into one result table?

The JOIN operation.

35
New cards

What are some drawbacks of using Excel for data management compared to a database?

It has row limits, combining sheets is complex (VLOOKUPs), and it's prone to inconsistent or messy data.

36
New cards

For what tasks does Excel typically shine?

Analyzing and formatting numeric data, creating quick summary tables and charts, and easy, restriction-free editing.

37
New cards

What is the maximum number of rows that Excel can analyze in a dataset?

1,048,576 rows.

38
New cards

In which environment are databases typically used to collect and manage data?

In a 'production' environment.

39
New cards

Databases are often used as the back-end for real-time analytics tools like _.

dashboards

40
New cards

What problem can arise when combining multiple related sheets in Excel?

It may result in a lot of complex VLOOKUP usage.

Explore top flashcards