Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

SQL (13 points) in the foloving items, inplenent uerything described in SQl,usin

ID: 3685866 • Letter: S

Question

SQL (13 points) in the foloving items, inplenent uerything described in SQl,using the myeq1 monitor of 3 points) In th ng described in SQl, using the mysql monitor of the mysql DBMS. For how to submit it refer to item 4. below. Consider the database shown below: 1. (75 points) Write appropriate SQL DDL statements for declaring the STUDENT GRADE relational DB schema (shown in Figure 2.1) a. (30 points-5x 6 pts) Specify in SOL the attributes, their data type, the primary keys. b. (15 points 5 x 3 pts) Create the referential integrity constraints (i.e., create the foreign keys and the (15 points-5 x 3 pts) Create the referential integrity constraints (ie, create theforeign keys and the foreign keys -Oprimary keys relationships-we did this for Figure 2.1 on the first days of this semester on the board). b.

Explanation / Answer

Databases are designed, built, and populated with data for a specific purpose and for an intended group of users. Databases help people keep track of things. Firstly, we have to create the database and then the database tables should be populated with values.

Creating tables(normal creation)

Now the question is to populate the relational schema. Right now the table would be empty, no data about students have been entered. The table can be populated by the SQL command insert

STUDENT TABLE:

COURSE TABLE:

SECTION TABLE:

GRADE_REPORT TABLE:

PREREQUISITE TABLE:

NOTE: Please check the spellings and values in the above statements because the uploded picture is small and not clear