SQL
SQL stands for structured query language. SQL is used basically to manage the data of the
Explanation of Solution
b. List of employees from personnel department who have worked or are working:
NEW1 <- JOIN EMPLOYEE and ASSIGNMENT where EMPLOYEE.EmplId = ASSIGNMENT.EmplId
NEW2 <- JOIN NEW1 and JOB where ASSIGNMENT.JobId = JOB.JobId
NEW3 <- SELECT from NEW2 where JOB.Dept = “Personnel”
NEW4 <- PROJECT EMPLOYEE.Name, EMPLOYEE.Address from NEW3
Explanation:
- The relation “NEW1” contains all the records from the relation “EMPLOYEE” and “ASSIGNMENT” which satisfy the indicated condition...
Explanation of Solution
c. List of employees from personnel department:
NEW1 <- JOIN EMPLOYEE and ASSIGNMENT where EMPLOYEE.EmplId = ASSIGNMENT.EmplId
NEW2 <- JOIN NEW1 and JOB where ASSIGNMENT.JobId = JOB.JobId
NEW3 <- SELECT from NEW2 where JOB.Dept = “Personnel” and ASSIGNMENT.TermDate = “*”
NEW4 <- PROJECT EMPLOYEE.Name, EMPLOYEE.Address from NEW3
Explanation:
- The relation “NEW1” contains all the records from the relation “EMPLOYEE” and “ASSIGNMENT” which satisfy the indicated condition...
Want to see the full answer?
Check out a sample textbook solutionChapter 9 Solutions
Computer Science: An Overview (12th Edition)
- a. Display the employees where the salary is 2200-Upload Screen shot b. Display the employees where the salary is above 2000- Upload Screen shot c. Display the employees where the salary is greater than 2000 and the age is less than 25- Upload Screen shot d. Display only the Top 3 records from the employee table - Upload Screen shot e. Delete the employee whose ID is 2 - Upload Screen shot f. Display again only the Top 3 records from the employee table - Upload Screen shotarrow_forwardAnswer the given question with a proper explanation and step-by-step solution. c. Create a relastionship: You need to add a new column called DeptID in the Employee table, it will be the foreign key in this table, it should be text data type and 5 characters in length. Make sure you enter one of the corresponding departmentID's values (i.e., ECON, MIS, and BUS) for this column in the Employee table for this newly created DeptId column that you have entered in the Department table previously. Then, use the Relationships tool under Database Tools to create a relationship between the Department Table and the Employee table, i.e., connecting the two tables together via the primary key (DepartmentID in Department Table) and foreign key pair (DeptID in the Employee Table and choose Enforce Referential Integrity to set the integrity contraint between the foreign key and primary keyarrow_forwardin the same lab I am having the proble with Task 3: For every service request for janitorial work, list the property ID, management office number, address, estimated hours, spent hours, owner number, and owner’s last name.arrow_forward
- Table: Team Member Primary key: Team MemberID Team MemberID 1 2 3 Team MemberName Joe Bloggs Samantha Smith Pete Ngwenya Table: Task Primary key: TaskID Foreign key: Team MemberID TaskID 1 2 3 Description Build login screen Implement inventory management Add logo to splahs 1 screen TeamMemberEmail joe@theoffice.com sam@theoffice.com pete@theoffice.com Duration StartDate Team MemberID 2022-05-06 1 2022-05-15 1 4 10 2022-05-06 2arrow_forwardThe following are the basic processes of Boarding School Outing System. Student may enter the outing request such as date, reason, check-out time (check-in time is auto-set at 6.00 PM) to request for outing. The outing request details are stored in 'Outing Request' record. Warden can view the outing request and he/she may approve or disapprove the request. The status of the request is updated in the Outing Request' record. Once the status is updated, a short message service (SMS) notification will be sent by the system to the student and parents. The hand-phone numbers are retrieved from the Student' record. Student will check-out and check-in via this system whenever he/she is about to leave from the school and reports back to the school. The data (date and time) is kept in the existing outing record. Note: **Definition of outing (in boarding school context): A day out from the hostel/school, normally during the weekend. Based on the scenario above: a) Draw a Context Diagram for…arrow_forwardThe StayWell maintenance team wants to minimize the number of planned visits to properties. The team wants to learn all the properties that have different planned service dates. You need to return all available data in the SERVICE_REQUEST table, where requests are made for the same property with a different NEXT_SERVICE_DATE. Return a list of all properties where service requests are made with different NEXT_SERVICE_DATE values.arrow_forward
- 2. Code three calls to the procedure created in exercise 1: (a) passed by position with @VendorVar='M%' and no balance range (b) passed by name with @VendorVar omitted and a balance range from $200 to $1000 (c) passed by position with a balance due that’s less than $200 filtering for vendors whose names begin with C or Farrow_forwardThe file ClassificationData.xlsx (Screenshot attached below) contains the following information about the top 25 MBA programs: percentage of applicants accepted, percentage of accepted applicants who enroll, mean GMAT score of enrollees, mean undergraduate GPA of enrollees, annual cost of school (for state schools, this is the cost for out-of-state students), percentage of students who are minorities, percentage of students who are non-U.S. residents, and mean starting salary of graduates (in thousands of dollars).Use these data to divide the top 25 schools into 4 clusters, usingfor example the K-Means clustering algorithm, and interpret your clusters. The method is explained in our textbook: Section 8.8 in the Fourth and Fifth Edition or Section 14.3 in the Sixth Edition. More precisely, use Evolutionary Solver to find 4 schools to be used as cluster centers and to assign all other schools to one of these cluster centers. Each school is then assigned to the nearest cluster center,…arrow_forwardTask 4- Normalisation I. Which normal form is the following table in? II. Transfer the table to 3rd Normalised form and show the conversion to the third form. In each normal form, show the tables, Primary Keys and Foreign keys. II. AgreementID Duration(months) |UnitID UnitAddres NoOfRooms Building!D BuildingName BuildingAddress Signingdate 2 BO01 2 BO02 2 BO02 1 BO04 2 BO03 AGO01 AGO02 AGO03 12 U001 6 U002 12 U002 6 U003 Marsfiled Chatswood Chatswood Burwood Marsfiled White Palace Ryde Martin Place 20/04/2021 13/05/2019 13/02/2020 20/04/2021 13/07/2018 12/02/2021 Parramatta Martin Place Parramatta AGO02 AGO01 Saunders Close Wagga Wagga Twin Tower Wollongong Saunders Close Wagga Wagga 12 U001 AGO04 18 U003 Burwood 1 BO04arrow_forward
- Use the sample output below as a reference to compile a list of every purchase made by customers. The following criteria should be used to sort the results: code, invoice number and product description for each client All three INVOICE, LINE, and PRODUCT groups must be linked together to complete the integration.arrow_forwardA.Write a SELECT statement to list each city and zip code in New York or Connecticut. Sort the result in ascending order by zip code. B.Write a SELECT statement to determine how many courses do not have prerequisite.arrow_forwardPlease I want the EER or E-R Digram for this question: A patient is identified by patient id, and admission date. • A patient must be either an Emergency patient or a resident patient. • We must record the checkback date for Emergency patient. • Only resident patient is assigned to one room. Room has a unique number, degree, and floor number. • For each room there are a number of beds each of which has a bed number, specification. If a room is deleted, you need not keep track of its beds any longer. • Both emergency patient and resident are cared for by a responsible Doctor. Doctor is identified by Doctor number. For each Doctor, the name, several specialty, and years of experience must be recorded. • Doctors prescribe medicine for patients. Medicine is identified by trade name that has scientific name and formula. The medicine depends on another medicine to be taking before. • A doctor could prescribe one or more drugs for several patients, and a patient could obtain prescriptions…arrow_forward
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage