Unit 11 - Databases and Software Development Flashcards

1
Q

Define entity

A

A category of object, person, event or thing of interest about which data needs to be recorded

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

Define attribute

A

A component of an entity

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

Define primary key

A

An identifier for a specific record

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

Define composite primary key

A

An identifier for a specific record that requires two or more attributes to uniquely identify it

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

What are the three types of relationships that entities can have with each other?

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

What two relationships are not used in databases?

A

One-to-one and many-to-many

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

Define foreign key

A

An attribute that is made to join two tables

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

Why aren’t many-to-many and one-to-one relationships used within databases?

A

One-to-one relationships are not used because they are redundant
Many-to-many relationships are not used because they will screw up the database causing problems with data redundancy, data insertion, deletion and updating which means that using them would make the system impossible to operate or navigate

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

Define relationship

A

A link between two entities

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

Define relation

A

A visual representation of entities within a database

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

Define field

A

An item of data

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

Define record

A

A row of data within a relationship

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

How is a relation organised?

A

A relation contains information about a single topic and is the entity with rows holding records relating to specific sections of information and each field in a row representing an attribute

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

Define a flat file

A

When all of the data is held in one table so there are no relationships and only one entity (therefore it is often just information about one entity)

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

Define normalisation

A

A process which enables programmers to come up with the best possible design for a database by reducing data duplication and improving data integrity

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

Describe first normal form

A

All of the attributes are atomic and there are no repeating attributes or groups of attribute

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

Describe second normal form

A

There are no partial dependencies within the relation which is acheived by using a composite primary key and ensuring that all of the attributes are dependent on all parts of the composite key (this means if you change the key or part of the key you change every attribute in that entity)

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

Describe third normal form

A

There are no non-key dependencies which means that there are no non-key dependencies (meaning that one non-key attribute changes and nothing else should change)

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

What is a non-key dependency?

A

An attribute which is dependent on another attribute that is not part of the key

20
Q

Why is normalisation beneficial to the database?

A
  1. It is easier to maintain a normalised database
  2. It is easier to edit a normalised database
  3. There is no duplication of data so no memory is wasted
  4. Data integrity is maintained
  5. Search time is decreased
21
Q

What does SQL stand for?

A

Subject query language

22
Q

Is SQL a declarative or an imperative high level language?

A

Declarative

23
Q

What is SQL used for?

A

Creating and maintaining tables in Python

24
Q

How do you use a SELECT statement?

A

SELECT (list of fields)
FROM (the table of list of tables)
WHERE (list the search criteria)
ORDER BY (list how to sort and display data)

25
Q

How do you refer to all fields or all character?

A

‘*’

26
Q

What does BETWEEN mean in SQL?

A

In an inclusive range

27
Q

What does IN mean in SQL?

A

Specify multiple possible value for a column

28
Q

What character is placed at the end of each statement in SQL if more than one statement is one a line?

A

’;’

29
Q

What criteria needs to be met in order to extract data from multiple tables in the same command?

A

The tables must be linked by foreign keys (they must have a relationship with one another)

30
Q

What do you need to specify when extracting data from more than one table?

A

Which table the data from the foreign key is being extracted from if it is selected

31
Q

Define VARCHAR(n)

A

A string with variable length, max length of n

32
Q

Define CHAR(n)

A

A string of fixed length n

33
Q

What problem arises in client-server databases?

A

Multiple people trying to access the same record at the same time

34
Q

How does record locking work?

A

When one person is editing a record it is sealed to everybody else so they cannot edit it which prevents data from being lost or inconsistencies arising in the data

35
Q

How does serialisation work?

A

Each object in the database is given a read timestamp and a write timestamp, when someone is editing an object and they save their changes, if the timestamp is not the same as when they started the changes will be cancelled as it means someone else has changed the object within that time

36
Q

How does commitment ordering work?

A

Transactions in a system are ordered in terms of their dependencies on one another and the time they were initiated, this means that if someone is editing an attribute, it and all of the other attributes dependent on it will be locked to one another until the transaction has ended

37
Q

What are the five stages of the system life cycle?

A

Analysis, design, implementation, evaluation and maintenance

38
Q

What will an analyst do in order to understand the problem?

A

Define the problem by asking questions about the data, procedures, future and problems

39
Q

How is the development of a system guided?

A

By feedback from the client

40
Q

What are the disadvantages of an agile approach to software development?

A

This method is time consuming and becomes increasingly expensive

41
Q

What does the analysis stage entail?

A

Ensuring that the team developing the system understand fully what the client wants

42
Q

For what reasons might a system be updated?

A
  1. The system cannot cope with the increased volume of information it needs to handle
  2. New technology means the system has become outdated and new technology provides new opportunities
  3. The current system is inflexible or inefficient
  4. Demand has decreased (the system no longer appeals commercially)
  5. New platforms and operating system
  6. Increased processing power
  7. Increased network power
43
Q

How can software developers gather new information?

A

Interviews, surveys, observing the current system and examining the current system

44
Q

What is a feasibility study?

A

An analysis of whether it is possible or desirable to create a new system

45
Q

What do you do to indicate a date in SQL?

A

Put hashes at either end of the date

46
Q

How does timestamp ordering work?

A

Each transaction has a read and write timestamp that indicates the last time the data was read from or written to