05 Dec 1-Write the relational algebra expressions for the following (using Ç):
Posted at 03:38h
in
Assignment
by
v1-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 schema
Classroom (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 schema
a) Find the names of all students who have taken at least one Comp. Sci. course; make sure there are no duplicate names in the result
b) 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.
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteEdu. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
Do you need help with this question?
Get assignment help from WriteEdu.com Paper Writing Website and forget about your problems.
WriteEdu provides custom & cheap essay writing 100% original, plagiarism free essays, assignments & dissertations.
With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Chat with us today! We are always waiting to answer all your questions.
Click here to Place your Order Now