ADS - Data Storage Tutorial 1: Instructions
ADS - Data Storage Tutorial 1: Instructions
Instructions
• For all these you’re required to use MySQL and MySQL workbench platform.
• After completion you will be required to upload your work into the link that will be provided
later on either blackboard or Google forms
• You are expected to work independently for these tasks, yes you may consult the internet or
any books for research purposes.
You have been appointed as an IT developer by the South African Post Office to assist them as they
have been appointed by SASSA to distribute the grants. The following has to be achieved.
1. Using MySQL and MySQL workbench as stipulated in the instruction, write a database sql
script that will create new database call “SASSA_Grants” and if it already exist it must be
deleted first.
2. Using the “SASSA_Grants” database: create scripts to achieve the following:
a. Create a table called “GrantRecipients” with the following fields:
RecipientID Surname FirstNames IDNO Address
(Integer, Auto (varchar max (Varchar max (integer, Max (varchar max
increment, 50) 50) 13) 80)
Primary Key)
Page 1 of 2
d. Insert any data into the table “GrantReceipients” that meets the fields criteria, using
the MySQL workbench interface, you might have to research how to commit data
here or use a script as well.
e. Using the script or MySQL workbench interface create a table called
“RecipientGrantLinks” with the following fields:
This table holds the link that identifies which Recipient collects what type of a grant.
f. Load the “RecipientGrantLinks” table with the sample data of your choice as long as
the data exists in both “GrantNames” and “GrantRecipients” tables so that the links
will be meaningful.
3. Create a SQL script that will return all GrantRecipients and the grants they collect ensure the
grant amount is shown as well, If the Recipient receives more then 1 grant i.e. child grants
and Pension, a total amount that they receive must also reflect, also it must be indicated
whether the Recipient is Male or Female and how old they are.
4. Finally create a View called “GrantTotals” this must show each grant and a total of
Recipients for it like in the following table as an example:
GrantID GrantName Total Recipients
1 Pension Grant 25
2 Child Grant 50
Page 2 of 2