Databases AQA

0.0(0)
studied byStudied by 2 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/20

flashcard set

Earn XP

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

21 Terms

1
New cards

Database

An organised and persistent collection of data

2
New cards

Flat-File Database

A database for only 1 table at a time, storing those attributes independently

3
New cards

Disadv of flat file

Can lead to data redundancy if a field is repeated and trying to be updated

4
New cards

Primary key

A field that uniquely identifies a record

5
New cards

Foreign Key

The linking field in the foreign table formed when a relationship is made

6
New cards

Secondary Key

A key field that can be used to access a table in a different way

7
New cards

Entity Relationship

A graphical representation that depicts relationships in relational databases (e.g 1→M, M→M)

8
New cards

Index

The process of creating a database index, which is a data structure that improves the speed of data retrieval

9
New cards

Normalisation

The process of arranging data into tables

1NF → 1 table, 2NF → 2 tables etc…

10
New cards

Atomic Data

Data that can’t be broken down

11
New cards

1NF (First normal form)

Data is atomic, no repeating attributes, records have primary keys

12
New cards

2NF (Second normal form)

meets 1NF, no partial dependencies on non-key attributes

13
New cards

3NF (Third normal form)

meets 1NF and 2NF, no dependencies on non-key attributes

14
New cards

SQL for selecting an item from a table

SELECT “wantedField”

FROM “tableName”

WHERE “item = wantedItem”

15
New cards

SQL for ordering by field

ORDER BY “fieldName” (asc/descending)

16
New cards

SQL for “like”

WHERE “fieldName” LIKE “wantedItem”

17
New cards

SQL for inserting to a table

INSERT INTO “tableName”

“fieldName1, fieldName2…..”

VALUES “value1, value2….”

18
New cards

SQL for deleting from a database

DELETE FROM “tableName”

WHERE “fieldName” = “condition”

19
New cards

SQL for updating a table

UPDATE “tableName”

SET “fieldName” = “value1, value2…”

WHERE “fieldName” = “condition”

20
New cards

SQL for joining 1 table to another

JOIN “tableName1”

ON “tableName2”.”fieldName2” = “tableName1”. “fieldName1”

21
New cards

SQL for dropping a table

DROP TABLE “tableName”