
Consider the following relational schema:
violations(VID BID SNu SNa Zip InD Bor BoI NVI NVD).
(Abbreviations for Violation ID, Building ID, Street Number, Street Name, Zip Code, Inspection Date, Borough, Boro ID, Notice of Violation ID, Notice of Violation Description)
Assume the following functional dependencies hold on violations.
VID → BID SNu SNa Zip InD Bor BoI NVI NVD
BID → SNu SNa Zip Bor BoI
NVI → NVD
NVD → NVI
Bor → BoI
BoI → Bor
SNu SNa Zip → Bor
1.Show a decomposition of violations into normal form. Show each step in your decomposition and the primary key for each table.
2. Find a functional dependency in the original that does not correspond to a key in your normalized scheme.
3. Is it possible that a legal

Trending nowThis is a popular solution!
Step by stepSolved in 6 steps

Correction in question 3
3. Is it possible that a legal
Correction in question 3
3. Is it possible that a legal
- Consider the following database schema and specify the following queries or views in SQL. EMPLOYEE(SSN, name, salary, DNo, SupervisorSSN) DEPARTMENT (DNo, DeptName, MgrSSN) PROJECT(PNo, location, ProjName) WORKON (SSN, PNo, hours) Find the SSN and name of the employee who works on more than two projects. For each project, retrieve the PNo, ProjName, and the number of employees from 'Research' department who work on the project. Create a view called 'DEPT_INFO' that has the department name, the number of employees, and the total salary of the employees of the department.arrow_forwardFor developing our queries, we will be using the following relational schema: Student(SID, name, username, major) Course(cname, description, department, weight) Offering(OID, cname, year, term, duration) Enrolled(SID, OID, grade) A course relation is the generic description of a course which is offered by a department. The offering relation is the specific instance of a course being taught in a given term, and is the entity which will be associated with the student enrollment. Students are enrolled in these offerings and achieve a mark. Express each of following queries in Relational Algebra: | Write a relational algebra query which will list the cname and description of all the courses which are being offering in the Fall 2018 term. 2 Write a relational algebra query which will list the name of all the students who have earned 60% in both 'COSC2P12' and 'COSC2P13'.arrow_forwardUse the following relational schema for this homework: Sailors(sid: integer, sname: string, rating: integer, age: real) Boats(bid: integer, bname: string, color: string) Reserves(sid: integer, bid: integer, day: date) • Reserves ®: 100,000 tuples stored in 1,000 pages. There are 100 boats. Each boat is equally poplar (i.e., each has the same number of reservations). • Sailors (S): Stored in 500 pages. There are 10 distinct rating levels (1 to 10), each with the same number of sailors. 1. The sid column takes up 20% of the data size of the Reserves relation. The sid and sname columns take up 70% of the data size of the Sailor relation. a. If you are given 3 memory pages, describe an efficient execution plan for the execution tree in the right. b. Estimate the processing time (I/O cost) of your computation stratgegy. You do not have to include the cost of writing the query result in your analysis. 2. If you have 4 memory pages, explain a better computation strategy to take advantage of…arrow_forward
- Map the following ERD to the Relational Model. EmpID and OrderID are unique identifiers. An employee may have more than one certificate. CertExpirationDate is the date on which a specific certificate expires. - EMPLOYEE ORDER EmpID: UID Name Address Certificates OrderlD: UID OrderDate hạr ShipDate is married t CertExpirationDate is handled by is married toarrow_forwardQ1: Consider the following relations for a Guest Room reservation application database. Room (room_id, room_ availability, booking date. Cust id. booking details) Customer(Cust id. CNIC, E name. L name, Address, Contact number, MembershipNo.) Assume that each Hotel of a city has different number of rooms where each room can be booked by any customer at any time subject to its availability. If we apply a natural join on the relations Room and Customer in this database, what does the resulting relation schema look like? Explain the result of this operation. Show the Functional Dependencies in this resulting relation. Is it in 2NF? Is it in 3NF? Why or why not? (State assumptions, if you make any.)arrow_forwardConsider the relational schema below: Students(sid: integer, sname: string, major: string) Courses(cid: string, cname: string) Enrollment(sid: integer, cid: string, grade: real) Write a tuple relational calculus expression that satisfies this query? Find the distinct names of all students who major in either "Math" or "Economics" who score less than 60% in either course 91.574 or in course 14.501 (using cid). Submit your answer as one or more LaTeX expression in the answer field below. View keyboard shortcutsarrow_forward
- Consider the employee database of Figure 3.19. Give an expression in SQL foreach of the following queries. Give all managers of “First Bank Corporation” a 10 percent raise.arrow_forwardPlease help with the folllowing: Consider the following declaration of a relation schema CREATE TABLE R ( A int PRIMARY KEY, B int not null, C char (1) ); Then execution of which of the following queries will fail? QI: Insert INTO R (B, C) Values (353, 'B'); Q2: Insert INTO R (A, C) Values (111, ‘A’); Q3: Insert INTO R (A, B) Values (222, 335); Select one: a. Both QI and Q2 b. QI only c. Both QI and Q3 d. Q2 onlyarrow_forwardImplement a new independent entity phone in the Sakila database. Attributes and relationships are shown in the following diagram: The diagram uses Sakila naming conventions. Follow the Sakila conventions for your table and column names: All lower case Underscore separator between root and suffix Foreign keys have the same name as referenced primary key Write CREATE TABLE and ALTER TABLE statements that: Implement the entity as a new phone table. Implement the has relationships as foreign keys in the Sakila customer, staff, and store tables. Remove the existing phone column from the Sakila address table. Step 2 requires adding a foreign key constraint to an existing table. Ex: ALTER TABLE customer ADD FOREIGN KEY (phone_id) REFERENCES phone(phone_id) ON DELETE SET NULL ON UPDATE CASCADE; Specify data types as follows: phone_id, phone_number, and country_code have data type INT. phone_type has date type VARCHAR(12) and contains strings like 'Home', 'Mobile', and 'Other'. Apply…arrow_forward
- I am having problems finding the answers to this assignment ( Lab 5:2 StayWell Student Accommodation). Please explain how to solve (tasks 5-8) and the sql code needed to get the desired results. Task 5 - Repeat task four, but this time use the EXISTS operator in your query. Task 6 - List the property IDs of any pair of properties that have the same number of bedrooms. For example, one pair would be ID 2 and property ID 6, because they both have 4 bedrooms. The first property ID listed should be the major sort key and the second property ID should be the minor sort key. Task 7 - List the sq footage, owner number, owner last name and owner first name for each property managed by the StayWell-Columbia City Office. Task 8 - Repeat task 7, but this time include only those properties with three bedrooms.arrow_forwardConsider the employee database of Figure 2.17. Give an expression in the relational algebra to express each of the following queries: a. Find the ID and name of each employee who works for “BigBank”. b. Find the ID, name, and city of residence of each employee who works for “BigBank”. c. Find the ID, name, street address, and city of residence of each employee who works for “BigBank” and earns more than $10000. d. Find the ID and name of each employee in this database who lives in the same city as the company for which she or he works.arrow_forwardSQL thank you Given the following relational database schema: Student = (SSN, Name, Major) Course = ( CourseNumber, Quarter, CourseTitle, NumberOfUnits, RoomNumber, DayTime), where DayTime is of the form MW 1:0-2:00. Enrollment = (SSN,CourseNumber, Quarter, Grade)// Grade is Letter grade or none(Null). Express the following queries using SQL statements with a minimum number of operations and tables. List the SSN and Name of every student who has completed the smallest number of courses(with letter grades). Note that It is possible this smallest number is zero. List the SSN of every student who only have B in every course they completed ,i.e. every grade is either Null or B List the SSN of every student who only have B and no NULL value in every course they enrolled in. List the SSN of every student who did not earn the grade B in any coursearrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY





