DATABASES Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is a DB

A

persistent and structured collection of data

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

What is a record

A

Single unit in a database, made up of fields (name ,Id,etc)

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

What is a transaction

A

Change in state of a database

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

What is transaction file

A

A file of events

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

What is a master file

A

Principal file that stores basic details about a business (eg supermarket stock)

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

What is a flat file database

A

One table in the database, no other tables

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

What is a entity

A

Any thing represented in a database like a student or bag

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

What is a relational database

A

Database with one or more tables with unique keys to provide a relations between data

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

What is a tuple

A

Same as record

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

What is a primary key

A

Unique key to a row

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

What is a foreign key

A

A field repeated from another table

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

What is a secondary key

A

Additional key used with the primary key to locate a piece of data, narrowing down the data. It’s not unique but it is unique to a smaller number of fields making the search possibly faster

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

What is data redundancy

A

Unnecessary repeated data

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

What is database normalisation

A

Where collection of data is gradually (in 3 steps) organised into tables to remove data redundancies

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

Requirements for 1NF

A

No duplicate columns
Has primary key
Data is atomic

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

Requirements for 2NF

A

1NF

every field is dependent on the primary key

17
Q

Requirements for 3NF

A

2NF
No transitive dependencies, fields cannot depend on a non key field

NO MANY TO MANY RELATIONSHIPS

18
Q

What is a composite key

A

Combination of multiple keys, eg first and surname

19
Q

What does CRUD mean in a RDB

A

DB must be able to have create read update and delete rows

20
Q

What is transaction processing

A

Processing which provides a response to a user in a short time

21
Q

What is data integrity

A

Data is intended and is fit for purpose

22
Q

What is meant by referential integrity [2]

A

Ensuring that changes in a database are consistent (so) if a record is removed all references are also removed

23
Q

What are the ACID rules in a database

A

ATOMICITY - changes in a database are performed, or not performed
CONSISTENCY - constant state of the database before and after
ISOLATION - transactions are performed in isolation, so nothing can interrupt it, only until data has been committed
DURABILITY - once A change is made is must not be lost

24
Q

SQL to select name and address from customer table , where the name must be cox

A

SELECT “NAME”, “ADDRESS” FROM “Customers” WHERE “Name” = “Cox”;

25
Q

SQL to select all columns from customer table where the address ends with Street

A

SELECT * FROM “CUSTOMERS” WHERE “ADDRESS” LIKE “%Street”

26
Q

2 problems with flat file

A

Data redundancy

Inconsistent data

27
Q

SQL to select video name from videos table where name is hi

A

SELECT VideoName FROM Videos WHERE VideoName = “hi”

MUST USE CORRECT QUOTES

28
Q

SQL to delete row from table

A

DELETE FROM [table] ….