Question

In: Computer Science

A. Rewrite the query select * from section natural join classroom without using a natural join...

A. Rewrite the query select * from section natural join classroom without using a natural join but instead using an inner join with a using condition.

B. Explain the difference between integrity constraints and authorization constraints.

Solutions

Expert Solution

A.

Without "USING"

SELECT * FROM SECTION
INNER JOIN CLASSROOM
ON(SECTION.BUILDING = CLASSROOM.BUILDING
AND
SECTION.ROOM_NUMBER = SECTION.ROOM_NUMBER);

Explaining: Here we write the code with SQL code in this we code without using we rewrite the code

With "USING"

SELECT * FROM SECTION
INNER JOIN CLASSROOM
USING(BUILDING,ROOM_NUMBER);

Explaining: Here we write the code with SQL code in this we code with using we write the code.

B.

Integrity Constraits:- It is Used to protect the data from being destroyed or damaged inside the database. Basically it is a set of proper Rules which ensure that Data Insertion, Updating, Retriveing and other similar process won't effect the Data Integrity.

Authorization constraints:- It is also known as Auth-Constraint. It basically contain role name element. And you are allowed to use multiple role name element as per the need. This constrait form a requirement for proper authentification and names the roles authorized to access the HTTP methods and the URL patterns declared by the Security Constarits

All The Best


Related Solutions

/*explain */ Select * From Student join enrollment on student.ID = enrollment.Student_ID             join section on...
/*explain */ Select * From Student join enrollment on student.ID = enrollment.Student_ID             join section on section.ID = enrollment.section_ID             join department on major = department.name             join faculty on faculty.id = section.faculty_ID             join address on address.id = student.address_ID             join Course on section.course_Number = course.course_number and section.dept_id = course.dept_ID Where --we want to make sure we have name information for students if we want to reach out to them Student.Name_Last Not Like ('') -- the theater department has...
Rewrite the following SELECT statement. In the rewrite change the join operator style on the Facility...
Rewrite the following SELECT statement. In the rewrite change the join operator style on the Facility table to a Type I nested query. (10 points) SELECT eventplan.planno, eventrequest.eventno, workdate,activity FROM eventrequest, eventplan, Facility WHERE eventplan.workdate BETWEEN '2018-12-01' AND '2018-12-31' AND eventrequest.eventno = eventplan.eventno AND EventRequest.FacNo = Facility.FacNo AND facname = 'Basketball arena'; Rewrite the following SELECT statement. In the rewrite change the join operator style on the Facility and Employee tables to a Type I nested queries. (15 points) SELECT...
Choose all the optional query block in “Select “retrieval query? A. Select B. Where C. From...
Choose all the optional query block in “Select “retrieval query? A. Select B. Where C. From D. Order By A NULL value means A. Value missing B. Value unknown C. More than 1000 D. All the above Delete from DEF; /*DEF is a table/relation*/ What action does this command perform? A. Delete the table B. Delete all the rows from the table C. Deletes a column D. Deletes the top 10 tuples A attribute/column, fName, is of Data Type varchar(100)....
Write a SELECT statement that returns these columns using a JOIN of three tables: order_date from...
Write a SELECT statement that returns these columns using a JOIN of three tables: order_date from the orders table shipped_date from the orders table order_qty from the order_details table title from the items table artist from the items table unit_price from the items table Result table should be in order of order_date in ascending order
1. Write a query to: a. select data from INVOICES table as follows: Invoice date in...
1. Write a query to: a. select data from INVOICES table as follows: Invoice date in MM/DD/YYYY format Invoice Date in DD-Mon-YYYY format Invoice Total rounded to the nearest dollar Note: you can alias columns as you sit fit b. select data from VENDORS table as follows: Vendor Name Concatenate Vendor Name with the string ‘s Address Concatenate Vendor City, Vendor State and Vendor Zip Code (alias this) Your output should look like this (this is just an example of...
QUESTION 34 seqAID is a valid Oracle sequence: select seqAID.nextval from dual; the above query returns...
QUESTION 34 seqAID is a valid Oracle sequence: select seqAID.nextval from dual; the above query returns 1500, what the following query will return? Select seqAID.nextval From dual; A. 1499 B. 1500 C. 1501 D. 1502 QUESTION 35 after running the query in previous Question, what the following query will return? Select seqAID.nextval-1 From dual; A. 1499 B. 1500 C. 1501 D. 1502 QUESTION 36 after running queries in previous two Questions (34 & 35), what the following query will return?...
Select the lightest W10 section. Using Fy=50ksi and Fu= 65ksi to select trial sizes and check...
Select the lightest W10 section. Using Fy=50ksi and Fu= 65ksi to select trial sizes and check for Gross Section Yielding and Tensile Rupture. Assume the member is to have two lines of bolts in each flange. (use ASD method) Pd - dead load = 225 ksi Pl - live load = 150 ksi L - member length = 28 ft Bolt diameter = 7/8 in Select the lightest W12 not W10.
For the following exercises, evaluate the natural logarithmic expression without using a calculator. ln(e−0.225) − 3
For the following exercises, evaluate the natural logarithmic expression without using a calculator.ln(e−0.225) − 3
Create a ‘Student’ table using SQL query. The table must have at least five attributes from...
Create a ‘Student’ table using SQL query. The table must have at least five attributes from your choice with different data types.
Suppose you select a card at random from a standard deck, and then without putting it...
Suppose you select a card at random from a standard deck, and then without putting it back, you select a second card at random from the remaining 51 cards. What is the probability that both cards have the same rank, or both have the same suit, or one is red and one is black?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT