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
What is a foreign key used for ?
Linking entities in a relational database
26
What does having a relational database reduce? How? | - what does this improve
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
What are the three types of relationships between entities | exmple for each
one to one - husband to wife one to many - mother and child many to many - student and course
28
What is a one to one relationship?
where one entity can be linked to only one entity e. g. tutor and office e. g. headteacher and school
29
What is a many to many relationship?
where multiple entites can be linked to multiple entities e. g. teacher and student e. g. student and course
30
What is a one to many relationship?
where one enity can be linked to many entites e. g.customer and order e. g. borrower and library books
31
How can we show relationships between entites visually?
using entity relationship diagrams
32
What is a composite key?
where 2 or more attributes are used to describe a primary key
33
What is indexing
The process of creating a database structure called index which will improve speed of retrieval of data
34
Using entity relationship diagrams how will a one to one relationship be shown?
By a line
35
Using entity relationship diagrams how will a one to many relationship be shown?
By a line with a chicken foot by the entity of many
36
Using entity relationship diagrams how will a many to many relationship be shown?
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
Do flat file databases have a foreign key?
NO
38
When we have new entity created to show many to many relationship what is the name of the key of the new entity?
A composite key
39
What is used with indexing ?
a secondary key
40
What are the 4 types of query?
select (can be used for filter and sort),append,update,delete
41
What is a report?
A query of data from a database which is presented in a readable and clear way.
42
What is a query?
an action on a database
43
Another name for a table in a relational database?
relation