1) Given: STUDENT (sid, name, address, age, GPA, salary)
Following SQL statement is correct and will provide student ID of students whose GPA is more than 3.
SELECT SID, avg(age)
FROM STUDENT
WHERE GPA >3.0;
2) an m:n relationship is defined as (using Chen's notation)
TEAM ---2:20---?> PLAYER implies that an occurrence of TEAM is related to exactly 20 occurrences of PLAYER entity
3)Given table SHIP (supplier_ID,Product_ID,quantity)
An error : unique constraint violation occurs when column name does not exist in the table. See example below:
insert into ship values ('S3','P3',200)
*
ERROR at line 1:
ORA-00001: unique constraint (AGGARWAL.SYS_C0014804) violated
4)Given the following relations:
SPOUSE (SPOUSE_ID, SPOUSE_NAME, EMP_NUM)
EMPLOYEE (EMP_NUM, EMP_NAME, EMP_ADD)
EMP_NUM in EMPLOYEE table is a FK in EMPLOYEE table
5)Given the assumption that a VENDOR can supply many products and a PRODUCT can be supplied by many vendors, an ERD would look like
PRODUCT<<---------------------->>VENDOR
6) Given: EMPLOYEE (emp_NUMBER, emp_NAME, address, age, salary)
Following SQL statement syntax is correct and will provide Emp_NUMBER and average age of all employees
SELECT emp_NUMBER, avg(age)
FROM EMPLOYEE
GROUP BY emp_number ;