Database Design and Development (Implementation) Flashcards

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

What does SQL stand for?

A

Structured Query Language

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

In SQL, what is used to mean “all”?

A
  • (asterisk)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What command is used to search a database for information generally?

A

SELECT field(s) FROM table(s);

eg SELECT firstName FROM pupils

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

What command is used to search a database for more refined information?

A
SELECT field(s) FROM table(s)
WHERE field = description;

eg. SELECT firstName FROM pupils
WHERE firstName = “Darren”;

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

What syntax is used to search a database of more than one condition?

A

AND / OR / NOT

eg. SELECT firstName FROM pupils
WHERE firstName = “Darren” OR firstName = “Ian”;

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

What syntax is used to search a database of numbers between two extremes?

A

< / > / = / <= / >=

eg. SELECT firstName FROM pupils
WHERE age > 9

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

What are the two ways of ordering fields in a database and what is their syntax in SQL?

A

Ascending / ASC (Orders a field from lowest to highest)

Descending / DESC (Orders a field from highest to lowest)

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

What command is used to order a database?

A
SELECT feild(s) FROM table
ORDER BY field (ASC / DESC)

eg. SELECT firstName FROM pupils
ORDER BY firstName ASC

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

What is the maximum number of fields a database can be ordered by?

A

2

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

What command is used to add information to a database?

A

INSERT INTO table
VALUES (new values in order with commas separating them)

eg. INSERT INTO pupil
VALUES (077868, Darren, O’Hare, Maths, 15)

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

What command is used to add information to a database if we only want to add information to specific fields?

A

INSERT INTO table
VALUES (new value, new value, new value)

eg. INSERT INTO pupil
VALUES (077868, Darren, Maths)

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

What command is used to rectify incorrect information of a database?

A

UPDATE table
SET field = “new value”
WHERE field = “old value”

eg. UPDATE pupil
SET firstName = “Adam”
WHERE firstName = “Darren”

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