Question

In: Computer Science

Assuming Database is not providing Referential Integrity Constraints support i-e Primary key, foreign key and Unique...

Assuming Database is not providing Referential Integrity Constraints support i-e Primary key, foreign key and Unique key, your task is to design a database engine with your own built in Referential integrity rules implementation and you need that only one database connection is maintained which an application should access.

Recommend proper design pattern used for the stated problem. Give reasons for selecting that pattern, create complete class diagram for the solution. The class diagram should also show the methods of the class and all the relations a class has with other classes. Also provide complete working code of the example

Solutions

Expert Solution


Related Solutions

5.8. Discuss the entity integrity and referential integrity constraints. Why is each considered important? 5.9. Define...
5.8. Discuss the entity integrity and referential integrity constraints. Why is each considered important? 5.9. Define foreign key. What is this concept used for? 5.10. What is a transaction? How does it differ from an Update operation?
1- How can database systems improve data quality and data integrity? 2- Discuss database constraints: Primary...
1- How can database systems improve data quality and data integrity? 2- Discuss database constraints: Primary key, check, and referential integrity constraints? Give an example for each.
what is super key,  candidate key, and primary key, and foreign key in terms of database? and...
what is super key,  candidate key, and primary key, and foreign key in terms of database? and plz provide some examples, thanks.
QUESTION 1 a. What are referential integrity constraints? Please explain with an example. b. Explain with...
QUESTION 1 a. What are referential integrity constraints? Please explain with an example. b. Explain with an example the GROUP BY/HAVING clause
Create table, create primary and foreign key constraints. Create index on the table to satisfy a...
Create table, create primary and foreign key constraints. Create index on the table to satisfy a query with aggregate functions.
What would you do if you encountered a database that violated referential integrity? How would you...
What would you do if you encountered a database that violated referential integrity? How would you address the problem? When forming your answer be sure to include at least one of the three main types of referential actions (cascade, restrict, set null).
1a) i) Explain the candidate key, primary key and foreign key with suitable examples [6] ii)...
1a) i) Explain the candidate key, primary key and foreign key with suitable examples [6] ii) Draw a suitable ER diagram to show the “IS-A” relationship between subtype and supertype [5] iii) Briefly explain the recursive relationship with a suitable example. [2]
Database Problem description:1. What is the difference between a candidate key and the primary key for...
Database Problem description:1. What is the difference between a candidate key and the primary key for a given relation? What is a superkey? 2. What is a foreign key constraint? Why are such constraints important? What is referential integrity? 3. Answer teach of the following questions. The questions are based on the following relational schema:Emp(eid: integer, ename: string, age: integer, salary: real)Works(eid: integer, did: integer, pct_time: integer)Dept(did: integer, dname: string, budget: real, managerid: integer) (1) Write the SQL statements required...
Identify every possible primary key, candidate key, and foreign key for the following relations. Separate each...
Identify every possible primary key, candidate key, and foreign key for the following relations. Separate each key using a semicolon to avoid confusion. Assumptions: MIScompany has branches located in several states within the United States. A customer can be an individual or organization. driverId is the driving license number, ssno is the social security number and upc is the universal product code. Any equipment is rented and returned at the same branch. A customer can be a manufacturer and vice...
Please create the following tables for a tool rental database with appropriate primary keys & foreign...
Please create the following tables for a tool rental database with appropriate primary keys & foreign keys. Assumptions: 1. Each tool belongs to a category. 2. Each category may have a parent category but the parent category should not have a parent category (so at most two levels). E.g., a Tool A belongs to the electric mower, and electric mowers belong to mowers. Mower has no parent category. 3. Each tool can be rented at different time units. The typical...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT