0

week 6 tutorial questions solutions

6 0 0
  • week 6 tutorial questions solutions

Tài liệu liên quan

Thông tin tài liệu

Ngày đăng: 25/11/2021, 15:43

lOMoARcPSD|9517029 Week Tutorial Questions Solutions Database Analysis and Design (Swinburne University of Technology) StuDocu is not sponsored or endorsed by any college or university Downloaded by qu? anh v? (queanh010702@gmail.com) lOMoARcPSD|9517029 Tutorial – Discussion Questions for Week LeaderID ProjectId Name TaskId Title Description Cost LEADER Supervises PROJECT LecOffice has Consider the ERD above When converted to a Relational Schema: a How many Foreign Keys will exist in the Task relation? b How many Foreign Keys will exist in the Project relation? TASK One One Consider the Project Relation (after conversion to a relational schema) a What is the name of the Foreign Key in this relation? b Would this foreign key be allowed to have Null values? LeaderId Yes Consider the Task Relation (after conversion to a relational schema) a What is the name of the Foreign Key in this relation? b Would this foreign key be allowed to have Null values? ProjectId No Imagine that you now want to build the database based on the Relational Schema a Which table would you have to create first? Leader, Project or Task? Leader b Which table would you have to create second? Leader, Project or Task? Project Task c Which table would you have to create last? Leader, Project or Task? What is a Parent row in a relational database? A parent row is a row that contains a primary key value that is referenced by foreign key values What is a Child row in a relational database? A child row is a row that contains a foreign key value that is references a primary key value True or False a Leader is a parent of Project b Task is a parent of Project False c Leader is a parent of Task False d Task is a parent of Leader False True When using Oracle in default mode, nominate if the following statements are True or False a A parent row that has no child rows may be deleted without error True b A child row that has a parent row may be deleted without error True c A child row may not be orphaned True d A parent row cannot exist without having child rows False e A parent row that has one or more child rows may be deleted without error False Downloaded by qu? anh v? (queanh010702@gmail.com) lOMoARcPSD|9517029 INF10002 Tutorial Consider the following data in the Person table How many rows are selected by the following Queries? a (Rick's quantities are unknown) b (Rick's quantities are unknown) c (Rick's quantities are unknown) d e SELECT Name FROM person WHERE NOT (QtyA + QtyB) < 10 AND Gender = 'F' ; Two (3,6,) Downloaded by qu? anh v? (queanh010702@gmail.com) lOMoARcPSD|9517029 INF10002 Tutorial f g h i j Downloaded by qu? anh v? (queanh010702@gmail.com) lOMoARcPSD|9517029 INF10002 Tutorial k l m Downloaded by qu? anh v? (queanh010702@gmail.com) lOMoARcPSD|9517029 INF10002 Tutorial Assume that a relational schema and database has been built based on the ERD in Question LEADER(LeaderId, Name) TASK (TaskId, Description, Cost, ProjectId) PK (LeaderId) PK (TaskId) FK (ProjectId) References Project PROJECT(ProjectId, Title, LeaderId) PK (ProjectId) FK (LeaderId) References Leader 10 Write a single SQL statement using INNER JOIN clauses and aliases that displays the project title and leader name for each of the projects in the project table: SELECT FROM INNER JOIN ON P.title, L.name Project P Leader L P.LeaderId =L.LeaderId 11 Write a single SQL statement using INNER JOIN clauses and aliases that displays the task description and cost, project title and leader name for each of the tasks in the task table SELECT FROM INNER JOIN ON INNER JOIN ON T.description, T.cost, P.title, L.name Task T Project P T.ProjectId =P.ProjectId Leader L P.LeaderId =L.LeaderId Downloaded by qu? anh v? (queanh010702@gmail.com) ...lOMoARcPSD|9517029 Tutorial – Discussion Questions for Week LeaderID ProjectId Name TaskId Title Description Cost LEADER Supervises PROJECT... Two (3 ,6, ) Downloaded by qu? anh v? (queanh010702@gmail.com) lOMoARcPSD|9517029 INF10002 Tutorial f g h i j Downloaded by qu? anh v? (queanh010702@gmail.com) lOMoARcPSD|9517029 INF10002 Tutorial. .. without error False Downloaded by qu? anh v? (queanh010702@gmail.com) lOMoARcPSD|9517029 INF10002 Tutorial Consider the following data in the Person table How many rows are selected by the following
- Xem thêm -

Xem thêm: week 6 tutorial questions solutions, week 6 tutorial questions solutions