In: Computer Science
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.
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