Unit 9- Databases Flashcards

(30 cards)

1
Q

Define Databases

A

structures collection of data that allows people to extract information in a way that mees their needs

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

Define single-table databases

A

a database that contains only one table

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

Define table

A

a collection of related records in a database

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

Define record

A

a collection of fields that describe one item

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

Define field

A

a column in a database- a specific type of information under a category

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

define datatype [2]

A

the way a data is stored or displayed
- it also defines the operations that can be performed on the stored value

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

What is Text/alphanumeric as a datatype

A

A number of characters

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

What is Character as a datatype

A

a single character

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

What is Integer as a datatype

A

whole number

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

What is boolean as a datatype

A

One of the two values: true/false yes/no 0/1

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

What is float/real as a datatype

A

a decimal number

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

What is Date/Time as a datatype

A

Date and/or Time

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

Define Primary key

A

a field that uniquely identifies the record

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

Define SQL

A

Structured Query Language- to write scripts to get information from a database.

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

What does SQL- SELECT do? [2]

A

fetches specified fields- all queries begin with select

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

What does SQL- FROM do?

A

Identifies the table to use

17
Q

What does SQL- WHERE do?

A

Includes only records (rows) that match the given condition

18
Q

What does SQL- ORDER BY do?

A

Sorts results from query (numerically or alphabetically)

19
Q

What does SQL- SUM do?

A

returns the sum of all values in a field

20
Q

What does SQL- COUNT do?

A

Counts number of records where the field matches give condition.

21
Q

SQL script- creating databases

A

create database <database_name>;</database_name>

22
Q

SQL script- creating table

A

create table <table_name>(
field1name datatype (memory aloc),
field2name, datatype (memory aloc),
field3name datatype (memory aloc
);</table_name>

23
Q

SQL script- Inserting data into table

A

insert into <table_name> (field1, field2, field3)
Values
(value1, value2, value3)
(value1, value2, value3);</table_name>

24
Q

SQL script- Select everything in table

A

Select*from <table_name></table_name>

25
SQL script- Select particular field
SELECT from ;
26
SQL script- Selecting multiple fields
SELECT , from
;
27
SQL script- selecting based on conditions [3]
SELECT * FROM WHERE ; AND: SELECT * FROM WHERE AND ; OR: SELECT * FROM WHERE OR ;
28
SQL script- Ordering a table
SELECT * FROM
ORDER BY (Order is ASC or DESC)
29
SQL script- Count total number of data in a field
SELECT COUNT( from
Condition: SELECT COUNT( from
WHERE Grade=1
30
SQL script- Sum all numerical elements
SELECT SUM() From
; Condition: SELECT SUM() From
WHERE ;