Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please help me solve this for practice purposes for a Data Management course: ba

ID: 3835392 • Letter: P

Question

Please help me solve this for practice purposes for a Data Management course:

backup facility Be aware that there are extra h horizontal partition y after images of database apply before images of database A rollback e. compone of a DBMs that can produce a saved copy of a database outer join d a database that represents data as a collection of related tables relational database e. data filled from a data warehouse f returns all records of designated table Ag. data warehouse of limited scope h. store different rows of a table at different sites (5 pts) Briefly explain the concept of referential integrity. ive an example of a situation or operation that violates referential integrity

Explanation / Answer

Hi,

Please find below the answers-

It seems that you have already solved answer 1. So I m starting from answer 2.

Ans 2- Referential integrity refer to a constraint where a primary key column of one table is present in another tables and it is referred as Foreign Key. This common column between the 2 tables helps us relate those tables logically and also helps in querying the database. The table which has the primary key is called as parent table and the table in which its primary key is present is called as a Child table.

Example - Employee table

Dept table-

dname

We can see that here deptid is a primary key for the dept table but it acts as a foreign key in the employee table.Hence, if we try to insert a deptno value in employee table, we need to make sure that the deptno value must exist in dept table. If not, it would lead to referential integrity violation. In the above example, the depno=99 is being inserted into employee table which is wrong.

Ans 4- In databases, locking objects is extremely important in order to maintain the data integrity and to avoid data loss. If a certain data object is being modified by one user, there must be a mechanism to prevent other users from modifying that object. This will help us maintain the data consistency of that object.

In flight reservation system, there should be a concurrent access given to a fight seats table to all the users. The users can access the flight booking table at the same time so they have a concurrent access to it. Now, in order to save the changes which one user has done to that table, there must be a locking mechanism in place. If a user A is booking a flight in the plane, the other user should not have the update access to that table. Once the user A is done with its booking, other user should be able to see that status of seats and can book the seats afterwords.

Ans 8(a) - select c.customerName,ol.NumOrdered*ol.QuotedPrice from
customer c left join order o
on c.customerNum=o.customerNum
join OrderLine ol
on o.ordernum=ol.ordernum

Ans 8(b) select repnum,count(customerName),rp.firstname,rp.lastname from
customer group by repnum having count(customerName)=(select max(cnt) as maxi from(select repnum,count(customerName) cnt from
customer group by repnum)) a join rep rp
on a.repnum=rp.repnum

Empid empname salary deptno 100 Sam 34000 10 101 Clara 56000 20 102 Sandy 90000 99