You are on page 1of 20

Higher National Unit Specification: General Information

Statement and Confirmation of Own Work

Unit Title: SQL Introduction

Unit code: DH3J 34

Superclass: CB

Publication Date: August 2018

Source: Scottish Qualifications Authority

Version: 01

Student declaration

I have read and understood SQA HND’s Policy on Academic Dishonesty and Plagiarism.

I can confirm the following details:

Student ID/Registration number :

Name : Wai Yan Kyaw

Centre Name : KMD Computer Centre (Yangon)

Assessor’s Name : KHIN KHIN LAY KOON

Student Signature : WY

Submitted Date : 13-Sep-2018


Owner table

Create table owner

Create owner table including owner_ID with primary


key,surname ,forename,title,tel_nunber and address.And insert 5rows and 6
column.
Pet table

Create table pet

Create pet table including pet_iD with primary


key,name,type,breed,gender,born, connect the foreign key owner_ID from
owner table ,notes with available data type.
Practice table

Create table practice

Create practice table including practice_iD with primary key,practice_name


and practice_address .Each with available datatype.
V VVV
VET table
Create table vet
Creating vet table including vet_id connect with primary key,surname,forename,title,exit
number ,position,salary and practice which connect with foreign key. Each of the column name
have available column length

e
Visit table
Create table visit
Creating visit table including vasit date which connect with primary
key,basic cost with float column type,symptom,treatment and pet_ID,vet_id
they are the two which connect with foreign key from the vet table and pet
table

a
MMMMEDICATION TABLE
MEMEDI

CREATE TABLE MEDICATIOn


Creating medication table which include two foreign key they are pet_ID and vet_ID from the pet and
vet table.the rest are visit date,seq number medicine and cost.each with the availabe datatype
execute the vet table to create basic table and its definitely success.

Task1

Task 2
Excute the visit and medication and its success.and the two of that table connect with foreign key
from the table of pet and vet
Task3
I excute vet table to populate the visit and medication tables,and I successfully insert this
two table .
Task4
On 22 june 2014,the owner of the dig that has sore foot visit the vet to get injection from the
doctorsarah wilson .the cost for treatment is 15.00.

Task5
The antibioticinjection and soothing cream cost a 17.89 and 12.50,so add two rows for the
medicineand cost
Task6
Remove the practice table .

Task7
Remove practice_id which contant with foreign key to vet table.

Task8
Adding a phone number column to the vet table

Task9
Add two junior partner.one of these new vet have not given a mobile phone yet.

insert into vet values('v05','josh','wiston','Mr',6176,'junior partner',25000,'p4')

insert into vet values('v06','franklin','clinton','Mr',6187,'junior


partner',25200,'p5','097836545')

task10
ASSESSMENT2
Task1
Select the title,forename,surname from owner table and name,type,breed from pet table.
And the out put should be sort on the owner surname and the pet name

Task 2
Select the pet that born between 1999 and 20001 and the
pet_ID,name ,type ,breed,born from pet table.and the report should be list in
the oldest first
Task3
Select the type of pet,bet it went the how much there are of each type,and the report should list the
highest occurances first.

Task4
The report want the total salary bill for junior and senior partner.

Task5
The report want the pet that name start or end with s.
And the display is pet_iD,name ,breed and gender.
Task6
A report of list is visit.the report want pet_id name ,breed ,visit date and basic cost which type is dog

Task7
Report want the number of visit which attend by vet,also include vet full name with the count of visit
attend.
Task8
Show the pet that has a symptom of ear and nose,and it also include the type and pet_iD,symptom..

Task9
The report want the total cost of medicine by theeach vet each day.only show the vet_ID and visit date
and total cost .

Task10
Show the list of pet that having an injectionduring may 2004,and the report want visit
date ,name,type,breed,treatmaent.
Task11
The report want t o see the average ,minium and maxium of the to

Task12
The report want the list of symptom ,treatment and medicinefor the pet whose pet_id is p0001.
Report view

You might also like