0% found this document useful (0 votes)
11 views2 pages

Level Four Practical September 2010

level four DBA thery exam

Uploaded by

endesh man
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)
11 views2 pages

Level Four Practical September 2010

level four DBA thery exam

Uploaded by

endesh man
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/ 2

Task One:

createdatabase Ethiopian_Football_Federation

use Ethiopian_Football_Federation
createtable Team(Team_Code varchar(23)primarykey,Team_Name
varchar(34),Budget int)
insertinto Team values('AK001','Adama Kenema',60000)

Q1, createLogin Hidasee withpassword='secure'


Q2, createuser Benishangule forLogin Hidasee
Q3, createrole Aba_Adame
Q4, EXECsp_addrolemember'Aba_Adame','Benishangule'
Q5, denyinsert,updateon Team to Benishangule

Task Two:
Q1, Normalize
createtable Club(CID intprimarykey,Club_Name varchar(45),Annual_Income
money)
createtable Player(Player_Number varchar(24)primarykey,
CID intforeignkeyreferences Club(CID),
Player_Fname varchar(46),Goal int,Playing_Start_Date datetime)

insertinto Club values(106,'Adama kenema F.C',1300000)


insertinto Player values('P008',106,'Oumid',3,10/1/1974)

Q2, select Player_Number,Player_Fname,Club_Name from Club,Player


whereClub.CID=PLAYER.CID AND Club.Club_Name='Arbaminch Kenema'
Q3, select Club_Name,Annual_Income from Club WHERE Annual_Income
BETWEEN 10000000 AND 18000000
Q4, SELECT Player_Fname,Club_Name from Club,Player
WHEREPlayer.Playing_Start_Date<=5/5/1999
Q5, Update Player SET Player_Fname='Elsi'where Player_Fname='Ashenafi'

#include<iostream.h>
int main(){
int N;
cout<<”Pleas enter the number”;
cin>>N;
for(int num=1;num<N;num++)
{if(num%5==0){Cout<<num<<”,”;}}
return 0;}

create database XYZ


use XYZ
create table project(projnum int primary key,projname varchar(24))

create table Employee(EmpNum int primary key, EmpName varchar(32))

create table Jop(JopCode int primary key,JopClass varchar(20),HrRate int)


use XYZ
create table Relations(ProjNum int foreign key references
project(projnum),EmpNum int foreign key references Employee(EmpNum),
jopcode int foreign key references Jop (JopCode),HrChanged int )

insert into project(projnum,projname)values(25,'StarFlight')

insert into Employee(EmpNum,EmpName)values(107,'Marta')

insert into Jop(JopCode,JopClass,HrRate)values(5,'Pgmr',35)

insert into Relations(ProjNum,EmpNum,JopCode,HrChanged)values(25,107,5,40)

You might also like