Question: let me rearrange it. 3) Query: Return faculty names and the names of the departments that they work for. .) What tables and attributes are

 let me rearrange it. 3) Query: Return faculty names and the
names of the departments that they work for. .) What tables and
attributes are needed for the query? Answer: b) Do we need join
let me rearrange it.
operations for the query? If yes, what are the join conditions? Answer:
c) Do we need a select operator for the query? If yes,
what is the select condition? Answer: d) Do we need a project

3) Query: Return faculty names and the names of the departments that they work for. .) What tables and attributes are needed for the query? Answer: b) Do we need join operations for the query? If yes, what are the join conditions? Answer: c) Do we need a select operator for the query? If yes, what is the select condition? Answer: d) Do we need a project operator for the query? If yes, what columns should be specified for the project operator? Answer: e) Based on your answers above, provide the complete query statement. You can write it as a relational algebraic expression or SQL command. Answer: (4) Query: Return the program names and the names of the departments that offer them; you only need to find programs whose Prog Type is 'BS'. a) What tables and attributes are needed for the query? Answer: Do we need join operations for the query? If yes, what are the join conditions? Answer: c) Do we need a select operator for the query? If yes, what is the select condition? Answer: Do we need a project operator for the query? If yes, what columns should be specified for the project operator? Answer: c) Based on your answers above, provide the complete query statement. You can write it as a relational algebraic expression or SQL command. Answer: (2) Query: Find the names and GPAs of all students whose major prog ID is 'P000'. a) What tables and attributes are needed for the query? Answer: b) Do we need join operations for the query? If yes, what are the join conditions? Answer: c) Do we need a select operator for the query? If yes, what is the select condition? Answer: d) Do we need a project operator for the query? If yes, what columns should be specified for the project operator? Answer: e) Based on your answers above, provide the complete query statement. You can write it as a relational algebraic expression or SQL command. Answer: Pay attention to the foreign key constraints and understand their meanings. You can find the schema used in this exercise below: Department (Deptid, DeptName, DeptAddress, Chair); PK: DeptId; EK: Chair refs Faculty. Faculty (FacName, FacSSNo, OfficeAddress, Worksfor); PK: FacSSNO; FK: Worksfor refs Department. Degree Program (Progid, ProgramName, ProgType, Coordinator, UnivReg, CollReq); PK: ProgId; FK: Coordinator refs Faculty. Student (Sid, SSNo, Sname, CurAddress, Major, StuLevel, Gpa); PK: Sid; EK: Major refs Degree Program; UNIQUE: SSNO. DDoffers (DeptId, Progid, Dept Reqrmnt), PK: (DeptId, ProgId); FK: DeptId refs Department, Progid refs Degree Program. 1. Constructing Single-Unit Queries A single-unit query only has a single "select ...from" unit (block). It can be constructed using the following steps: . Find in the database schema the table or tables that contain the information items needed for the query. If more than one table is found, then join operations are needed to combine those tables into one big table. Be careful to use the appropriate foreign-key/primary-key pair to join the tables. . Read the query requirement to check if all the rows of the joined table are needed in the final query result. If not, use a select operator to filter the rows. Read the query requirement to check if all the columns of the joined table are needed in the final result. If not, use a project operator to filter the columns. Pay attention to the foreign key constraints and understand their meanings. You can find the schema used in this exercise below: Department (Deptid, Dept Name, DeptAddress, Chair); PK: DeptId; FK: Chair refs Faculty. Faculty (FacName, FacSSNO, Office Address, Worksfor); PK: FacSSNO; FK: Works for refs Department. Degree Program (Progid, ProgramName, ProgType, Coordinator, UnivReg, CollReq); PK: ProgId; FK: Coordinator refs Faculty Student (Sid, SSNo, Sname, CurAddress, Major, StuLevel, Gpa); PK: Sid; FK: Major refs Degree Program; UNIQUE: SSNO. DDoffers (DeptId, Progid, DeptReqrmnt), PK: (DeptId, ProgId); FK: DeptId refs Department, Progid refs Degree Program. 1. Constructing Single-Unit Queries A single-unit query only has a single "select ...from" unit (block). It can be constructed using the following steps: . Find in the database schema the table or tables that contain the information items needed for the query. . If more than one table is found, then join operations are needed to combine those tables into one big table. Be careful to use the appropriate foreign-key/primary-key pair to join the tables. . Read the query requirement to check if all the rows of the joined table are needed in the final query result. If not, use a select operator to filter the rows. Read the query requirement to check if all the columns of the joined table are needed in the final result. If not, use a project operator to filter the columns. Ouery. Find the records of .11 faults momhare uha (2) Query: Find the names and GPAs of all students whose major prog ID is 'P000'. a) What tables and attributes are needed for the query? Answer: b) Do we need join operations for the query? If yes, what are the join conditions? Answer: c) Do we need a select operator for the query? If yes, what is the select condition? Answer: d) Do we need a project operator for the query? If yes, what columns should be specified for the project operator? Answer: e) Based on your answers above, provide the complete query statement. You can write it as a relational algebraic expression or SQL command. Answer: 3) Query: Return faculty names and the names of the departments that they work for. .) What tables and attributes are needed for the query? Answer: b) Do we need join operations for the query? If yes, what are the join conditions? Answer: c) Do we need a select operator for the query? If yes, what is the select condition? Answer: d) Do we need a project operator for the query? If yes, what columns should be specified for the project operator? Answer: e) Based on your answers above, provide the complete query statement. You can write it as a relational algebraic expression or SQL command. Answer: (4) Query: Return the program names and the names of the departments that offer them; you only need to find programs whose Prog Type is 'BS'. a) What tables and attributes are needed for the query? Answer: Do we need join operations for the query? If yes, what are the join conditions? Answer: c) Do we need a select operator for the query? If yes, what is the select condition? Answer: Do we need a project operator for the query? If yes, what columns should be specified for the project operator? Answer: c) Based on your answers above, provide the complete query statement. You can write it as a relational algebraic expression or SQL command

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!