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/16

encourage image

There's no tags or description

Looks like no tags are added yet.

17 Terms

1
New cards

What does a relational database define?

Relationships within tables of data inside the database.

2
New cards

How does a relational database differ from a spreadsheet?

It is more powerful, secure, and allows more people to access data simultaneously.

3
New cards

What is SQL?

Structured Query Language, the most widely used programming language for databases.

4
New cards

What are the two main components of a database table?

Rows (records) and Columns (fields).

5
New cards

What must be true about field names in a database?

Field names must be lowercase, singular, contain no spaces, and cannot have the same name as another field.

6
New cards

What is the purpose of a unique identifier in a database?

To distinguish records from one another within the same table.

7
New cards

What is a string in the context of data types?

A sequence of characters such as letters or punctuation.

8
New cards

What does VARCHAR represent?

A flexible and popular string data type that can store very long strings.

9
New cards

What is the function of a schema in a database?

It serves as a blueprint of the database, outlining what tables are included and their relationships.

10
New cards

What is a server in relation to a database?

A centralised computer that performs services over a network, including data access.

11
New cards

What type of SQL query would you use to select all fields from a table?

SELECT * FROM table_name;.

12
New cards

How do you select distinct records?

Using the query SELECT DISTINCT column_name FROM table_name;.

13
New cards

What is a view in SQL?

A virtual table that is the result of a SELECT statement, automatically updating in response to database changes.

14
New cards

What distinguishes PostgreSQL from SQL Server?

They are both relational database systems but have different keywords and features.

15
New cards

What do the keywords SELECT and FROM do in an SQL query?

SELECT indicates the fields to be selected, while FROM indicates the table that those fields are located in.

16
New cards

What is the purpose of aliasing in SQL?

To rename columns in a query for clarity or brevity without changing the actual table.

17
New cards

What is the significance of the LIMIT clause in an SQL query?

It limits the number of results returned, useful for testing code.