0% found this document useful (0 votes)
79 views11 pages

Chapter 5 Classified MS

This document discusses database design concepts including: - Describing different field types like numeric, text, date that could be used in a database. - The benefits of a relational database over other options like reducing data duplication and allowing complex queries and reports across multiple tables. - Key concepts in relational database design including primary keys, foreign keys, and relationships between tables. - Examples of data validation checks that can be performed on fields like format checks, type checks and more.

Uploaded by

Youssef Khaled
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views11 pages

Chapter 5 Classified MS

This document discusses database design concepts including: - Describing different field types like numeric, text, date that could be used in a database. - The benefits of a relational database over other options like reducing data duplication and allowing complex queries and reports across multiple tables. - Key concepts in relational database design including primary keys, foreign keys, and relationships between tables. - Examples of data validation checks that can be performed on fields like format checks, type checks and more.

Uploaded by

Youssef Khaled
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Eng. Omar Elsafty Eng.

Mostafa Elkomy

Chapter 5 P1 MS
1
Last_order_received [1]
Food_type [1]
Re-order [1]
Packs_in_stock [1]

It’s crucial to write down the field names exactly as stated in the question

2 (a) (i) Air conditioning (Y/N) [1]

(ii) Two from:


− The field only contains Y or N (Two possibilities)
− It saves time entering the data
− It reduces errors while inputting the data
− It’s easier to validate
− It saves storage space for the files
[2]

(b) (i) Number sold [1]

(ii) One from:


− Might need to calculate total of all cars sold
− Easier to validate
− Might need to produce a graph
− Can easily find best selling make
[2]

3
(a) Year_joined: Numeric Integer [1]

Gender: Boolean [1]

Date_of_birth: Date // Date/Time [1]

Cost_of_membership: Numeric Currency [1]

(b) Two from:


The field would not be used for calculations
There is a leading zero in the data
Text fields take up less space than numeric fields [2]

1
Eng. Omar Elsafty Eng. Mostafa Elkomy

4
(a) 4 [1]

(b) 5 [1]

(c) Relational Database [1]

(d) Two from:


− No duplication of data so less data entry
− Saves time when entering data
− Less errors are produced
− Saves storage space
− Easier to add/modify/delete data
− Complex reports can be created
− Complex queries can be carried out
− Better security as some tables can be made confidential
− Less inconsistency of data [2]

(e) Code [1]

(f) Book Borrowed [1]

(g) Cost [1]

(h) Date [1]

5
Numeric Integer [1]
Numeric Real/Decimal [1]
Boolean/Logic [1]
Alphanumeric/Text [1]

5
(a) Book_ID [1]
(b) Borrower_ID [1]
(c) one-to many [1]

(d) Numeric Currency [1]


Alphanumeric/Text [1]
Alphanumeric/Text [1]
Date // Date/Time [1]

2
Eng. Omar Elsafty Eng. Mostafa Elkomy

6
Boolean [1]
Alphanumeric/Text [1]
Numeric Integer [1]

7
(a) Three from:
− Contains more than one table
− Tables are linked
− It uses relationships
− Removes redundancy of data
− Saves storage space [3]

(b) Four from:


− Primary key holds unique data
− Primary key identifies the record
− Primary key can be automatically indexed
− Each table has one primary key whereas a table can contain a number of foreign keys
− Foreign key is used to link with the primary key of another table [4]

8 Six from:
Advantages of relational databases
− No duplication of data so less data entry
− Saves time when entering data (due to less data entry)
− Less errors are produced (due to less data entry)
− Saves storage space as (data is only stored once)
− Easier to add/modify/delete data
− Complex reports can be created
− Complex queries can be carried out
− Better security as some tables can be made confidential
− Less inconsistency of data
− More ability to cater for future requirements / expansion

Disadvantages of relational databases


− Takes more time to set up
− More complex than relational databases as more tables are used
− More complex to understand
− Sorting/Filtering of data is more complex
− Slower extraction of data
− Needs more processing power for complex queries
− Needs specialist personnel to setup the database [6]

You have to mention both advantages and disadvantages of relational database to get the full
mark

3
Eng. Omar Elsafty Eng. Mostafa Elkomy
9 Eight from:
Similarities
− Both use a primary key
− Both can create searches/reports
− Both store data in records and fields in the table
− Both use indexes

Differences
− Flat file database is a plain text file
− Flat file is a simple structure
− Flat file uses one table
− Relational database has linked tables/relationships
− Relational database allows searches/reports to be created over multiple tables
− Relational database allows cross referencing between tables
− Relational database records are easier to add
− Relational databases are more powerful
− Relational database reduces duplicate data
− Relational database uses foreign keys
[8]
To gain full marks there must be correct answers for both similarities and differences

10 One reason from:


− The data is in a list
− There is only a small amount of data
− A single table is to be used
[1]
One mark for example:
Example of a list such as name, address/CSV files
[1]
11 Four from:
- Open database
- Create new table of pupil data
- Create new table of examination data
- Select primary and foreign keys
- Link the two database tables using a primary/foreign key...
- ...and a foreign/primary key
- Set up the relationship
- Import the data for the pupils from the pupil records
- moor the data from the examinations from the examination boards
[4]

12
Length check [1]
Range check [1]
Type check [1]
Format check [1]

4
Eng. Omar Elsafty Eng. Mostafa Elkomy

13 (a)
Examination_ID: Alphanumeric/Text [1]
Name_of_subject: Alphanumeric/Text [1]
Examination_level: Boolean/Logic [1]
Date_of_exam: Date // Date/Time [1]

(b) One mark for name of suitable check and One mark for description of suitable check

Examination_ID
Length check
The data must be exactly 6 characters

OR

Format check
Must be in the form of 4 digits

Date_of_exam

Format check
Must be in the form 2 digits then slash then 2 digits then slash then 4 digits

OR
Length check
The data must be exactly 10 characters
[4]

14
ISBN : Check digit/length check/format check [1]
Year_published: Type check/length check [1]
Date_acquired: Format check/length check [1]

Answer must be different for each field

15 (a)
Checks the data entered/transferred/copied correctly
Matches the original document [2]

(b)

Check digit: Serial_number [1]


Length: Shelf_number [1]
Type: Number_in_stock//Name_of_supplier//Name_of_item [1]

(c) Serial_number [1]

5
Eng. Omar Elsafty Eng. Mostafa Elkomy

16
(a) ISBN: Check digit/length check/format check/presence check [1]
Date_due_back: Format check/length check

(b) Book_ID [1]

(c) Borrower_ID [1]

(d) Two from:


− The field is not needed for calculation
− Number starts with a zero/+ symbol
− May include a space
[2]

17
(a) Two from:
Use a check digit Single digit calculated from other digits appended to these,
Computer carries out fresh calculation on digits and compares answer with original check
digit.
[2]
(b) Limit check/range check
Reorder_level <=100
He probably omitted/forgot the = sign
[2]
(c) Use a format check
Supplier_code should be 2 letters followed by 3 digits
[2]
(d) Barcode – text/alphanumeric
Supplier_code – text/alphanumeric
Contents – text/alphanumeric
Price – (number), currency
Reorder_level – (number), integer
Weight – (number), decimal
[6]

6
Eng. Omar Elsafty Eng. Mostafa Elkomy
18
(a) Breed_of_cow Text/alphanumeric
Date_of_birth Date // Date/Time
Weight_of_cow Numeric: decimal/real
Average_milk_yield Numeric: decimal/real
Animal_passport_number Text/alphanumeric
[5]
(b) Animal_passport_number
[1]
(c) Matched pairs
Format check
The data is in the format 3 digits ‘/’ 4 digits
Or
Length check
Length of exactly 8 characters
[2]
19
(a) Medical_ID_number length check/check digit/type check/character check/range check
Blood type Lookup check
Date of birth Format check/range check/length check
Contact_telephone_number Length check/character check/format check
[4]
(b) Medical_ID_number
[1]

Answer must be different for each field

20
(a) Two from:
− Proofreading often involves reading through the document without referring to the original
source document.
− This is to check for errors in the typing/spelling/grammar.
− Verification involves reading through the document but referring to the original source
document.
− Verification can involve one person reading the document and a second one re-reading the
document.
− Proofreading does not involve two people keying in the same data for the computer to
compare the versions.
[2]
(b) Visual verification/Visual check
[1]

7
Eng. Omar Elsafty Eng. Mostafa Elkomy
21

22 (a) One mark for method and one mark for description

Visual check [1]

One from:
- Data is compared visually with the source document by a user
- The user is asked to confirm that the data entered is same as original
- If user finds a difference, the data is re-entered [1]

Double data entry [1]

One from:
- Data is entered twice by the same person // by two different people
- A computer checks that both entries are equal
- If they are not equal, an error message requesting to re-enter the data is displayed
[1]

(b) Four from:


− Not all errors are found by either validation or verification separately
− Source document may contain errors
− Verification only checks that data is copied correctly
− Validation only checks if data is reasonable/sensible
− Allow any correct example e.g. the mark registered for a student is incorrect on the source
document and was copied
− Correct appropriate explanation of an example of a validation check; e.g. number of lates for
a student is 7 misread as a 1; in a range check of 1 – 10
[4]

8
Eng. Omar Elsafty Eng. Mostafa Elkomy
23 Three from:
− Flat file database is a plain text file
− Flat file is a simple structure
− Flat file uses one table
− Relational database has linked tables/relationships
− Relational database allows searches/reports to be created over multiple tables
− Relational database allows cross referencing between tables
− Relational database records are easier to add
− Relational databases are more powerful
− Relational database reduces duplicate data
− Relational database uses foreign keys [3]

24 Max two marks, for each example:

Matched pairs

Type of book
Can use length/lookup check as only one letter is input for example E or H
Cannot use a type check as only one letter used

ISBN
Can use check digit as a way of checking that digits are not transposed
Cannot use a length check as they are different lengths

Date of purchase
Can use a format check as all dates are the same format.

Number of copies
Can use a range/limit check as the lowest number is 1
Can use a type check as only numbers are accepted

Name of book/Name of Book


Cannot use a length check as names can be any length Cannot use a type check as any
character can be used

Name of author
Cannot use a length check as names can be any length
[4]

9
Eng. Omar Elsafty Eng. Mostafa Elkomy
25
(i) format check
must consist of one letter, three digits, space, three letters

(ii) range check


must be >=140 and <=180

OR

Type check
must be numeric integer [4]

26
(a) Member name Text/alphanumeric
Telephone number Text/alphanumeric
Expiry_date_of_membership Date // Date/Time
Membership fee amount Currency
[4]
(b)
Benefits
Max five from:
- Membership details can be searched / sorted very quickly
- ...useful if there are hundreds of members

- Membership details can be easily edited...


- ...by searching for a record then changing / adding / deleting

- The data in the database can be backed up easily...


- ..therefore preserving the records ..creating an archive of past members

- Far more secure than other methods...


- ...can be password protected

- Can be used as a source for mail merging...


- ..saves re-writing the database

- Re-writing the data each time it is used would cause errors


- Re-writing the data each time it is used could take a lot of time

Drawbacks
Max five from:
- Need IT skills
- Need to have to correct software
- Can take up a lot of storage space / memory in the computer
- The software could be expensive to buy
- Training on how to use the software. ..could be expensive for the club [6]

To gain full marks there must be correct answers for both benefits and drawbacks
10
Eng. Omar Elsafty Eng. Mostafa Elkomy

27
(a) State = NOT ‘Extinct’ AND Country = ‘China’ AND Last_eruption < 1900

State = – 1 mark or State <> – 1 mark


NOT ‘Extinct’ – 1 mark or <> ‘Extinct’ – 1 mark
AND Country – 1 mark
= ‘China’ – 1 mark
AND Last_eruption – 1 mark
< 1900 – 1 mark [6]

(b) Tengchong
Wudalianchi [2]

(c) Wudalianchi [2]

28
(a) Product_ID [1]

(b) Product_ordered [1]

(c) 1231 [1]

(d) 1235
1236 [2]

29

11

You might also like