1.3.2 Databases Flashcards Preview

A Level Computer Science > 1.3.2 Databases > Flashcards

Flashcards in 1.3.2 Databases Deck (34)
Loading flashcards...
1

Define a database

An organised collection of data

2

Define a table

Stores data about a type of entity

3

Define an attribute

A column in a table, called a field

4

Define a primary key

An entirely unique identifier for an entity

5

Define a composite key

A pair of two attributes to make a primary key

6

Define a foreign key

A non-primary key attribute in one table which links to the primary key field in another table

7

Define data integrity

This refers to the accuracy and reliability of data

8

Define referential integrity

This refers to the data integrity in relational databases. It tidies up any effected records.

9

What are the types of entity relationships?

1 to 1

1 to many

Many to many

10

Define a flat-file

A single table which contains all the data, which can have repeating data or data which extends over multiple lines

11

Define the stages of 1st Normal Form

  • Each record has a primary key
  • Data is atomic
  • No repeating groups of attributes

12

Define the stages of 2nd Normal Form

  • Data is in 1NF
  • There are no partial dependancies

13

Define the stages of 3rd Normal Form

  • Data is in 2NF
  • There are no non-key dependencies

14

What is SQL?

The standard tool for working with databases. It is a declarative language

15

Explain the DELETE SQL command

DELETE FROM tblName

WHERE [criteria];

 

This deletes from the table any record which matches the criteria

16

Explain the INSERT SQL command

INSERT INTO tblName (field-list)

VALUES (value-list);

 

This adds a record into the table with the specified values

17

Explain the SELECT SQL command

SELECT field-list

FROM tblName

18

Explain the DROP SQL command

DROP TABLE tblName

or DROP DATABASE dbName

or DROP INDEX field-name ON tblName

 

This will delete the item named

19

Explain the JOIN SQL command

SELECT field-list

FROM tblName1

JOIN tblName2

On join-criteria

 

This allows data from 2 different tables to be selected, where the tables are linked with a foreign-primary key pair

20

Explain the ORDER BY SQL command

... ORDER BY field1 [ASC/DESC];

 

This orders the selected data in either ascending or descending order according to the criteria

21

What is the SQL wildcard?

*

This states to disregard what comes before/after the * for the given text

22

What is a client-server database?

A database residing on a server, with client applications written to access the database

23

What is concurrent requests?

When a request is made at the same time as another request

24

What is a problem with concurrent requests?

If one request is to update data, while another is to read or update data, then a problem can arise

25

What is a transaction in regards to client-server databases?

A single logical action / unit of work

26

What are the features of a good database?

Atomicity

Consistency

Isolation

Durability

27

Describe atomicity in regards to databases

The components of a transaction are atomic, it must succeed or fail

28

Describe consistency in regards to databases

Ensuring an illegal transaction is rejected so that the integrity is upheld

29

Describe isolation in regards to databases

Each transaction is dealt with in a way that doesn't affect others

30

Describe durability in regards to databases

Ensuring data is saved once a transaction is completed