Databases Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is a database?

A

Structured, persistent collection of related data

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

What data format is String?

A

Any combination of characters

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

What data format is Character?

A

A single character

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

What data format is integer?

A

Any whole number

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

What data format are real numbers?

A

Any numeric data with a decimal point

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

What data format is Boolean?

A

True or False, 1 or 0

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

What data format is Date/Time?

A

A data type that stores dates and/or time

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

What is entity in database?

A

Something that we store data about

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

What is fields in database?

A

The Attributes of a record, tables on the top

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

What is record in database?

A

A row of information about an entity

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

What is primary key in database?

A

Unique for each record in the table so there are no duplicate records

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

What does SQL stand for and what does it do?

A

Structured Query Language, manipulates a databse.

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

What will this query do? SELECT * FROM ExampleTable

A

It will return all complete records from that table

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

What will this query do? SELECT * FROM ExampleTable WHERE Name = ‘John’;

A

Return all records from ExampleTable where the field Name is equal to John

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

What will this query do? SELECT * FROM ExampleTable WHERE Name = ‘John’ ORDER BY favoriteMovie;

A

Return all records from ExampleTable where the field Name is equal to John and the data will be ordered by the field favoriteMovie in alphabetical order.

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

What will this query do? SELECT * FROM ExampleTable WHERE Name = ‘John” ORDER BY favoriteMovie DESC;

A

Return all records from ExampleTable where the field Name is equal to John and the data will be ordered by the field favoriteMovie in descending alphabetical order.

17
Q

What query can we use to count how many records exist in a table?

A

SELECT COUNT(movieID) FROM IMDBTop20;

18
Q

What query can we use to find the sum of a number of records?

A

SELECT SUM(Budget) FROM IMDBTop20;

19
Q

What query can we use to find the average of a number of records?

A

SELECT AVG(Budget) FROM IMDBTop20