11. databases and software development Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

entity

A

is a category of object, person, event or thing of interest to an organisation about which data is to be recorded

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

attributes

A

a characteristic specification that defines a property or feature about an entity stored in a database

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

entity relationship modelling

A

a method of abstractly describing the data tables and the relationships between them visually. they can be used to reduce redundancy and construct a relational database.

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

entity identifier

A

uniquely identifies the entity e.g. primary key

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

primary key

A

a unique identifier that identifies each record in a table. the primary key is underlined.

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

relational databases

A

a database where separate tables are made for each entity, and relationships between entities are represented by foreign keys

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

foreign key

A

a linking attribute that joins two tables in a relational database by being a primary key in one and a foreign key in the other

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

relationships between entities

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
9
Q

relational database (TB).

A

is a collection of tables in which relationships are modelled by shared attributes

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

normalisation

A

is a process used to come up with the best possible design for a relational database.

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

tables should be organised in such a way that

A
  • no data is unnecessarily duplicated
  • data is consistent throughout the database
  • the structure of each table is flexible enough to allow you to enter as many or as few items as required
  • the structure should enable a user to make all kinds of complex queries relating data from different tables
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

first normal form

A

contains no repeating attribute or groups pf attributes

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

second normal form

A

if the table is in 1NF and contains no partial dependencies

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

partial dependency

A

one or more of the attributes depends on only part of the primary key, which can only occur of the primary key is a composite key

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

composite key

A

a primary key made up from two or more other keys

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

third normal form

A

all attributes are dependent on the key, the whole key and nothing but the key

17
Q

the importance of normalisation

A
  • easier to maintain and change a normalised database
  • data integrity is maintained since there is no unnecessary duplication of data
  • produce smaller tables with fewer fields, this results in faster searching and indexing operations as there is less data involved
  • will not allow records in a table on the ‘one’ side of one-to-many relationship to be deleted accidently. this will prevent accidental deletion
18
Q

SQL

A

structured query language is a declarative language used for querying and updating tables in a relational database

19
Q

SELECT..FROM..WHERE

A

the SELECT statement is used to extract a collection of fields from a given table. the basic syntax of this statement is

SELECT list of fields to be displayed
FROM list the table or tables the data will come from
WHERE list of search criteria
ORDER BY list the fields that the results are to be stored on (default is ascending order)

20
Q

CREATE A NEW DATABASE TABLE

A

e.g.
CREATE TABLE employee
(
EmpID INTEGER NOT NULL PRIMARY KEY
EmpName VARCHAR (20) NOT FULL,
HireDate DATE,
Salary CURRENCY
)

21
Q

ALTERING A TABLE STRUCTURE

A

page 337-338 TB

22
Q

client-server database

A

a system that provides simultaneous access to the database for multiple clients

23
Q

advantages of client-server database

A
  • the consistency is maintained because only one copy of the data is held (on the server) rather than a copy at each workstation
  • an expensive resource (powerful computer and large database) can be made available to a large number of users
  • access rights and security can be managed and controlled centrally
  • backup and recovery can be managed centrally
24
Q

potential problems with client-server database

A
  • allowing multiple users to simultaneously update table may cause one of the updates to be lost unless measures are taken to prevent this
  • when an item is updated, the entire record (indeed the whole block in which the record is physically held) will be copied into the user’s own local memory area at the work station. when the record is saved, the block is written to the file server.
25
Q

record locks

A

is the technique of preventing simultaneous access to objects in a database in order to prevent updates being lost or inconsistencies in the data arising.

“record is locked whenever a user retrieves it for editing or updating. anyone else attempting to retrieve the same record is denied access until the transaction is completed or cancelled”

26
Q

problems with record locking

A

if two users are attempting to update two records, a situation can arise in which neither an proceed, known as deadlock

27
Q

sterilisation

A

this is a technique which ensures that transactions do not overlap in time and therefore cannot interfere with each other or lead to updates being lost. a transaction cannot start until the previous one has finished. it can be implemented using a timestamp ordering

28
Q

time stamp ordering

A

a technique to handle concurrent access by executing transactions from multiple users based on the value of their associated timestamp. each transaction receives a time stamp whenever it begins.
“whenever a transaction starts, it is given a timestamp, so that if two transactions affect the same object (for example record or table), the transaction with the earlier timestamp should be applied first”

29
Q

commitment ordering

A

this is another serialisation technique used to ensure that transactions are not lost when two or more users are simultaneously trying to access the same database object.
transactions are ordered in terms of their dependencies on each other as well as the time they were initiated. it can be used to prevent deadlock by blocking one request until another is completed.

30
Q
A