Skip to main content

SQL Set Operators

SQL Set Operators   Traditional Set Operators: Union Compatibility:     Requirement for the traditional set operators.    Strong requirement.                         - Same number of columns.                         - Each corresponding column is compatible.                         - Positional correspondence.     Apply to similar tables by removing columns first. SQL UNION Example:           Example 1: Retrieve basic data about all university people.                     SELECT FacNo AS PerNo, FacFirstName                                      ...

Database Queries

 You will write SELECT statements that retrieve some information from the following populated tables. This assignment uses intercollegiate athletic database and builds on what you have already created during your course work.

Event Plan Table




EventPlan Line

    




Event Request Table


Resource Table



Facility Table

                                                        facno             Facname
                                                        F100              Football stadium
                                                        F101              Basketball arena
                                                        F102              Baseball field
                                                        F103              Recreation room

Location Table

                                                        locno             facno             locname
                                                        L100              F100              Locker room
                                                        L101              F100              Plaza
                                                        L102              F100              Vehicle gate
                                                        L103              F101              Locker room
                                                        L104              F100              Ticket Booth
                                                        L105              F101              Gate
                                                        L106              F100              Pedestrian gate



a. List the event number, event date, status, and estimated cost of events where there is an event plan managed by Mary Manager and the event is held in the basketball arena in the period October 1 to December 31, 2018. Your query must not use the facility number (“F101”) of the basketball arena or the employee number (“E101”) of “Mary Manager” in the WHERE clause. Thus, the WHERE clause should not have conditions involving the facility number or employee number compared to constant values.


Query Formulation + Result Snapshot





















Our Official Website : Web Conquerors (https://www.webconquerors.com/) 

Want to get digital services? Contact US

Want to know about our services? Our Services


Comments

Popular posts from this blog

SQL Set Operators

SQL Set Operators   Traditional Set Operators: Union Compatibility:     Requirement for the traditional set operators.    Strong requirement.                         - Same number of columns.                         - Each corresponding column is compatible.                         - Positional correspondence.     Apply to similar tables by removing columns first. SQL UNION Example:           Example 1: Retrieve basic data about all university people.                     SELECT FacNo AS PerNo, FacFirstName                                      ...
  d. Insert a new row in the Location table related to the Facility row in modification problem (c). The new row should have “Door” for the location name. Query Formulation + Result Snapshot Our Official Website :  Web Conquerors  (https://www.webconquerors.com/)  Want to get digital services?  Contact US Want to know about our services?  Our Services

Correction For ERD

 d. For each consistency error in Figure 1, you should identify the consistency rule violated and suggest possible resolutions of the error. The ERD has generic names to help will concentrate on finding diagram errors rather than focusing on the meaning of the diagram. Answer:                Entity6 is violation of the Primary key rule. As there are 3 attributes from within Entity6 that are marked as primary key. Entity6 also violates the Identifying relationship rule, as there is no foreign key in the Entity6 table to identify the item from Entity7. Since this a weak entity type, the cardinality must be 1:1, which it is not. Entity2 is a violation of the Identifying relationship rule due to it not being a weak entity type when there is an identifying relationship. Our Official Website :  Web Conquerors  (https://www.webconquerors.com/)  Want to get digital services?  Contact US Want to know about our services?  ...