Question
3. Show the detailed results achieved by a specific student, say sid= ‘S0002’.
A. For each course taken by the given student, show the course ID, title, name, weighting and mark achieved for each assessment.
B. Show the given student’s final result on each of the courses the student has taken.
An Entity-Relationship model of the database is shown below: Assessment Course 1..*aid {PK) cid PK) title cid FK) name weight
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer is as follows :

For given scenario of questions we can use JOINS but it leads to complexity so we use simple as follows :

A)

SELECT C.CID, C.title, A.name, A.weighting, G.mark

FROM

STUDENT S , GRADE G , ASSESSMENT A , COURSE C

WHERE

C.cid = A.cid AND

A.aid = G.aid AND

G.sid = S.sid AND

S.sid = 'S0002' ;

B) The final result is calculated by adding all the marks of course id's.

So we can do as follows :

SELECT C.CID, C.title, A.name, A.weighting, SUM(G.mark) AS final_marks

FROM

STUDENT S , GRADE G , ASSESSMENT A , COURSE C

WHERE

C.cid = A.cid AND

A.aid = G.aid AND

G.sid = S.sid AND

S.sid = 'S0002' ;

if there is any query please ask in comments...

Add a comment
Know the answer?
Add Answer to:
3. Show the detailed results achieved by a specific student, say sid= ‘S0002’. A. For each...
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
  • Consider the following relations for a database that keeps track of student enrollment in courses and the books adopted for each course.

    Question: Consider the following relations for a database that keeps track of student enrollment in courses and the books adopted for each course. 1- Draw an ER diagram of ONLINE COURSE REGISRATION database, that captures all the given below requirements. Specify key attribute(s) of each entity set. For each relationship set, specify structural constraints and participation constraints. a. For each USER, the portal maintains user ID, Name, E-mail. Each user has a unique ID. Name is a Composite attributes with Frame, Midname,...

  • 4. The exams database: The following database contains multiple choice exam questions tables Questions and On...

    4. The exams database: The following database contains multiple choice exam questions tables Questions and On Hons). Each question has a question Tert and each one of the options has and optid, which is an integer representing options A) (optid=1), B) (optid=2), C) (optid=3), etc. as well as the text of the option. The field correct is either Oor 1 and indicates which is the correct option for that particular question. courseThe exams have numbers 1, 2, 3, etc. Each...

  • Please write ONE SQL statement for each of the following tasks using the below tables. Note...

    Please write ONE SQL statement for each of the following tasks using the below tables. Note that you can only use conditions specified in the task description and cannot manually look up data and add conditions. Task 1: return title of textbooks with price over $100. Task 2: return number of courses sections scheduled for each year and semester. Please return year, semester, and number of courses. Task 3: Return names of all courses in Information Systems undergraduate program. Task...

  • Someone please answer all of these. I need these badly. The submission date is knocking at...

    Someone please answer all of these. I need these badly. The submission date is knocking at the door. Experiment 1: SQL data definition and data insertion 46 hours) 1. CREATE TABLE. The database schema consists of the three relations, whose schemas are: S (Spa, Sname. Sgender, Sage, Sdert? // students(SID, name, gender, age, department) SC (Spa, Cne. Grade) //Course(SID, CID, grade) C (One Cname Crno. Ceredit) l/courses (CID, course name, prerequisite courses, credit) 2. DROP TABLE, ALTER TABLE, CREATE INDEX,...

  • Name Use complete sentences if possible The following StudentGrade relation (table) stores the Student, Major, and Course information Each student has unique StudentID. Assume that a student has...

    Name Use complete sentences if possible The following StudentGrade relation (table) stores the Student, Major, and Course information Each student has unique StudentID. Assume that a student has only one major. One student can take multiple courses in one SemesterYear. One course can be taken by many students in each SemesterYear. Given values for StudentID, Course Number, and SemesterYear, one can determine all the rest of values for a record. However only Grade is functionally dependent on StudentlD, CourseNumber and...

  • Suppose a student is taking IS 620 section 1 and HCC 629 section 1 for spring...

    Suppose a student is taking IS 620 section 1 and HCC 629 section 1 for spring 2019. Use an explicit cursor to print out the titles and prices of textbooks for these two courses. Sample code to create the tables: drop table textbook_schedule cascade constraints; drop table textbook_author cascade constraints; drop table schedule cascade constraints; drop table course cascade constraints; drop table textbook cascade constraints; drop table author cascade constraints; drop table teacher cascade constraints; drop table program cascade constraints;...

  • We aim to analyze students’ results in exams. The designer advocated a mixed approach. On the...

    We aim to analyze students’ results in exams. The designer advocated a mixed approach. On the one hand, he relies on the study of the analytical requirements requested by the university and by a committee that examines the results, and on the other hand by examining the data source model described by the relational database of exams. Below is a partial description of this database  STUDENT (STD-NO, FName, LName, Birth-Date, Gender, Housing, Tel, ID-FAC# FACULTY (ID-FAC, Name, Short-Name, Address, MODULE (ID-CORS,...

  • You have been approached by a University for the design and implementation of a relational databa...

    You have been approached by a University for the design and implementation of a relational database system that will provide information on the courses it offers, the academic departments that run the courses, the academic staff and the enrolled students. The system will be used mainly by the students and the academic staff. The requirement collection and analysis phase of the database design process provided the following data requirements for the University Database system. Using the following requirements answer this...

  • Use the SQL statements provided to create your tables. Write one SQL statement for each of...

    Use the SQL statements provided to create your tables. Write one SQL statement for each of the following problems. You can only use the conditions listed in the tasks. E.g., in task 1, you cannot manually look up pid of Information Systems undergraduate program. Here is the given code: drop table textbook_schedule cascade constraints; drop table textbook_author cascade constraints; drop table schedule cascade constraints; drop table course cascade constraints; drop table textbook cascade constraints; drop table author cascade constraints; drop...

  • Would you please help me with this homework ? 1- Explain what requirements this ER diagram...

    Would you please help me with this homework ? 1- Explain what requirements this ER diagram is implementing 2- Draw an ER diagram (relationships) for the following business rules in a company: • A salesperson manages one or many other salespeople while a salesperson is managed by only one salespeople. • A salesperson can be an agent for many customers but a customer is managed by only one salesperson. • A customer can place many orders. But an order can...

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