Structural patterns
These design patterns are best practices to identify a simple way to realize relationships between entities and their structure in a given situation.
Let's jump on to our selective structural patterns individually to look at their detail.
Adapter pattern
The adapter pattern, as the name suggests, is the pattern for a class that adapts the interface of another considerably complicated or inconsistent class. It's basically just a wrapper class. It wraps the interface of another class to an interface that is simpler, consistent to the software design, and is what the client is expecting.
The following diagram shows the adapter pattern in general and the one used for our example:

It is one of the simplest GoF design patterns with the purpose of simplifying the interface.
In the example scenario, we have an Oracle database hypothetical DB driver class with a complex and inconsistent API interface in contrast to our own application design. Therefore, in order to simplify things and...