A LEVEL OCR CS 1.3.1. databases

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

1/12

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

13 Terms

1
New cards

What is a database?

a persistent organised store of data

2
New cards

What is the difference between a flat file database and a relational database?

In a flat file database, all data is stored in a single table, whereas in a relational database, data is spread out across multiple tables which are linked 

3
New cards

What is an entity in a database?

An item of interest about which information is stored

4
New cards

What relationships are there in entity relationship diagrams?

One-to-one  (e.g. husband and wife) , one-to many (e.g. mother and children), many-to-many (e.g. pupils and subjects). AIM is to split many-to-many relationships into the other relationships.

5
New cards

What’s the ONE RULE about naming entities in entity relationship diagrams?

Entity names should be singular

6
New cards

What is a primary key?

A unique identifier for each record in a table.

7
New cards

Define a record

a row in a file made up of fields

8
New cards

Define a foreign key

Attribute or field in one table, which links with the primary key of another table. 

9
New cards

What is a secondary key?

An index other than the primary key used to search and sort through the database with more convenience and speed.

10
New cards

What are the SQL commands in their normal format to retrieve data.

SELECT (what you want), FROM (the database), WHERE (the conditions that apply)

11
New cards

How to delete a file is SQL

DELETE FROM(tablename) WHERE (conditions are met)

12
New cards

How to update a file in a table using SQL

UPDATE (table name )SET (fieldname= x, fieldname2=y the things that we want to chnage) WHERE (primary_key = x or the conditions that apply)

13
New cards

How to use a join statement.

SELECT FROM JOIN ON JOIN ON WHERE