9 Databases Flashcards

(7 cards)

1
Q

Database

A

a collection of organized data stored in a structured and logical way which can be retrieved using queries

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

Primary key

A

a field where every valued stored is unique

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

validation

A

process of examining input so only reasonable data is accepted

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

data types in SQL?

A
  • Text/Alphanumeric (letters + numbers etc.)
  • Character (single letters/symbols)
  • Boolean (true or false)
  • Integer (whole numbers; +ve & -ve)
  • Real (decimal points included)
  • Date/Time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Layout of SQL

A

SELECT… <fields> - SUM() & COUNT()
FROM <tablename>
WHERE <condition>
ORDER BY... ASCENDING/DESCENDING</condition></tablename></fields>

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

what does * do in SQL

A

all columns or all rows or replaces any character

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

sum() and count() function and when to use

A

sum() - returns total sum of a numeric column and only in numeric fields
count() - returns a single value and counts (for any field)

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