Database Flashcards

(25 cards)

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 data

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

20
Q

Explain why it is better to have referential integrity implementing before adding a value to a database

A

To ensure a value is linked to an existing table

21
Q

Disadvantage of lossy compression

A

Quality may be reduced

22
Q

Does a gif have a large or small file size

23
Q

What is a problem with using no referential integrity when it is required

A

Data could be added that would potentially effect the results of future queries

24
Q

problems when there is no referential integrity

A

a value could be added to the table that does not have a matching FK

Orphan records can occur where a foreign key refers to a record that does not exist.
Deletion anomalies may happen, leaving related records with no valid link.
Data can become inconsistent between tables.
Queries may produce incorrect results due to broken relationships.

25