0% found this document useful (0 votes)
5 views26 pages

Databased Programming with SQL (On Oracle) - Formative Assessment 1_q82

Uploaded by

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

Databased Programming with SQL (On Oracle) - Formative Assessment 1_q82

Uploaded by

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

Oracle Database Programming

Oracle Database Programming (ORDP)


Assignment
1
Number
Assignment
Formative Assessment
Name
NQF Level N/A
Credits N/A
Due Date 24 November 2024 @23:45
Total marks = 150
Formative assessments through the semester contribute
towards the student’s module mark and are used to assess
progress and identify areas for improvement. This formative
Marks assessment will contribute 25% towards final mark.
Take note of the following with regards to late submissions:
a. One (1) day late (-5%)
b. Two (2) days late (-10%)
c. Three (3) days late (-15%)
Individual /
Group Individual
Assignment
Lecturer Information
Lecturer Daniel van Deventer
Lecturer E-mail [email protected]

Learning Objective:
Formative assessment 1 will cover the following concepts:
a. Database creation
b. Basic retrieval
c. Filtering and Sortings
d. Aggregate Functions
e. Joins
f. Subqueries
g. Data Manipulation
h. Views
i. Constraints and Indexes
Attributes/Competencies Assessed:
N/A
Scope:
The scope of this formative assessment is based on a solid knwoledge coding databases
using T_SQL.
Technical Aspects:
The number of pages for this formative assessment is 13 and the following font and size
should be used in your report:
a. Font: Arial
b. Size: 12 and 14 for headings
c. Font colour: Black
Save and upload the report as a .PDF (No backgrounds) with the following naming
convention:
a. Student no_StudentName_StudentSurname_ModuleCode_FA1 (No ZIP folder
uploads)
Ensure adequate referencing is used when using information from either books or
internet. Plagiarism is a serious offecne and can result in 0% for the assessment when
excessive work is copied without proper referencing.
Please complete the following and sign as requested for Portfolio of Evidence (POE)
a. Save code with screeshots of each question and upload when completed
b. Pre-Assessment agreement (Save, sign and submit as PDF)
c. Assessment Feedback Agreement (Save, sign and submit as PDF)
Mark allocation for report
See Mark allocation sheet below

Scenario
Tygervalley Pet Shelter (TPS) receives food donations from a group of pet food
manufacturers.
TPS relies on each manufacturing company for a particular need. For example,
Veggie Land
supplies all the vegetables and Premier Seed Suppliers supplies all the seeds.
The different food types are allocated to the animals according to their category.
For example,
food type ‘seeds’ is allocated to category ‘Birds’, while food type ’vegetables’ is
allocated to the
categories ‘Mammals’ and ‘Birds’.
Each animal category is subdivided into different pet types. For example, the
mammal record
could relate to pet types ‘Dog’ and ‘Cat’.
TPS has recruited you to be their database designer. The database will store
information on their
suppliers, food types, animal categories, and pet types.
 Record a unique, auto-incrementing ID, company name, contact number,
and possibly an email address for each manufacturer.
 When recording information about the different food types, ensure that the
expiry date is also stored.
 When recording how much food will be allocated per animal category,
specify the quantity amount as two separate fields. For example, if 8.5
kilograms of Roast Chicken Pellets are allocated to category ‘Mammals’,
‘8.5’ and ’kg’ will be two different fields.
 The stock level for each pet type must also be stored together with the pet
type so that the number is known for each category. For example, there are
10 dogs and 20 cats for category ‘Mammals’, or 40 parrots for category
‘Birds’.

Final ER Diagram to be used that supports scenario above:


Objective
This practical exercise is designed to reinforce your understanding of SQL
fundamentals covered in the OCA Oracle Database SQL certification module.

Instructions
 Use Oracle SQL syntax for all the instructions presented in the following
questions.
 Execute each query and verify the results to ensure accuracy.
 Feel free to use any necessary SQL clauses, functions, and statements.
 Document your queries and the corresponding results. (Screenshots)

Question 1
(30)
Create the following:
a) Fully functional database with an appropriate name for your database (10)
Linked Server created to connect from SSMS to Oracle:

Database:
b) Create all tables according to the ER diagram supplied
(10)
c) Create at least ten (10) entries/inserts for all your tables created
(10)
Script Continues below
(120)
a) Question 2 Basic retrieval
(15)
a. Write an SQL query to retrieve the Food name and Food expiry Date from the
“FoodType” table.
b) Filtering and sorting
(15)
a. Retrieve the “FoodID”, “FoodName”, “FoodExpiryDate”, “FoodDescription” and
“Measurement” from the “FoodType” table where the “Measurement” is
greater than 10kg. Sort the results by “Measurement” in descending order.
c) Aggregate Functions
(15)
a. Calculate and display the “AllocatedAmount” of “FoodType” and the average
“AllocatedAmount” per “FoodType”.
d) Joins (15)
a. Retrieve the “FoodID”, “FoodName”, “Measurement”, “CompanyName,
“ContactNumber’, and “AnimalType” for all “FoodTypes” who have a
“Measurement” value of 5kg or above.
b. Joins to be used to link all the entities in the ER diagram.
e) Subqueries (15)
a. Find the Company with the highest total amount of “FoodTypes” supplied.
Display the “CompanyName”, “ContactNumber” and “Email”. Utilize a
subquery to achieve this.
f) Data Manipulation
(15)
a. Increase the “Measurement” of the “FoodType” with ProductID 3 by 50kg.
g) Views
(15)
a. Create the following views:
i. vw_ManufacturerDetails
Select manufacturing company details, the food type, food ID, and
amount per category

.
ii. vw_PetsPerType – Select each animal type, total animals in stock, the
animal category ID, and category name.
iii. vw_ExpiredFoodDetails – Select the company name, contact number,
food ID, name, expiry date, amount per category, measurement, and the
category name. This only applies to expired products that are in use
(have dependent records). HINT: Use the GETDATE() function to compare
the expiry date against today’s date.
iv. vw_LowestFoods – Select the category name and the sum of the total
animals in the category. Only the three records with the lowest pets
must be selected.
h) Constraints and Indexes
(15)
a. Add a unique constraint to the “Email” attribute in the “FoodManufacturer”
table to ensure that each email is unique.
Mark allocation for student

Section Sub-section Maximum Mark Learner mark

Question 1.a 10

Question 1.b 10

Question 1.c 10

Question 2.a 15

Question 2.b 15
1Body of the
Question 2.c 15
report
Question 2.d 15

Question 2.e 15

Question 2.f 15

Question 2.g 15

Question 2.h 15

1 day late
-5
2 days late
Deductions -10
3 days late
-15

Total: 150

ASSESSMENT AGREEMENT
Assessment Preparation: Preparing the Candidate
Student name Date 24 Nov 24
and surname Mogamat Adams
Time 22:25
Assessor name
Venue Cape Town
and surname
How to prepare the Document Agre Action
candidate Requirements e Required
(tick)
Explain to the candidate Assessment Policy
why you are meeting Assessment process X
and the purpose of the
assessment.
Discuss the assessment Assessment strategy
X
plan in detail.
Explain assessment Assessment
process, show instruments
assessment instruments
X
to candidate and
describe assessment
conditions.
Identify the role-players Assessors
during assessment. X
Moderator
Describe the evidence Examples of evidence
required to be declared X
competent.
Explain how evidence Mark allocation
X
will be judged. explained
Explain to the candidate Assessment task
how to prepare: Give description
X
candidate assessment
task description.
Confirm with the Detailed briefing on
candidate what he/she exact requirements to
X
should bring to the be given to candidate
assessment. in writing
Ensure that candidate Appeals Policy
understands the Appeals procedure
procedures of all
assessment practices. Assessment Policy
Assessment Procedure
X
Moderation Policy
Moderation procedure
Verification Policy
Verification Procedure
Ask the candidate if List needs
he/she foresees any
X
problems or identify any
special needs.

Agreed Assessment Plan


Student name and surname: Mogamat Adams
Assessor name and surname:
Module name: Oracle Database Programming
Unit Standard/s: N/A
Type of Assessment i.e. Formative
assignment, Formative test, Formative Formative Assessment 1
Practical, Summative etc.
Special Assessment Requirements: N/A
Event Date, time and Resources Evidence to be
location required generated
Assessments due Assessments Completed
date documentation
Complete activity Completed
on MyAIE and Portfolio of
upload to MyAIE Evidence
Submit Portfolio
of Evidence

Assessor Roles and Responsibility


Roles Assessor
Guide
Feedback Agent
Reviewer
Responsibilities Consult candidate re-assessment, assessment process and
plan.
Agree assessment process and plan with candidate.
Forward documentation to candidate: plan, guide and
assessment instruments.
Assess candidate with the use of different instruments.
Provide feedback on assessment findings.
Support candidate through assessment process.
Source feedback from candidate on assessment process.
Review assessment process and outcome.
Use assessment process as opportunity to transform
assessment activities and outcomes.
Candidate Roles and Responsibility
 Leaner
Roles
 Feedback agent
 Reviewer
 Be available for assessment.
Responsibilities
 Be actively involved in the consultative
process.
 Learn from the assessment process.
 Provide feedback to the assessor in terms of
the assessment as learning activity.
 Provide feedback to the assessor on the
efficacy of the assessment process.
 Review own role and assessor role in the
assessment process.
 Portfolio of Evidence
Assessment Instruments
 Questionnaire
 Report
 Presentation
 Reflexive questions
 Work sample
 Practical’s
 Group Activity
 Research activities

Assessment Process
 Evaluation of POE addressing Essential
Embedded Knowledge in unit standards.
 Evaluation of Research Projects and other
evidence addressing specific unit standards.
 Consultation: assessment plan and assessment
activities and instruments. Pre-assessment
moderation and interviews conducted at this
stage.
 Observation: feedback on assessment against
specific outcomes, critical outcomes in unit
standards.
 Feedback: to candidate regarding sufficiency of
evidence and possible interview to gain
supplementary evidence.
 Feedback to candidate regarding assessment
findings as well as review process.
Feedback Written feedback to be given to all stakeholders at the
end of the assessment process, as well as verbal
feedback to the candidate during assessment activities.
Recording Process and findings to be recorded and submitted for
Process record keeping purposes as well as moderation and
verification.
Review The review process is the responsibility of the assessor
Process and the candidate. Joint reviewing will take place after
feedback has been given to the candidate.
Right to The candidate must be advised of the right to appeal.
appeal
Resources Assignments
Required  POE
 Assessments
 Guides
I confirm that:
 I have been consulted on and have agreed to the training and
assessment process as detailed in the assessment guide.
 I have been advised of my right to appeal against any assessment that
is unfair, unreliable, invalid or impracticable.
 I have read and understood the appeal procedure.
 I know that assessments may be moderated or verified by an external
party.
 The purpose of the assessment has been clearly explained to me.
 The criteria have been discussed with me, and I know I will be assessed
against these criteria.
 I know when and where I will be assessed, and I was given fair notice.
 I know how the assessment will be done, and any other requirements
related to the assessment.

Signed _____MR Date: __24 Nov 24______


: Adams________________________

Overall Assessment Compete Not yet


Decision nt competent

Student’s Signature Date:

Assessor’s
Date:
Signature

Moderator’s
Date:
Signature

ASSESSMENT FEEDBACK AGREEMENT


Assessment feedback: Feedback to learner

Qualification Name: Data Engineering

Qualification SAQA
Number:

Subject Name: Oracle Database Programming

Subject Code: ORDP

Assessment Name: Formative Assessment 1

Assessment Code: ORDP_FA1

Assessment Type: Formative

1st Attempt 2nd Attempt


Feedback report
C NYC C NYC

Unit standard
Number(s)

Question 1

Question 2

General feedback to learner (Attempt 1)


Supply comprehensive feedback why learner is found NYC

Learner Number: 290555

Learner name and Mogamat Adms Date: 24 Nov 24


surname:

Learner Signature: MR Adams

Lecturer name and


Date:
surname:

Lecturer Signature:

Assessor name and


Date:
surname:

Assessor Signature:

Moderator name and


Date:
surname:

Moderator Signature:

Note to learner

Review the feedback provided by your lecturer to check that you have been
found competent in this assessment. If there are any areas where you have
been found not yet competent, you must redo those parts of the assessment
and resubmit within the stipulated time frame.

The section below will only be completed in cases where the learner was asked
to
resubmit parts of the assessment where they were found not yet competent.

General feedback to learner (Attempt 2)


Supply comprehensive feedback why learner is found NYC
Learner Number: 290555

Learner name and


MR Adams Date: 24 Nov 24
surname:

Learner Signature:

Lecturer name and


Date:
surname:

Lecturer Signature:

Assessor name and


Date:
surname:

Assessor Signature:

Moderator name and


Date:
surname:

Moderator Signature:

You might also like