We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

 

Assignment No. 05
Semester Fall2010
Database Management Systems-CS403
 

 

Total Marks: 15

 

Due Date: 03/02/2011

 

Objective:

To learn and understand basic concepts of “creation and updating” of views.

Instructions:

Please read the following instructions carefully before solving & submitting assignment:

It should be clear that your assignment will not get any credit (zero marks) if:

 

o        The assignment is submitted after due date.

o        The submitted assignment does not open or file corrupt.

o        The submitted assignment is in the format other than MS Word (doc).

o        The assignment is copied (from other student or copy from handouts).

o        Student ID is not mentioned in the assignment File or name of file is other than student ID.

 

For any query about the assignment, contact at cs403@vu.edu.pk

 

GOOD LUCK

 

 

 

Q 1:  Write SQL statements/queries for each of individual scenario given below from the given tables on the next page. 15 marks (3+4+4+4)

 

 

  1. Create a  simple view showing the names of employees whose designation is ”Instructor”
  2. Create a view to list down employees name and designation  of Computer sciences Department
  3. Update view to change designation from instructor to lecturer of employee “Ali hassan”
  4. Create a view to show number of courses student “VU001” is studying.

 

 

If any of above query cannot execute then give its reason in one line

 

 

 

 

 

 

 

 

 

Student

Student ID

Name

Vu001

Imran

Vu002

Raza

Vu003

Kashuf

Vu004

Fatima

Vu005

Maryum

 

Course

Course ID

Course Name

Student ID

Employee id

CS001

CPL

Vu001

02

CS101

Intro to computing

Vu002

02

CS201

Intro to Programming

Vu004

01

CS301

Data Structures

Vu002

01

CS302

DLD

Vu003

02

CS304

OOP

Vu001

01

CS402

Theory of Automata

 

Vu004

02

CS403

DBMS

Vu003

01

CS408

HCI

Vu005

02

MGT501

HRM

VU001

03

MGT502

OB

VU002

03

 

Employee

Employee ID

Employee Name

Designation

Department ID

01

Dr Altaf

Professor

1

02

Ayesha Malik

Lecturer

1

03

  Ali hussan

Instructor

2

04

Ayaz Ahmad

Instructor

2

05

Mukhtar Mateen

Lecturer

3

 

Department

Department ID

Department Name

1

Computer Science

2

Management

3

English

 

 

Guidelines / Instructions

 

  • Understand the scenario on the basis of given data only.
  • Write only SQL statements, don’t show any data.

 

“Try to upload the assignment before BONUS day”

 

 

 

 





                                                                                                                           

 

 

 

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 191

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Attachments:

Replies to This Discussion

Please Discuss here about this assignment.Thanks

AOA

if any one have solved this assignment pl upload it

thx

 

Solution of 5th Assignment is given below!
its just idea,

1-CREAT VIEW Employee_view1 AS (SELECT Employee Name, Designation FROM Employee
WHERE Designation = ‘Instructor’)

2-CREAT VIEW Employee_view2 AS (SELECT Employee Name, Designation FROM Employee WHERE Department ID = ‘1’)

3-Update employee_view1 set Designation = ‘Lecturer’ WHERE employee Name = ‘Ali hassan’

IN my Opinion, Before doing part 3  write WITH CHECK OPTION below code of part 1 then write the 3rd sloution

as i did in my assignment

 

aur part 4 ma confusion t wo tariq bhai ne likha he nahi

:(

plzz hlp me in solving ds asimn8

  CS 403  ASSIGNMENT NO = 5

 

1-CREATE VIEW employee_view1

 

AS (SELECT Employee Name,Designation FROM Employee

WHERE  Designation  =  ‘Instructor’);


2- CREATE VIEW employee_view2

 

AS (SELECT Employee Name,Designation From employee

WHERE  Department ID = ‘1’);

 

 

3-UPDATE Employee_view1

 

Set Designation = ‘Lecturer

WHERE Employee Name = ‘ALI’;

 

 

4-CREATE VIEW employee_view3

 

AS(SELECT Student ID,Course Name FROM student

WHERE  student ID=VU001);

Attachments:
Please if yOu have

 

dear app ny

Student ID and Course Name ko Student table sy call kiya hai think this is worng because Student table main tu Course name attribute hai hi nai.

CREATE VIEW Course_view4 AS (SELECT Student ID, Couse Name FROM Course WHERE Course Name = ‘Vu001')

 

RSS

Latest Activity

+ Iuuoɔǝut+ replied to +¢αяєℓєѕѕ gιяℓ's discussion Boys Be Like xD
8 minutes ago
+ ! ❤SΕNSΙТΙVΕ(∂ΕSΕЯТ ΡЯΙNCΕSS)❤ replied to + ! ❤INNOCENT❤'s discussion Akhri Salam Smjh kr
11 minutes ago
+ ! ❤SΕNSΙТΙVΕ(∂ΕSΕЯТ ΡЯΙNCΕSS)❤ liked + ! ❤INNOCENT❤'s discussion Akhri Salam Smjh kr
11 minutes ago
+ ! ! ! ! ! !Aaima Ansari ❤️ updated their profile
15 minutes ago
+ Iuuoɔǝut+ replied to +¢αяєℓєѕѕ gιяℓ's discussion Jin sey Mohabbat Ho.....
16 minutes ago
DRAMA QUEEN+ updated their profile
19 minutes ago
+ ! ! RebeL updated their profile
21 minutes ago
+¢αяєℓєѕѕ gιяℓ updated their profile
22 minutes ago
+ ! ! ! !No panga ! ! ! + updated their profile
36 minutes ago
+ Iuuoɔǝut+ liked + Iuuoɔǝut+'s discussion hijar ka tara doob chala hy ......wasi shah
36 minutes ago
++No pAnGa++ updated their profile
42 minutes ago
+"Megha butt" liked +"Certified Gangster"++'s discussion For all female friends
42 minutes ago
+"Megha butt" liked + ! ❤INNOCENT❤'s discussion Akhri Salam Smjh kr
43 minutes ago
DON No.1❤️ updated their profile
56 minutes ago
++No pAnGa++ replied to + ! ❤INNOCENT❤'s discussion Akhri Salam Smjh kr
1 hour ago
+¢αяєℓєѕѕ gιяℓ replied to +¢αяєℓєѕѕ gιяℓ's discussion Boys Be Like xD
1 hour ago
+¢αяєℓєѕѕ gιяℓ replied to +¢αяєℓєѕѕ gιяℓ's discussion Lets Share yOur desktOp wAllpAper.....  (•ิ‿•ิ)
1 hour ago
BIA updated their profile
1 hour ago
+ "AS" liked + Iuuoɔǝut+'s discussion hijar ka tara doob chala hy ......wasi shah
1 hour ago
+ Iuuoɔǝut+ posted a discussion
1 hour ago

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service