Section 11 - Databases Flashcards

(10 cards)

1
Q

What are the 4 main SQL commands

A

SELECT
UPDATE
DELETE
INSERT

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

sql select syntax

A

SELECT <attribute>
FROM <table>
WHERE <condition>
ODER BY <attribute> <ASC/DESC></attribute></condition></attribute>

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

sql update syntax

A

UPDATE <table>
SET <attribute> = <value>
WHERE <attribue> = <value></value></attribue></value></attribute>

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

sql delete syntax

A

DELETE FROM <table>
WHERE <condition></condition>

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

sql insert syntax

A

INSERT INTO <table>
VALUES (<value1>, <value2>, ...)</value2></value1>

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

sql create syntax

A

CREATE TABLE <table>(<attribute> <datatype> PRIMARY KEY, <attribute> <datatype>, ...)</datatype></attribute></datatype></attribute>

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

what is record locks

A
  • when a record is accessed by a user it is locked to other users until they’re finished
  • this means others cannot access or modify the content
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is serialisation

A
  • requests to access records are put in a queue
  • after the first user has finished using the record the next command in the queue is executed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is timestamp ordering

A
  • each command about a feild is assigned a timestamp when it is initiated
  • commands are carried out in the order of their timestamps
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

commitment ordering

A

an algorithm is used to work out an optimum order to execute commands on the same feild

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