5
Code Description Colour Selling Price No. Sold C105 Matt Primrose £9.00 4 C106 Matt Lilac £9.00 6 C120 Silk Primrose £9.00 4 C121 Silk Lilac £9.00 2 C123 Silk Plum £9.00 0 C124 Matt Magnolia £7.00 7 C125 Matt Jade £7.00 6 1.

Code DescriptionColourSelling PriceNo. Sold C105MattPrimrose£9.00 4 C106MattLilac£9.00 6 C120SilkPrimrose£9.00 4 C121SilkLilac£9.00 2 C123SilkPlum£9.00

Embed Size (px)

Citation preview

Page 1: Code DescriptionColourSelling PriceNo. Sold C105MattPrimrose£9.00 4 C106MattLilac£9.00 6 C120SilkPrimrose£9.00 4 C121SilkLilac£9.00 2 C123SilkPlum£9.00

Code Description Colour Selling Price No. Sold

C105 Matt Primrose £9.00 4C106 Matt Lilac £9.00 6C120 Silk Primrose £9.00 4C121 Silk Lilac £9.00 2C123 Silk Plum £9.00 0C124 Matt Magnolia £7.00 7C125 Matt Jade £7.00 6

1.

Page 2: Code DescriptionColourSelling PriceNo. Sold C105MattPrimrose£9.00 4 C106MattLilac£9.00 6 C120SilkPrimrose£9.00 4 C121SilkLilac£9.00 2 C123SilkPlum£9.00

2. a) .Describe and give a be a use for each

Transaction File

A transaction file is a temporary file used to store data, which will be used to update the master file.

Examples• Bank transactions for a day• Employees hours worked for a week

Master File

A master file is the main file for an application - a large file of semi-permanent data.

Examples• Bank Customers• Employees

Page 3: Code DescriptionColourSelling PriceNo. Sold C105MattPrimrose£9.00 4 C106MattLilac£9.00 6 C120SilkPrimrose£9.00 4 C121SilkLilac£9.00 2 C123SilkPlum£9.00

2. b) Draw a diagram that illustrates the organisation of each type of file

Serial File

A serial file is one in which the records have been stored in the order in which they have arisen. They have not been sorted into any particular order.

7

Sequential File

A sequential file is one in which the records are stored in sorted order of one or more key fields.

Key Data

2

Key Data

1

Key Data

4

Key Data

5

Key Data

1st Rec 2nd Rec 4th Rec3rd Rec 5th Rec

1

Key Data

2

Key Data

4

Key Data

5

Key Data

7

Key Data

1st Rec 2nd Rec 4th Rec3rd Rec 5th Rec

Page 4: Code DescriptionColourSelling PriceNo. Sold C105MattPrimrose£9.00 4 C106MattLilac£9.00 6 C120SilkPrimrose£9.00 4 C121SilkLilac£9.00 2 C123SilkPlum£9.00

c) Outline using a diagram and at least 4 stages how a transaction file could be used to update a master file

The 1st record from the sorted transaction file is read

The 1st record from the old master file is read

These are compared:

If the Old master file record < the transaction recordCopy it to the new master file unchanged

The next record from the old master file is read

If the Old master file record < the transaction recordCopy it to the new master file unchanged

If the Old master file record = the transaction recordUpdate the record and then copy it to the new master file

Unsorted

Sort

Page 5: Code DescriptionColourSelling PriceNo. Sold C105MattPrimrose£9.00 4 C106MattLilac£9.00 6 C120SilkPrimrose£9.00 4 C121SilkLilac£9.00 2 C123SilkPlum£9.00

3. Describe using a diagram and notes how a large sequential file is backed up

• Sequential files uses a Grandfather - Father - Son method of back up. This is also called generations of files.

•The Old Master Files and corresponding transactions are kept for several generations. (kept securely at a different site)

•If a disaster occurs and current data is lost it can be recreated by using the safely stored previous generation data (Old Master file and Transactions)

Grandfather

Son

Father

Store Safely

Store Safely