SQL basics Flashcards

1
Q

Database

A

-organized collection of data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Relational Database

A
  • link data in one table to related data in another table
  • tables are like named spreadsheets that each track a single idea or type of record
  • columns are the properties of each record (name, age, etc)
  • each row is itself a record (values)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

SQL

A

Structured Query Language

  • a standard for database languages
  • managed by the American National Standards Institute
  • it is easy to red by design
  • you can
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Query

A

A single SQL statement

-statements are used to perform tasks or issue commands to an RDBMS – that is, a Relational Database Management System. For example, you can update data in, or retrieve information from, a table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

SQL Sub-Languages

A

DDL
DML
TCL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

DDL : Data Definition Language

A

statements that define database structure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

DML : Data Manipulation Language

A

statements that manipulate table data

CRUD: Create, read, update, delete

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

TCL : Transaction Control Language

A

statements that control the execution of queries

-transaction: a group of SQL statements executed together

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Columns in tables

A

-each column holds a single type of data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Column data type

A
  • varchar: text data of variable length
  • integer: 32-bit, signed whole numbers
  • smallint: 16-bit, signed whole numbers
  • number (n,d): decimal numbers with limited significant figures
  • float: floating point numbers
  • date: a d/m/yyy record
  • timestamp: a combination of a date and time

-for every data type you can have a null value which means the cell for a row is empty

How well did you know this?
1
Not at all
2
3
4
5
Perfectly