Sei sulla pagina 1di 5

Ne diagramin e DB realizoni:

Skriptet per krijimin e tabelave

Krijimin e 5 rrjeshave per secilen tabele

Update secilen tabele

Shtimin e 1 Kolone seciles tabele


Create Table Student (

Student_ID intiger (15) Not Null Primary Key,

Student_Name varchar(15) Not Null,

DOB data Not Null,

Door# Intiger (5) Not Null Unique,

Street Varchar (25) Not Null,

City varchar(15) Not Null Default,

State Varchar(20) Default,

PIN Intiger (5) Not Null Primary Key );

Insert into Student (Student_ID Student_Name DOB Door# Street City State PIN )

Values ( ‘1035469726’, ‘ Arben ‘ , ’12/10/2000 ‘ , ‘321 ‘ , ‘7 Nentori ‘ , ‘Tirana ‘ , ‘Shqiperi ‘ , ‘ 101200‘ );

Insert into Student (Student_ID Student_Name DOB Door# Street City State PIN )

Values ( ‘4583167294‘ , ‘Armando ‘ , ‘ 05/06/1999‘ , ‘75 ‘ , ‘ Arbrit‘ , ‘ Shkoder‘ , ‘ Shqiperi‘ , ‘060599 ‘);

Insert into Student (Student_ID Student_Name DOB Door# Street City State PIN )

Values ( ‘6573489124 ‘ , ‘ Valentino ‘ , ‘13/06/2001 ‘ , ‘914‘ , ‘ Pekini ‘ , ‘Berat ‘ , ‘Shqiperi ‘ , ‘ 061301‘ );

Insert into Student (Student_ID Student_Name DOB Door# Street City State PIN )

Values ( ‘2798461352‘, ‘Rigelsa ‘ , ‘17/10/1998 ‘ , ‘ 468‘ , ‘Aleksandria ‘ , ‘ Tirana‘ , ‘Shqiperi ‘ , ‘101798 ‘);

Insert into Student (Student_ID Student_Name DOB Door# Street City State PIN )

Values ( ‘7491857366 ‘ , ‘Endrit ‘ , ‘ 31/01/2000‘ , ‘667 ‘ , ‘London ‘ , ‘Vlore ‘ , ‘Shqiperi ‘ , ‘013100 ‘ );

Update Student

Set Street = ‘Dritan Hoxha’

Where Street = ‘Aleksandria’

Alter Student ADD E-mail varchar (25) Not Null Unique


Create Table Lecturer (

Lecturer_ID Intiger (10) Not Null Primary Key

Lecturer_Name Varchar (50) Not Null );

Insert into Student (Lecturer_ID Lecturer_Name)

Values ( ‘ 987‘ , ‘ Agron‘ );

Insert into Student (Lecturer_ID Lecturer_Name)

Values ( ‘654‘ , ‘Ardit ‘ );

Insert into Student (Lecturer_ID Lecturer_Name)

Values ( ‘ 321‘ , ‘Gena ‘);

Insert into Student (Lecturer_ID Lecturer_Name)

Values ( ‘ 001‘ , ‘Lediana ‘);

Insert into Student (Lecturer_ID Lecturer_Name)

Values ( ‘234 ‘ , ‘ Mateo‘ );

Update Lecturer

Set Lecturer_ID = ‘789’

Where Lecturer_ID = ‘987’

Alter Lecturer ADD Mbiemri varchar (15) Not Null ;


Create Table Stud_Hobby (

Student_ID intiger (15) Not Null Primary Key,

Hobby Varchar (30) Not Null );

Insert into Student (Student_ID Hobby)

Values ( ‘1035469726’ , ‘ Basketball ‘);

Insert into Student (Student_ID Hobby)

Values ( ‘4583167294‘ , ‘Muzika ‘);

Insert into Student (Student_ID Hobby)

Values ( ‘6573489124‘ , ‘ Luaje Kitare‘);

Insert into Student (Student_ID Hobby)

Values ( ‘2798461352‘ , ‘Football ‘);

Insert into Student (Student_ID Hobby)

Values ( ‘7491857366 ‘ , ‘Football ‘);

Update Stud_Hobby

Set Hobby = ‘Voleyball’

Where Hobby = ‘Luaje Kitare’

Alter Stud_Hobby ADD Student_Name varchar (25) Not Null ;


Create Table Course (

Course_ID Intiger (3) Not Null Primary Key

Course_Name Varchar (50) Not Null );

Insert into Table Course (Course_ID, Course_Name)

Values ( ‘532’ , ‘Aplikimi I kompresimit dhe inkriptimit’ )

Insert into Table Course (Course_ID, Course_Name)

Values ( ‘751’ , ‘Instalimi I Windowsit’ )

Insert into Table Course (Course_ID, Course_Name)

Values ( ‘121’ , ‘Programimi I faqeve internet Interaktive’ )

Insert into Table Course (Course_ID, Course_Name)

Values ( ‘943’ , ‘Reduktimi I DB me SQL’ )

Insert into Table Course (Course_ID, Course_Name)

Values ( ‘336’ , ‘Montimi I nje Kompiuteri’ )

Update Course

Set Course_ID = ‘235’

Where Course_ID = ‘532’

Alter Course ADD Objektivat varchar (50) Not Null ;

Potrebbero piacerti anche