Relational Databases Flashcards

1
Q

What is a database?

A

A collection of organised data that allows access, retrieval, and use of that data.

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

What is a Relational database?

A

a collection of related/ linked tables

E.g. all of the student tables for NMHS and subject details tables and specific class details tables.

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

How is data stored in a DBMS?

A

Data is grouped into tables (normalisation) and stored in records and fields.

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

DBMS role

A

Process data to produce meaningful information for a user by applying, sorting, and/or grouping.

Store data in a way that reduces data redundancy.

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

Normalisation principles

A

The need to minimise the duplication of data.

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

Primary key

A

Consists of one or more fields that uniquely identifies each record in a table. The data in a primary key is unique to a specific record.

Non-key fields are dependent on the key, and not dependent on any other field.

Factless identifiers are ideal for use as a primary key because they do not change E.g. AutoNumber

Name Examples: Employee ID, Student ID

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

Foreign key

A

Tables are linked by joining the primary key from the table on the one-side to the appropriate field, which is called the foreign key, on the many-side.

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

Composite key

A

A composite key can be applied in the transaction table to prevent a double transaction.

When a primary key consists of more than one field.

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

Field

A

a set of related characters

a single item type of information that appears in every record.

If you want to sort, search, calculate, or report based on an item of information, you should put that item in its own field.

E.g. on a student id card- ‘surname’ is a field

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

Record

A

a collection of related fields

a meaningful and consistent way to combine information about something

E.g. everything on a student ID card makes up one record

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

Tables

A

a collection of related records.

Lists of rows and columns

E.g. all students enrolled on the SC of NMHS

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

What are the 3 links between table called?

A
  • One-to-one
  • One-to-many
  • Many-to-many.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

One - to - many

A

a row in table A can have many matching rows in table B. But a row in table B can have only one matching row in table A.

Only occurs if one of the related columns is a primary key or has a unique constraint

e.g. Each ‘Publisher’ produces many titles. But each ‘Title’ comes from only one ‘Publisher’.

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

Many - to - many

A

a row in table A can have many matching rows in table B, and vice versa.

E.g. a single ‘Order’ can include more than one ‘Product’, and a single ‘Product’ can appear on many ‘Orders’.

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

Solving many to many relationships

A

The solving of a many-to-many relationship can be achieved by adding a transaction/junction table.

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

One - to - one

A

a row in table A can have no more than one matching row in table B.

Only occurs if both of the related columns are primary keys or have unique constraints.

17
Q

How is data defined?

A

Data is defined according to a data dictionary that includes field names, types of data, sizes, key(s), required values, and the appropriate validation rules and text messages, default values, formats, and input masks.

These ensure integrity within a table.

18
Q

Master query

A

A master query uses fields from all tables and run the query.

19
Q

When should I use a database instead of a spreadsheet?

A

Databases are ideal when you have a large amount of related data to store and quickly need to be able to add to, update, query, and create reports about the data. This is fast and efficient and ease of backing up so data is not lost.

Use a spreadsheet instead of a database when you have less data to store but frequently need to perform calculations with the data, create charts, and review statistics.

20
Q

What is file maintenance?

A

Procedures that keep data current.

This includes:

  • Adding records when new data is obtained
  • Modifying records to correct inaccurate data or to update old data with new data
  • Deleting records when they no longer are needed
21
Q

Validation rules

A

Process of comparing data with a set of rules or values to find out if the data is correct.

Set parameters (or boundaries) for the entry of data.

E.g. In a library system, return data must be greater than today’s date and less than a date in two weeks time.
If a date outside of the boundaries is entered, an error message will pop up for the user.

22
Q

What is a validity check and name different types?

A

Many programs perform a validity check that analyses data, either as you enter it or after you enter it, to help ensure that it is correct.

Types include:

  • alphabetic check
  • numeric check
  • range check
  • consistency check
  • completeness check
  • digit check
23
Q

Data integrity

A

Identifies the quality of the data, the more errors the data contains, the lower its integrity.

a change made in one table will automatically and accurately be seen/read by all other related tables.

24
Q

Sharing data

A

Information in one department can readily be shared with others.

25
Q

Data redundancy

A

This is when you store information more than once.

This is minimised with the use of relational DB.

26
Q

What are the qualities of valuable information?

A

Information should be:

  • accurate: error free
  • verifiable: can be proven to be correct or incorrect
  • timely: has an age suited to its use
  • organised: arranged to suit the needs and requirements of the decision makers
  • accessible: available when the decision maker needs it
  • useful: has meaning to the person who receives it
  • cost effective: should give more value than it costs to produce
27
Q

What is data?

A

Data: is the raw material waiting to be processed.

Once processed, it becomes information.

E.g. text, numbers, images, audio, and video.

28
Q

What is information?

A

Processed and manipulated data according to instructions, that is organised, meaningful, and useful.

29
Q

How does a computer use data and information?

A

A computer processes data in a database into information.

30
Q

Default Values

A

E.g. The library system can also be set so that a default value of the date in 2 weeks time can be automatically set.

31
Q

Input Masks

A

To ensure a consistent format of data entry.

E.g. –/–/–

32
Q
A