Database Flashcards

1
Q

How do you delete query’s

A

DELETE FROM table1
WHERE PKfield =“009”;

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

How do you insert code

A

INSERT INTO table name (fieldname1,fieldname2)
VALUES (value1, value2,);

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

How do you update code

A

UPDATE table1
SET feildName=“FALSE”
WHERE PKfeild=“001”;

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

What are the 4 database validations

A

Restricted choice
Validation check
Range check
Length check

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

Example of text data type

A

“Hello” or “092”

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

Example of date

A

22/02/1990

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

Example of number

A

10

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

Example of time

A

“20:09

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

Equijoin select query

A

SELECT feildName1,feildName2
FROM Table1,Table 2
WHERE Table1.pk1=Table2.Fk1
AND fieldName=“TRUE”;

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

What does an underlined word in an entity relationship diagram mean

A

It’s the primary key for that table

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

What does a word that has an asterisk above it in an entity relationship diagram mean

A

Foreign key in that table, but the pk in the other table (which is the table without the crows feet)

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

What table is the FK always in

A

The many table ( the one with crows feet)

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

If asked to add stuff to an entity relationship diagram for 5 marks, what do you add

A

Both PKS, the FK in the many table, crows feet to the many table and the verb in the middle of the two tables don’t just say (has or have )

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

For GDPR companies data must be

A

Accurate and up to date
Be safe and secure

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

For GDPR an individual can

A

Access the data being stored about them
Change any data which is now false

17
Q

What is referential integrity

A

All FKS in the many table must link to a PK in the one table, if there is no link the query cannot run

18
Q

Fit for purpose

A

A database is fit for purpose if it meets all the end user and functional requirements