Databases Flashcards

1
Q

What is a data base

A

collection of data items structured so that data can be searched and retrieved when necessary.

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

What is a flat file structure

A

where the entire database is stored in a single file or table and there is one row for each record and one column for each field. This type of structure leads to data being repeated unnecessarily

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

What is data duplication

A

Duplicate copies of data – or duplicate copies of non-key data.

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

What is data inconsistency

A

The more often data must be keyed the more chance there is for errors in data entry

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

What is poor data integrity

A

Data that is erroneous or inconsistent is not reliable.

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

What is a relational database structure

A

allow data to be stored across a number of tables. The tables are linked or related together, using relationships, on common fields.

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

Does a relational data base need multiple tables

A

Yes

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

What is access rights

A

Most relational database systems provide access rights which can be assigned to different users depending on their role. Some of the operations that can be allowed or disallowed to a user are SELECT, INSERT, DELETE, ALTER, and CREATE.

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

What is sql

A

Structured Query Language

When manipulating data in the database, SQL queries are formulated.

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

What is a logical data model

A

The logical data model is produced during the design of the database, and is independent of the database software,

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

What is a physical data model

A

A physical data model is produced during the implementation of the database and defines the physical structure of the database. It creates the table structures, along with the columns (fields) inside them, and the data type for each field. The primary key and any foreign or composite keys for each table are specified here as well as any appropriate validation rules.

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

What is an attribute

A

Attribute
An individual data item within an entity. For example, Employee Name in an entity called EMPLOYEE. This is also known as a field.

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

What is an entity

A

Identifies an object or subject about which data will be stored within the system. A person, place, thing, or event about which data is collected and held in a table. For example, an EMPLOYEE or a PROJECT. An entity is represented as a table.

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

What is a primary key

A

A primary key is an attributes that uniquely identifies one record in a table. For example, the Employee No would uniquely identify each employee in a table.

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

What is a composite key

A

Consists of two or more attributes that uniquely identifies one record in a table

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

What is a relationship

A

A relationship is an association of entities. A relationship is established by a foreign key in one entity linking to the primary key in another.

17
Q

What different relationships can you have

A

One-to-One (1:1)
• One-to-Many (1:M)
• Many-to-Many (M:N)

18
Q

What is referential integrity

A

ensures that the data in one table does not contradict the data in another table. Specifically, every foreign key value which exists in a table must have a matching primary key value in a related table.

19
Q

What is an ER diagram

A

method to graphically model and design relational databases. ER diagrams will represent real world objects and the links, or relationships, between them.

20
Q

What is normalisation

A

Normalisation is a technique of organising the data in the database to eliminate problems such as data redundancy and data inconsistency and improving data integrity.

21
Q

What the rules of UNF

A

Select a name for the main entity – in this case PROJECT.
2. Each field contained within the entity is listed in brackets.
3. Primary keys are underlined.
4. Foreign keys are represented with *.
5. Repeating groups are contained within {}.
6. Derived attributes such as average Hourly Rate should not be included here but the developer may decide to store the value to improve performance. By derived, it means that the hourly rate is decided (or derived) based on the Pay Grade.

22
Q

What are the rules for 1 nf

A

all attributes must be atomic (Atomic means that the attribute cannot be further sub divided).
• entities must not have repeating groups.

23
Q

What are the rules of 2nf

A

• it fulfils the conditions for 1NF – all repeating groups are removed
• all non-key attributes (e.g. attributes which aren’t primary/foreign keys) in the relation are fully dependent on the primary key.

24
Q

What are the rules for 3 nf

A

it is in 2NF – there are no partial key dependencies
• there are no non-key dependencies.

25
Q

Advantage to normalised data

A

The resulting database will take up less storage space because the duplication of data is minimised. Data is only stored once. The advantages of this are
• No multiple record changes needed
• More efficient storage
• Simple to delete or modify details.
• All records in other tables having a link to that entry will show the change.
2. Information retrieval will be more efficient because data is structured effectively. Queries will be processed faster as complex queries can be carried out using SQL.
3. Less redundancy means less inconsistencies in data because data will only have to be entered once.
4. Data integrity will be increased.

26
Q

Disadvantages to normalised data

A

• Normalisation is a complex process required to create the database structure.
• Normalisation can generate more tables than an un-normalised database.
• More tables mean a more complex database and queries may be slow to run.
• It is necessary to assign more relationships to interact with larger numbers of tables.
• With more tables, setting up queries can become more complex.