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