Chapter 16 Database Concepts Flashcards

1
Q

What is a database?

A

structured and persistent store of data that is used on a computer system

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

What is an entity?

A

Object that data can be stored about

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

Example of an entity?

A

customers, products,sales

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

What does an entity become in a database?

A

A table

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

What is an attribute? What will it become in a table?

A

Something that an entity has , a property of it e.g. an entity of Products may have product id, stock, price etc.

It will become the columns

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

What do databases allow us to do?

A
  • retrieve data quickly
  • be updated easily
  • change the view of it (for us or limit users)
  • in 3NF avoids redundancy and limits storage use
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

meaning of structured in the definition of a database?

A

data i organised for ease of processing

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

meaning of persistent in the definition of a database?

A

can’t be lost, stored on secondary storage

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

What is a record?

A

a row in a table, it contains a number of fields containing data relating to a specific item within an entity

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

What is a field?

A

Something that stores one piece of data. property of an record in an entity

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

What does atomic mean?

A

Cannot be broken down anymore

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

What is a flat file database?

A

A database that consists of a single file/ entity

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

What would a flat file database be suitable for ?

A

e.g. all members in a club

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

What do flat file databases cause?

A

a lot of redundancy

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

What is redundancy?

A
  • unnecessary repetition of data

- leads to inconsistencies

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

How is an entity usually written?

A

Entity1(Attribute1,Attribute2,Attribute3)

e.g. Customers(CustomerID,DOB,Address,Phone Number)

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

What is special about flat file databases?

A

They’re unnormalised

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

What is another name for a fields/row?

A

A tuple or a record

19
Q

What is a primary key? - only relational databases

A

a unique identifier of each record in an entity

20
Q

What is a secondary key? - relational databases

A

secondary key is a unique attribute used for indexing

21
Q

When would a secondary key be useful? - example

A

When a customer calls with an enquiry about an order they may not know their ID so a secondary identifier can be used e.g. surname

22
Q

What does secondary key allow?

A

quicker searching and easier identification(as possibilities become smaller)

23
Q

What is a relational database?

A

Database where there is more than one entity, which share attributes using foreign keys

24
Q

What is a foreign key?

A

A primary key used as an attirbute of another table used to link the entities together. Essentially a primary of the entity that one entity is linked with.

25
Q

What is a foreign key used for ?

A

Linking entities in a relational database

26
Q

What does having a relational database reduce? How?

- what does this improve

A

Data redundancy. As foreign keys are used to put primary keys into other tables - those are entered once

increases accuracy and consistency of data

27
Q

What are the three types of relationships between entities

exmple for each

A

one to one - husband to wife
one to many - mother and child
many to many - student and course

28
Q

What is a one to one relationship?

A

where one entity can be linked to only one entity

e. g. tutor and office
e. g. headteacher and school

29
Q

What is a many to many relationship?

A

where multiple entites can be linked to multiple entities

e. g. teacher and student
e. g. student and course

30
Q

What is a one to many relationship?

A

where one enity can be linked to many entites

e. g.customer and order
e. g. borrower and library books

31
Q

How can we show relationships between entites visually?

A

using entity relationship diagrams

32
Q

What is a composite key?

A

where 2 or more attributes are used to describe a primary key

33
Q

What is indexing

A

The process of creating a database structure called index which will improve speed of retrieval of data

34
Q

Using entity relationship diagrams how will a one to one relationship be shown?

A

By a line

35
Q

Using entity relationship diagrams how will a one to many relationship be shown?

A

By a line with a chicken foot by the entity of many

36
Q

Using entity relationship diagrams how will a many to many relationship be shown?

A

Firstly a new entity will be created. Which will be in the middle and be connected by a chicken foot both sides. Then there will be a one to many relationship between the new enitity and original entities with the new entity being the many!

37
Q

Do flat file databases have a foreign key?

A

NO

38
Q

When we have new entity created to show many to many relationship what is the name of the key of the new entity?

A

A composite key

39
Q

What is used with indexing ?

A

a secondary key

40
Q

What are the 4 types of query?

A

select (can be used for filter and sort),append,update,delete

41
Q

What is a report?

A

A query of data from a database which is presented in a readable and clear way.

42
Q

What is a query?

A

an action on a database

43
Q

Another name for a table in a relational database?

A

relation