Question

8 points Updating views Given two tables Students(sid, name, age) and Enrolled(studid, cid, grade) consider the vi ew V defined as follows: (n, s,c) ← Students(s.n.aJA Enrolled(s.c.9JA g = B The view result consists of tuples of the form (name, sid, cid) and suppose (Joe, 8250. 145) is an example tuple in the result. For each of the following update operations on V, describe how they can be translated into operations on Students and/or Enrolled, and any complications involved (a) Insert a new tuple (Mary, 8251, 645) into V (b) Delete tuple t from V

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a)it is impossible to insert new tuple into given veiw because the view is composed of columns form two tables.

if you try to insert values to the given view you can get following error

"Connot modify a colunm which maps to a non key-preaserved data"

b) if you delete a tuple from the view corresponding enrolled table is effected.

rows form the enrolled table are deleted because view is based on the condition grade=b.

so, if a tuple is deleted form view then tuple from the enrolled table is deleted.

Add a comment
Know the answer?
Add Answer to:
8 points Updating views Given two tables Students(sid, name, age) and Enrolled(studid, cid, grade) consider the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT