Database (chapter 10) Flashcards

(29 cards)

1
Q

Database types (2)

A

Flat-file : stores all data in one table with redundant data present

relational: stores data in separate linked tables // data redundancy is reduced // has tables with primary & foreign keys

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

Advantages of relational databases

A

PROS
- Saves storage space
- Related fields automatically change if one is modified
- Editing data is easier as less data must be entered

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

Disadvantages of relational databases

A

CONS
- Takes time to design
- Harder to set up as number of tables increase
- May be difficult to set up complex queries

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

Advantages of flat-file databases

A

PROS
- doesnt need planning as data is unorganised
- Relationships aren’t required
- No expertise required

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

Disadvantages of flat-file databases

A

CONS
- uses a lot of storage
- each record has to be edited
- data is harder to edit as there are many fields

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

Database relationships (3)

A

one-to-one -> one record is linked to only one record in another table
one-to-many -> one record is linked to many records in another table
many-to-many -> many fields are linked to many fields in another table ^`

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

One-to-one relationships

A

one record is linked to only one record in another table
the fields must contain the same data

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

One-to-many relationships

A

One record is linked to many records in another table
the link uses a primary key and foreign key (which uses referencial integrity)

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

Many-to-many relationships

A

it is only theoretical / conceptual
many fields from one table are linked to many fields on another table
done using a link table (two one-to-many relationships)

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

Key fields (3)

A

Primary key -> a field in a table that enables a record to be uniquely identified. used in databases as indexes
Foreign key -> a field in a table that has the same data as a primary key. used to link tables
Compound key -> a primary key that uses two or more fields to help a field be uniquely identified

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

Referential integrity

A

Forces relationshipsd to be consistent and avoids redundancy by forcing the data in the foreign key to always have the data in the primary key

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

What is normalisation?

A

The process of structuring data in a database into a formal method that is structured correctly with no / less redundant data.

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

Normal forms (4)

A
  • Un-normalised
  • First normalised (1NF)
  • Second normalised (2NF)
  • Third normalised (3NF)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Un-normalised data

A

A single table that contains redundant data

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

First normalised data (1NF)

A
  • Has atomic data
  • Data in fields does not repeat
  • has a unique key for each record (primary or compound)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Un-normalised data

A

A single table that contains redundant data

17
Q

Second normalised data (2NF)

A
  • non-key attributes’ fields that are a part of a compound key are removed and put to a new table and linked back.
    (for example, any data about customer ID is removed and put into a separate CUSTOMER table and linked back to the main table).
  • only applies to tables with compound keys
18
Q

Third Normalised Data (3NF)

A
  • Non-key attributes are removed and linked back.
    (eg any price data is removed and linked back to the main table)
19
Q

Advantages of normalisation

A

:-)
- smaller file size
- data is grouped logically using ref. integrity
- searching for data is faster (less data)
- changes made to one record are automatically changed
- making changes is easier as there is less data

20
Q

Disadvantages of normalisation

A

:-(
- takes more time
- requires more expertise / knowledge in databases
- difficult to set up complex queries
- Data processing is slower
- Location of data may be difficult to determine

21
Q

Access types (3)

A

Sequential access
Indexed sequential access
Direct access (Random access)

22
Q

Sequential Access

A

An access type where records are found by going through all records until the record is found

23
Q

Indexed sequential access

A

An access type where records are indexed in a particular order, used to find the point on the disk where the record is located instead of going through all of them.

24
Q

Direct access (random access)

A

Each record has a unique key, the computer uses this key to go find the file in the disk.

25
Management systems (2)
Hierarchal database management system Management information system
26
Hierarchal database management system
It has a tree-like structure in which data is connected together in links. Data access is made fast as a lot of data is bypassed as you go down the hierarchy
27
Management information system (MIS)
A tool that organises and evaluates data for an organisation
28
Features of a management information system
- Easy to use - Versatile (for different skills) - Generates better communication between managers - Helps in *analysis and evaluation* of data
29
How do management information systems help a company?
- Provides details of a company’s past performance, current performance and a prediction of the future performance - managers will use it to analyse information about various aspects (eg. revenue) - *Reports and charts* can be produced to compare and see trends - able to produce info in a meaningful format