Back to marketplace

1.3.2 d + e + f – Databases - DONE

No description yet. This curated deck is ready for daily study.

Total cards: 19•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (19)

#1
Front (Question)

How do you select data in SQL?

Back (Answer)

Using SELECT field FROM table WHERE condition

#2
Front (Question)

How do you use SQL to find an item that starts with, ends with, or contains a specific character

Back (Answer)

[WHERE condition] becomes: WHERE condition LIKE character% when searching for items that start with the character WHERE condition LIKE %character when searching for items that end with with the character WHERE condition LIKE %character% when searching for items that contain the character

#3
Front (Question)

How do you select the items in all fields of a record?

Back (Answer)

Using SELECT *

#4
Front (Question)

How do you implement multiple conditions?

Back (Answer)

Using AND and/or OR

#5
Front (Question)

How do you add a record into a database using SQL?

Back (Answer)

By inserting the record’s data using: INSERT INTO table (field1, field2, field3) VALUES(value1, value2, value3) E.g. INSERT INTO world(name, capital, population) VALUES(“Oz”, “Emerald City”, 1000000)

#6
Front (Question)

How do you delete a record/records from a table?

Back (Answer)

Using: DELETE FROM table WHERE condition

#7
Front (Question)

How do you join tables?

Back (Answer)

Using: SELECT table.field FROM table JOIN table2, ON table1.field = table2.field WHERE condition The specified field is the foreign key. E.g. SELECT Student.Surname, Tutor_Group.Tutor room FROM Student JOIN Tutor_Group ON Student.Tutor Group = Tutor_Group.Tutor Group WHERE Student.Tutor Group = “10B”

#8
Front (Question)

How do you delete a table?

Back (Answer)

Using: DROP TABLE table

#9
Front (Question)

Describe referential integrity

Back (Answer)

When relationships between databases are consistent, such that each foreign key links to an existing primary key.

#10
Front (Question)

Why is referential integrity desirable?

Back (Answer)

It ensures that information is not removed if it is required elsewhere in a linked database, in order to prevent the occurrence of missing data.

#11
Front (Question)

Describe a technique for ensuring referential integrity

Back (Answer)

Enforcing a cascade delete restraint on the primary relationship between tables mean that if a record is deleted from a table, any associated rows within a linked table will also be deleted. It can also be used to prevent a user from adding a record to a table if there isn’t a matching record for it in another table.

#12
Front (Question)

How can referential integrity be broken?

Back (Answer)

If a primary key is deleted or updated or if a foreign key is no longer valid.

#13
Front (Question)

What is transaction processing?

Back (Answer)

It refers to the handling of a sequence of database operations (a transaction). Each transaction must succeed or fail as complete unit, it can’t be partially complete. It ensures databases remain accurate and consistent.

#14
Front (Question)

What does ACID stand for?

Back (Answer)

Atomicity Consistency Isolation Durability

#15
Front (Question)

Describe how atomicity is used in a database management system

Back (Answer)

A transaction must be processed in its entirety or not at all.

#16
Front (Question)

Describe how consistency is used in a database management system

Back (Answer)

Any change in the database must retain the overall state of the databases. This ensures data integrity and is done through maintaining referential integrity.

#17
Front (Question)

Describe how isolation is used in a database management system

Back (Answer)

A transaction must not be interrupted by another transaction. This is done so other users or processes cannot access the data concerned. This is done through implementing record-locking so that they are placed in a read-only state.

#18
Front (Question)

Describe how durability is used in a database management system

Back (Answer)

Data is not lost in case of power failure. This can be ensured by storing completed transactions in secondary storage.

#19
Front (Question)

Describe record locking

Back (Answer)

The outcome of concurrent transactions is the same as if transactions were completed sequentially. Record locking allows only one user to access record level data at any one time. So data that is being used elsewhere cannot be modified. It’s the process of preventing simultaneous access to records in a database and it’s used in order to prevent inconsistencies or a loss of updates. However, this can cause delays as users wait for access. RECORD LOCKING DOESN’T LOCK THE WHOLE DATABASE, ONLY RELEVANT RECORDS