4.10.4 Stuctured Query Language (SQL)

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

1/12

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.

13 Terms

1
New cards

What is SQL?

A language used to work with databases

→ Declarative language

2
New cards

What are the key SQL commands?

- SELECT

- UPDATE

- INSERT

- DELETE

3
New cards

What is the SELECT command used for?

Data retrieval

4
New cards

How is the SELECT command used?

SELECT [attribute]

FROM [table]

WHERE [condition]

5
New cards

What is the UPDATE command used for?

Modifying the attributes of an existing entity

6
New cards

How is the UPDATE command used?

UPDATE [table]

SET [attribute] = [value]

WHERE [attribute] = [value]

7
New cards

What is the DELETE command used for?

Removing entities from a database

8
New cards

How is the DELETE command used?

DELETE FROM [table]

WHERE [condition]

9
New cards

What is the INSERT command used for?

Adding new records to an existing table

10
New cards

How is the INSERT command used?

INSERT INTO [table] ([column1], [column2], …)

VALUES ([value1], [value2]

11
New cards

How is SQL used to make new database tables?

CREATE commandH

12
New cards

How is the CREATE command used?

Specifies:

- Table name

- Attributes and their data types

- Entity identifiers

13
New cards

What are the possible data types for attributes?

- CHAR(size) - fixed length string

- VARCHAR(size) - variable length string

- INT(size)

- FLOAT(size, precision)

- DATE - yyyy-mm-dd

- DATETIME

- TIME - hh-mm-ss

- YEAR