Question

In: Computer Science

Design and UI Patterns Object models and relational models do not always work very well together....

Design and UI Patterns

Object models and relational models do not always work very well together. Databases represent data in a tabular form, whereas object-oriented languages represent data based on a graph of objects. There are a few common mismatch problems that can exist with association, aggregation, inheritance, and composition, and data navigation.

  • Given these potential problems, how you would use object-relational mapping to address at least two of these problems?

Solutions

Expert Solution

The Object-Relational Mapping (ORM) is the solution to handle all the above impedance mismatches.

What is ORM?

ORM stands for Object-Relational Mapping (ORM) is a programming technique for converting data between relational databases and object oriented programming languages such as Java, C#, etc.

An ORM system has the following advantages over plain JDBC −

Sr.No. Advantages
1 Let’s business code access objects rather than DB tables.
2 Hides details of SQL queries from OO logic.
3 Based on JDBC 'under the hood.'
4 No need to deal with the database implementation.
5 Entities based on business concepts rather than database structure.
6 Transaction management and automatic key generation.
7 Fast development of application.

An ORM solution consists of the following four entities −

Sr.No. Solutions
1 An API to perform basic CRUD operations on objects of persistent classes.
2 A language or API to specify queries that refer to classes and properties of classes.
3 A configurable facility for specifying mapping metadata.
4 A technique to interact with transactional objects to perform dirty checking, lazy association fetching, and other optimization functions.

Related Solutions

What are design patterns in object oriented programming? Minimum 200 words
What are design patterns in object oriented programming? Minimum 200 words
Q: How do you design object oriented design models using: a. Phillip Kruchten (4+1) View b....
Q: How do you design object oriented design models using: a. Phillip Kruchten (4+1) View b. Model Driven Development (MDD) c. Remote Procedure Call (RPC) Assume scenarios or examples to elaborate each of the above.
Object-Oriented Design and Patterns in Java (the 3rd Edition Chapter 5) - Create a directory named...
Object-Oriented Design and Patterns in Java (the 3rd Edition Chapter 5) - Create a directory named as the question number and save the required solutions in the directory. - Each problem comes with an expected tester name. In the directory for a given problem, including the tester and all java classes successfully run this tester. Exercise 5.2 ObserverTester.java - Improve Exercise 1 by making the graph view editable. Attach a mouse listener to the panel that paints the graph. When...
For this assignment you will design a set of classes that work together to simulate a...
For this assignment you will design a set of classes that work together to simulate a police officer issuing a parking ticket. You should design the following classes: - The ParkedCar Class: This class should simulate a parked car. The class's responsibilities are as follows: - To know the car's make, model, color, license number, and the number of minutes that the car has been parked. - The ParkingMeter Class: This class should simulate a parking meter. The class's only...
Parking Ticket simulator For this assignment you will design a set of classes that work together...
Parking Ticket simulator For this assignment you will design a set of classes that work together to simulate a police officer issuing a parking ticket. You should design the following classes: • The ParkedCar Class: This class should simulate a parked car. The class’s responsibili-ties are as follows: – To know the car’s make, model, color, license number, and the number of minutes that the car has been parked. • The ParkingMeter Class: This class should simulate a parking meter....
Design a set of classes that work together to simulate a police officer issuing a parking...
Design a set of classes that work together to simulate a police officer issuing a parking ticket. You should design the following classes: The ParkedCar Class: this class should simulate a parked car. The classes' responsibilities are as the following: -to know the make, the model, license number and the number of minutes that the car has been parked. The parkingMeter Class: this class should simulate a parking meter. The class's only responsibility is as follows: -to know the number...
parking Ticket simulator For this assignment you will design a set of classes that work together...
parking Ticket simulator For this assignment you will design a set of classes that work together to simulate a police officer issuing a parking ticket. You should design the following classes: • The ParkedCar Class: This class should simulate a parked car. The class’s responsibili-ties are as follows: – To know the car’s make, model, color, license number, and the number of minutes that the car has been parked. • The ParkingMeter Class: This class should simulate a parking meter....
how do the different facilities in health care work together?
how do the different facilities in health care work together?
Why will a design for a Graeco-Latin square of size 3 not work well?
Why will a design for a Graeco-Latin square of size 3 not work well?
Is it possible to do work on an object without changing the kinetic energy of the...
Is it possible to do work on an object without changing the kinetic energy of the object?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT