Databases Flashcards

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

define database

A

persistant organised (stored in records and fields) store of related data

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

define an entity

A

A real thing like people or customers (the table name in the database)

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

define a table

A

collection of data that relates to an entity (customers)

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

define a record

A

collection of data about one singular entity (rows)

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

define field

A

a unique piece of data about an entity i.e (student firstname) (collumns)

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

define a flat file database

A

a table with multiple entities
i.e table with data on both customer and item that they buy

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

why is a flat file database bad

A

because everytime a customer buys an item all their data needs to be re added to the table so if address changed it has to be changed on every order

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

when would an intersection table be used

A

in a many to many database

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

define primary key

A

A field which has a unique value for every record
A unque identifier

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

how does an intersection table work

A

uses the primary keys from the needed records in order to reference them i.e customer 3 bought procuct 17

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

define secondary key

A

a second unique identifier Not always present. film number (primary key) film name(secondary key)

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

define foreign key

A

primary key used in another table (intersection table?)

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

what is referential integrity

A

a given element that is referenced in another table is not deleted (not just records could be fields)

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

What does ACID stand for

A

atomicity consistency isolation durability

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

what does Atomicity mean (in ACID)

A

that a transaction is either entirely processed or not at all proccessed

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

What does consistency mean

A

That the transaction cannot break the pre-exsisting rules of the database i.e a string is not added in place of an integer

17
Q

defin normalisation

A

a set or rules for a database to follow in order to be the most efficient

18
Q

what level normalisation is flat file

A

Un normalised

19
Q

what are the rules of first form normalisation

A

no collumns have repeating data (i.e maths,science) in one box

data must be in its atomic form i.e first name surname

must have a primary key

20
Q

rules of second normal form

A

must be in first normal form first

partial dependencies get split so any fields that only depend on one of the keys get split into a new table

one primary key

21
Q

rules of third normal form

A

all fields are fully dependent on the primary key
non key dependencies are split
i.e email is based of student name not subject

22
Q

Why use an intersection table [3]

A

to change many to many relationships
to make the database third normal form
reduces data redundancies

23
Q

1 pro and 1 con to having multiple keys [2]

A

pro , faster searching
con, larger storage or insert, update and delete actions will take longer

24
Q

Using an example, describe a scenario when a flat file database may be an appropriate solution. State an advantage of using a flat file instead of a relational database. [3]

A

when the data bse only contains one type of entity
personal contacts list (only contains phone numbers)
easier to use or import into another system

25
Q

state two advantages of a fully normalised databases over flat file databases [2]

A

less storage is required
data only has to be stored once
queeries can be handled easier
improved usability
better data consistency and forces referential integrity

26
Q

methods of capturing data

A

Optical character recognition
Optical Mark Recognition
form
QR code

27
Q

Methods of Selecting data

A

SQL
QBE (query by example)

28
Q

Methods of managing data

A

SQL
built in DBMS

29
Q

Methods formatting data being exchanged

A

XML, JSON and CSV

30
Q

Methods of exchanging data

A

manual methods like memory stick
EDI (protocol to allow two systems to facilitate data exchange)

31
Q

SQL for inserting a piece of data into a database

A

INSERT
INTO table name (field 1,field2…..)
VALUES (value1,value2,…..)

32
Q

SQL for deleting a record

A

DELETE
FROM table name
WHERE conditions

33
Q

SQL for selecting two fields from different tables

A

SELECT
FROM Table1
JOIN Table2
ON Table1.field in common = Table2.field in common
WHERE

34
Q

SQL for a updating a record

A

UPDATE table name
SET field1 = value1,field2 = value2
WHERE