1-Write the relational algebra expressions for the following (using Ã):branch (branch_name, branch city, assets)customer (customer_name, customer street, customer city)loan (loan number, branch_name, amount)borrower (customer name, loan number)account (account_number, branch name, balance)depositor (customer_name, account number)a) Find the names of all customers who have a loan and an account at bank. b) Find all customers who have an account from at least the Downtown and the Uptown branches. 2- University schemaClassroom (building, room number, capacity)Department (dept name, building, budget)Course (course id, title, dept_name, credits)Instructor (ID, name, dept_name, salary)Section (course id, sec id, semester, year, building, room number, time slot id)Teaches (ID, course id, sec id, semester, year)Student (ID, name, dept_name, tot cred)Takes (ID, course id, sec id, semester, year, grade)Advisor (student ID, instructor ID)Time slot (time slot id, day, start time, end time)Prereq (course id, prereq id)Write the following queries in SQL, using the university schemaa) Find the names of all students who have taken at least one Comp. Sci. course; make sure there are no duplicate names in the resultb) Increase the salary of each instructor in the IT department by 15%. c) Insert every student whose tot cred attribute is greater than 75 as an instructor in the same department, with a salary of $15,000. 3- Refer to the university schema used in Q.2 and write the following queries using Nested subqueries.a) Find the average instructors salaries of those departments where the average salary is greater than $50,000. (Hint: use subqueries in the From Clause)b) Delete all courses that have never been offered (that is, do not occur) in the section relation. 4- Deleting a record can be costly to an organization if not done in the right way. Let us assume you are working as a DBA (database administrator) and you used the delete command without specifying a condition in the where clause. What do you think will happen to the record in the database? And in case a record was deleted, is there a way to recover the lost data? Answer should be in your own words.
Relational algebra expressions
Our Service Charter
1. Professional & Expert Writers: Topnotch Essay only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.
2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.
3. Plagiarism-Free Papers: All papers provided byTopnotch Essay are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.
4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Topnotch Essay is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.
5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.
6. 24/7 Customer Support: At Topnotch Essay, we have put in place a team of experts who answer to all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.
Topnotchessay.org ©2022 All rights reserved. Terms of use | Privacy Policy
Recent Comments