Question

1. Consider the following ER diagram. Stung StuName Grade SubCode SubName STUDENT has an ENROLMENT > -Fora + SUBJECT a. Conve

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

Dear Student ,

As per the requirement submitted above , kindly find the below solution.

This demonstration is using SQL Server 2014.

Question a:

create table Student(
StuNo varchar(10) primary key,
StuName varchar(50)
);

create table Subject(
SubCode varchar(10) primary key,
SubName varchar(50)
);

create table Enrolment(
StuNo varchar(10),
SubCode varchar(10),
Garde char(1),
primary key(StuNo,SubCode)
);

****************************

Question b:

  • Combination of StuNo and SubCode is primary key in Enrolment table.

******************************

Question c:

insert into student values('STU101','Henry Bloggs');

******************************

Question d:

insert into subject values('INF10004','Database Analysis and Design');

******************************

Question e:

insert into Enrolment (StuNo,SubCode) values ('STU101','INF10004')

***************************

Question f :

update Enrolment set Garde='N' where StuNo='STU101';

****************************

Question g :

update Enrolment set Garde='D' where StuNo='STU101';

************************************

Question h :

  • In the given relational database there is column which can record the semester details.
  • using query in question g record will be updated but Grade N will be replaced by N.

NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.

Add a comment
Know the answer?
Add Answer to:
1. Consider the following ER diagram. Stung StuName Grade SubCode SubName STUDENT has an ENROLMENT >...
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