SQL Overview and Commands

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

1/35

flashcard set

Earn XP

Description and Tags

Flashcards based on lecture notes about SQL, covering its history, purpose, and usage.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

36 Terms

1
New cards

SQL

Structured Query Language, the standard language for Relational Database Management Systems (RDBMS).

2
New cards

RDBMS

A database management system that manages data as a collection of tables in which all relationships are represented by common values in related tables.

3
New cards

1970

E.F. Codd developed the relational database concept.

4
New cards

1974-79

IBM Research Lab created System R with Sequel (later SQL).

5
New cards

1979

Oracle marketed the first relational database with SQL.

6
New cards

1981

SQL/DS, the first available RDBMS system on DOS/VSE, became available.

7
New cards

1986

ANSI SQL standard released.

8
New cards

Benefits of a Standardized Relational Language

Reduced training costs, productivity, application portability, application longevity, reduced dependence on a single vendor, cross-system communication.

9
New cards

Catalog

A set of schemas that constitute the description of a database.

10
New cards

Schema

The structure that contains descriptions of objects created by a user (base tables, views, constraints).

11
New cards

Data Definition Language (DDL)

Commands that define a database, including creating, altering, and dropping tables and establishing constraints.

12
New cards

Data Manipulation Language (DML)

Commands that maintain and query a database.

13
New cards

Data Control Language (DCL)

Commands that control a database, including administering privileges and committing data.

14
New cards

Strings SQL Data Type

CHARACTER (n), VARYING CHARACTER (n).

15
New cards

Binary SQL Data Type

Binary Large Object (BLOB).

16
New cards

Number SQL Data Type

Numeric (precision, scale), Decimal (p, s), Integer.

17
New cards

Temporal SQL Data Type

Timestamp, Timestamp with local time zone.

18
New cards

Boolean SQL Data Type

True or False values.

19
New cards

CREATE SCHEMA

Defines a portion of the database owned by a particular user.

20
New cards

CREATE TABLE

Defines a new table and its columns.

21
New cards

CREATE VIEW

Defines a logical table from one or more tables or views.

22
New cards

Referential integrity

ensures that foreign key values of a table must match primary key values of a related table in relationships

23
New cards

ALTER TABLE statement

Allows you to change column specifications (add, delete, modify columns).

24
New cards

DROP TABLE statement

Allows you to remove tables from your schema.

25
New cards

INSERT Statement

Adds one or more rows to a table.

26
New cards

DELETE Statement

Removes rows from a table.

27
New cards

UPDATE Statement

Modifies data in existing rows.

28
New cards

MERGE Statement

Allows combination of Insert and Update in one statement.

29
New cards

Creating indexes

Speed up random/sequential access to base table data

30
New cards

SELECT clause

List the columns (and expressions) to be returned from the query

31
New cards

FROM clause

Indicate the table(s) or view(s) from which data will be obtained

32
New cards

WHERE clause

Indicate the conditions under which a row will be included in the result.

33
New cards

GROUP BY clause

Indicate categorization of results.

34
New cards

HAVING clause

Indicate the conditions under which a category (group) will be included.

35
New cards

ORDER BY clause

Sorts the result according to specified criteria.

36
New cards

Boolean Operators

AND, OR, and NOT Operators for customizing conditions in WHERE clause