Computer Science: An Overview (12th Edition)
12th Edition
ISBN: 9780133760064
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
Chapter 9, Problem 33CRP
Explanation of Solution
Given code:
TEMP1 <- JOIN EMPLOYEE and ASSIGNMENT
where EMPLOYEE.EmpId =
ASSIGNMENT.EmpId
TEMP2 <- SELECT from TEMP1 where
TermDate = '*'
RESULT <- PROJECT name, StartDate
from TEMP2
Code Explanation:
- The given code is used to lists the “name” and “StartDate” from relations “EMPLOYEE” and “ASSIGNMENT” where the value of “EmpId” is equal in both relations and the value of “TermDate” is “*”.
- From the given code, the statement “TEMP1 <- JOIN EMPLOYEE and ASSIGNMENT where EMPLOYEE.EmpId = ASSIGNMENT...
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Problem 8-10 use the same database.
Let a database application have the following entities
Sales = (Customers, Salesperson, Retail Order, Items),
which contains the information that a salesperson sells multiple items (tables, computers,...) to customers. There are many
customers. There are many salesmen. There are many items. For example, John sells to Joe, Smith sells to Jane,
The "Salesperson" will sale many times.
The "Customer" can come back and buy items many times
The "Retail Order" specifies which Salesperson sell to which customer.
In each "Retail_Order", many items (tables, computers,...) can be sold
Hint: This is very similar to one of your homework
What is the relationship between Retail_Order and Items?
One-to-many relationship
None of the above
One-to-one relationship
Many-to-many relationship
Problem:
design a er diagram for a database to keep track of building inspections required by a department of Damaged Buildings (DB). DB building inspections are requested by builders every month. Each building inspection is either passed or not. Inspections have a type code (3 characters, e.g. PLU, FRM, ELE, etc.) and possibly sequencing requirements. Some inspections cannot be performed before other inspections, e.g. final plumbing inspection cannot be performed until the framing inspection is passed. Each inspection has a numeric score, with 75 or more out of 100 being sufficient for a pass status. Each inspection data contains the date of inspection, inspector identification, inspection score, and textual information about the inspection. The textual information can be updated later, but the score can never be changed. FODB maintains a pool of inspectors. Each inspector has a unique 5 digit employee ID, name, and date they were hired. They can conduct any type of inspection but…
"6.1,6.2 & 6.1 are answered"
The given problem has an entity relationship diagram where the requirement is to implement the diagram in the database , insert records in the tables and then perform the sql script execution to return the result of mentioned statements.
**As per Bartleby guidelines, solving the first 3 sub-parts as the question contains many parts and the required parts to be answered is not mentioned.
It will involve the below steps:
Converting ERD to relational schema
The database will need to create below tables:
**Primary key is bold and underlined, Foreign key is italic
Patient(Pat_ID, Pat_Name, Pat_Age, Pat_Gender)
Doctor(Doc_ID, DOc_Name, Doc_EmployDate, Prc_ID)
Consultation(Doc_ID, Pat_ID, Con_Date)
Practice(Prc_ID, Prc_Name, Prc_YearEstablished, Prc_Province)
6.1 Create tables in SQL
Below is the script to create the tables with attributes and foreign key constraints:
//Script will create the database named TrueHealth and then populate the…
Chapter 9 Solutions
Computer Science: An Overview (12th Edition)
Ch. 9.1 - Identify two departments in a manufacturing plant...Ch. 9.1 - Prob. 2QECh. 9.1 - Summarize the roles of the application software...Ch. 9.2 - Prob. 1QECh. 9.2 - Prob. 2QECh. 9.2 - Prob. 4QECh. 9.2 - Prob. 5QECh. 9.2 - Prob. 6QECh. 9.3 - Prob. 1QECh. 9.3 - What is a persistent object?
Ch. 9.3 - Identify some classes as well as some of their...Ch. 9.3 - Prob. 4QECh. 9.4 - Prob. 1QECh. 9.4 - Prob. 2QECh. 9.4 - Prob. 3QECh. 9.4 - Prob. 4QECh. 9.4 - Prob. 5QECh. 9.4 - Prob. 6QECh. 9.5 - Prob. 1QECh. 9.5 - Prob. 2QECh. 9.5 - Prob. 3QECh. 9.5 - Prob. 4QECh. 9.5 - Prob. 5QECh. 9.5 - Prob. 6QECh. 9.5 - Prob. 7QECh. 9.6 - Prob. 1QECh. 9.6 - Give an additional example of a pattern that might...Ch. 9.6 - Prob. 3QECh. 9.6 - How does data mining differ from traditional...Ch. 9.7 - Prob. 1QECh. 9.7 - Prob. 2QECh. 9.7 - Prob. 3QECh. 9.7 - Prob. 4QECh. 9 - Prob. 1CRPCh. 9 - Prob. 2CRPCh. 9 - Prob. 3CRPCh. 9 - Prob. 4CRPCh. 9 - Prob. 5CRPCh. 9 - Prob. 6CRPCh. 9 - Prob. 7CRPCh. 9 - Prob. 8CRPCh. 9 - Prob. 9CRPCh. 9 - Prob. 10CRPCh. 9 - Prob. 11CRPCh. 9 - Prob. 12CRPCh. 9 - Using the commands SELECT, PROJECT, and JOIN,...Ch. 9 - Answer Problem 13 using SQL. PROBLEM 13 13. Using...Ch. 9 - Prob. 15CRPCh. 9 - Prob. 16CRPCh. 9 - Prob. 17CRPCh. 9 - Prob. 18CRPCh. 9 - Prob. 19CRPCh. 9 - Empl Id Name Address SSN Job Id Job Title Skill...Ch. 9 - Empl Id Name Address SSN Job Id Job Title Skill...Ch. 9 - Prob. 22CRPCh. 9 - Prob. 23CRPCh. 9 - Prob. 24CRPCh. 9 - Prob. 25CRPCh. 9 - Write a sequence of instructions (using the...Ch. 9 - Prob. 27CRPCh. 9 - Prob. 28CRPCh. 9 - Prob. 29CRPCh. 9 - Prob. 30CRPCh. 9 - Prob. 31CRPCh. 9 - Prob. 32CRPCh. 9 - Prob. 33CRPCh. 9 - Prob. 34CRPCh. 9 - Prob. 35CRPCh. 9 - Prob. 36CRPCh. 9 - Prob. 37CRPCh. 9 - Prob. 38CRPCh. 9 - Prob. 39CRPCh. 9 - Prob. 40CRPCh. 9 - Prob. 41CRPCh. 9 - Prob. 42CRPCh. 9 - Prob. 43CRPCh. 9 - Prob. 44CRPCh. 9 - Prob. 45CRPCh. 9 - Prob. 46CRPCh. 9 - Prob. 47CRPCh. 9 - Prob. 48CRPCh. 9 - Prob. 49CRPCh. 9 - Prob. 50CRPCh. 9 - Prob. 51CRPCh. 9 - Prob. 52CRPCh. 9 - Prob. 53CRPCh. 9 - Prob. 54CRPCh. 9 - Prob. 55CRPCh. 9 - Prob. 56CRPCh. 9 - Prob. 57CRPCh. 9 - Prob. 58CRPCh. 9 - Prob. 59CRPCh. 9 - Prob. 60CRPCh. 9 - Prob. 61CRPCh. 9 - Prob. 62CRPCh. 9 - Prob. 1SICh. 9 - Prob. 2SICh. 9 - Prob. 3SICh. 9 - Prob. 4SICh. 9 - Prob. 5SICh. 9 - Prob. 6SICh. 9 - Prob. 7SICh. 9 - Prob. 8SICh. 9 - Prob. 9SICh. 9 - Prob. 10SI
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- 1. Develop a database procedure that takes "student_id" as an input parameter. The procedure should return the GENDER of the student for the given studentId including the output status message and status code for successful completion. 2. Develop a database function that takes category as an input parameter. The function should return how many categories are present.3. Develop a database function that takes eventId as an input parameter. For the given eventId, find out SUM of score for all students for this given eventIdarrow_forwardFUNDAMENTAL DATABASE SUBJECT: Case: A car wash owner wants to monitor the inventory of products and sales of the business. Create a database design in preparation for a system development that would: Store and monitor the supply of products; The number of vehicle washed by a car wash boy. Vehicles can be classified according to its type (motorcycle, van, bus, etc.). The list of vehicles washed by a car wash boy can be monitored. Salary per employee and the vehicles washed can be retrieved. Car wash history per vehicle can be check also. We already Identified the possible tables, so your task will be: 1. Add data on the tables (assume that this is not normalized yet) 2. reflect on the table and follow the normalization steps base on the rules. 3. normalize its table 4. add all table in one document (lucidchart/google docs), should have relationships and cardinality. 5. make sure that it is in highest normal form, highest will be BCNF (if needed).arrow_forward“Martial Arts R Us” (MARU) needs a database. MARU is a martial arts school with hundreds of students. The database must keep track of all the classes that are offered, who is assigned to teach each class, and which students attend each class. Also, it is important to track the progress of each student as they advance. Students are given a student number when they join the school. The number is stored along with their name, date of birth, and the date they joined the school. All instructors are also students, but clearly not all students are instructors. In addition to the normal student information, for all instructors, the date that they start working as an instructor must be recorded along with their instructor status (compensated or volunteer). An instructor may be assigned to teach any number of classes, but each class has one and only one assigned instructor. Some instructors, especially volunteer instructors, may not be assigned to any class. A class is offered for a…arrow_forward
- For the following database scheme Employee(empNo.fName,IName,address,DOB,sex,position,deptNo) Department(deptNo.deptName,.mgrEmpNo) Project(projNo.projName,deptNo) WorksOn(empNo.projNo.dateWorked.hoursWorked) Write an SQL statement to produce a list of the total hours worked by each employee arranged in order of employee number Iarrow_forward“Martial Arts R Us” (MARU) needs a database. MARU is a martial arts school with hundreds of students. The database must keep track of all the classes that are offered, who is assigned to teach each class, and which students attend each class. Also, it is important to track the progress of each student as they advance. Students are given a student number when they join the school. The number is stored along with their name, date of birth, and the date they joined the school. All instructors are also students, but clearly not all students are instructors. In addition to the normal student information, for all instructors, the date that they start working as an instructor must be recorded along with their instructor status (compensated or volunteer). An instructor may be assigned to teach any number of classes, but each class has one and only one assigned instructor. Some instructors, especially volunteer instructors, may not be assigned to any class. A class is offered for a…arrow_forward. Hogwarts School of witchcraft and wizardry has decided to step into the modern world and has asked you to design its relational database. It has given the following list of basic conditions that are needed for its database. • Professors have a Wizard ID, a name, and their research specialty. Students have an Apprentice ID, a name and a pet. Each student is advised by at most one professor. Every professor can advise at least one or more students. Professors teach Courses which are offered by the school. A course has a course ID, a name and the number of credits. Every course is taught by at most one professor and a professor may teach many courses. There are various houses to which students belong to. A student is a member of exactly one house. Some students are also heads for at most one house. Each house can only be headed by exactly one student. • Houses are identified by their house ID and a name. Students are also enrolled in courses. A student can enroll in many courses in a…arrow_forward
- A database has been designed to display a list of popular movies and also a list of actors acting in these movies. The relationship that would exist between the related tables would be: O many to many one to many O many to one O one to onearrow_forwardALGORITHM QUESTION: Assume that UQU wants to perform the following operations on its retained records of students and staffs: NameLookup (ID): Return the name of the person whose identification is ID, andNumLookup (Name): Return the ID of the person whose name is Name. Let n is the total number of students and staffs at UQU, present a data structure that take O(logn) time and O(n) space to perform each of the above operations, explain your answer.arrow_forwardThe following tables form part of a Library database held in an RDBMS: Book (ISBN, title, edition, year) BookCopy (copyNo, ISBN, available) Borrower (borrowerNo, borrowerName, borrowerAddress) BookLoan (copyNo, dateOut, dateDue, borrowerNo) where: Book contains details of book titles in the library and the ISBN is the key. BookCopy contains details of the individual copies of books in the library and copyNo is the key. ISBN is a foreign key identifying the book title. Borrower contains details of library members who can borrow books and borrowerNo is the key. BookLoan contains details of the book copies that are borrowed by library members and copyNo/dateOut forms the key. borrowerNo is a foreign key identifying the borrower. List all copies of the book title “Lord of the Rings” that are available for borrowing. List the names of borrowers who currently have the book title “Lord of the Rings” on loan. List the names of borrowers with overdue books.arrow_forward
- The following tables form part of a Library database held in an RDBMS: Book (ISBN, title, edition, year) BookCopy (copyNo, ISBN, available) Borrower (borrowerNo, borrowerName, borrowerAddress) BookLoan (copyNo, dateOut, dateDue, borrowerNo) where: Book contains details of book titles in the library and the ISBN is the key. BookCopy contains details of the individual copies of books in the library and copyNo is the key. ISBN is a foreign key identifying the book title. Borrower contains details of library members who can borrow books and borrowerNo is the key. BookLoan contains details of the book copies that are borrowed by library members and copyNo/dateOut forms the key. borrowerNo is a foreign key identifying the borrower. Formulate the following queries in relational algebra and tuple relational calculus: 5.27 List all copies of book titles that are available for borrowing. 5.28 List all copies of the book title “Lord of the Rings” that are available for…arrow_forwardThe following tables form part of a Library database held in an RDBMS: Book (ISBN, title, edition, year) BookCopy (copyNo, ISBN, available) Borrower (borrowerNo, borrowerName, borrowerAddress) BookLoan (copyNo, dateOut, dateDue, borrowerNo) where: Book contains details of book titles in the library and the ISBN is the key. BookCopy contains details of the individual copies of books in the library and copyNo is the key. ISBN is a foreign key identifying the book title. Borrower contains details of library members who can borrow books and borrowerNo is the key. BookLoan contains details of the book copies that are borrowed by library members and copyNo/dateOut forms the key. borrowerNo is a foreign key identifying the borrower. a. List all copies of the book title “Lord of the Rings” that are available for borrowing. b. List the names of borrowers who currently have the book title “Lord of the Rings” on loan. c. List the names of borrowers with overdue books.arrow_forwardThe following tables form part of a Library database held in an RDBMS: Book (ISBN, title, edition, year) BookCopy (copyNo, ISBN, available) Borrower (borrowerNo, borrowerName, borrowerAddress) BookLoan (copyNo, dateOut, dateDue, borrowerNo) where: Book contains details of book titles in the library and the ISBN is the key. BookCopy contains details of the individual copies of books in the library and copyNo is the key. ISBN is a foreign key identifying the book title. Borrower contains details of library members who can borrow books and borrowerNo is the key. BookLoan contains details of the book copies that are borrowed by library members and copyNo/dateOut forms the key. borrowerNo is a foreign key identifying the borrower. Formulate the following queries in relational algebra and tuple relational calculus: a. List all book titles. b. List all borrower details. c.List all book titles published in the year 2012. d. List all copies of book titles that are…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage