JDBC is core part of java platform and is an API specification developed by Sun Microsystems. Nearly all relational DBMSs (Database Management Systems) support SQL, and JAVA itself runs on most platforms, JDBC makes it possible to write a single database application that can run on different platforms and interact with different DBMSs.
“JDBC is similar to ODBC, but specifically designed for JAVA while ODBC is language independent.”
The JDBC driver manager is a traditional backbone of the JDBC architecture, which specifies objects for connecting Java applications to a JDBC driver. The JDBC Test Suite helps to ensure that the JDBC drivers will run the program. The JDBC-ODBC Bridge software offers JDBC access via the open database connectivity drivers.
The JDBC architecture supports two-tier and three-tier processing models for accessing a database.
Two-tier Model (Client/Server)
A Java applet or application communicates directly to the data source. The JDBC driver enables communication between the application and the data source. When a user sends a query to the data source, the answers for those queries are sent back to the user in the form of results. The data source may be located on single machine or different machine on a network to which a user is connected. This is known as a client/server configuration, where the user’s machine acts as a client and the machine having the data source running acts as the server. The network connection can be intranet or Internet.
In this model having one more layer as middle tier where the user’s commands or queries are sent to middle-tier services, from which the commands are again sent to the data source. The results are sent back to the middle tier, and from there to the user. This type of model is found very useful to makes simple to maintain access control and make updates to corporate data in database. Application deployment also becomes easy and provides performance benefits. The middle tier is usually written in C or C++.
In this topic, you learn about the different type of Architecture Model for application development with different technologies. In Java, JDBC supports the all type of Architecture model.
YAML(Ain’tMarkup Language) is a human friendly , cross language, unicode based data serialization format designed for interaction with all programming languages.
FileName Extension : .yml or .yaml
Latest Release : 1.2
It is broadly use for programming:
Object Persistence to data auditing
Also support for Unicode standards characters.
YAML allow data to show itself in a natural and meaningful way and provide a unique cleanness by minimizing the amount of structural characters. For example: indentation may be used for structure, colons use to separate “mapping key: value” pairs, and dashes are used to create “bullet” lists for showing collections of data.
YAML is a superset of JSON : you can convert YAML to JSON by different API’s
Below are main design goals for YAML :
YAML is easily readable and understandable by humans.
YAML is expressive and extensible.
YAML is easy to implement and use.
YAML matches the native data structures of agile languages.
YAML data is portable between programming languages.
YAML has a consistent model to support generic tools.
YAML supports one-pass processing.
YAML Documents Processing
A YAML document is parsed only when the iterator is invoked (lazy evaluation).
To know more about YAML Syntax, Configuration with Java and other supporting language, frameworks and tools, Sample configuration files and JSON and YAML conversion follow below YAML Tutorials and YAML related exceptions follow YAML Issues.
Marker interface is main frequently asked question to JAVA interview. Generally interviewer asked this question to check internal knowledge of JAVA developer some times ask on architect level also because it’s follow the Marker Interface Design pattern. Here I have covered everything to crack questions related to Marker Interface.
What is a Marker Interface?
Marker Interfaces are empty interface it does not contains any properties and behaviors to implement. It’s also called as marker or the tag interface.
Why Marker Interface and Who Implement it?
Marker interface functionality is predefined implicitly in JVM. When a class implement a marker interface then class is not expected to implement anything to adhere to the contract defined by the interface. In contract it is a tag to indicate the JVM regarding an expected functionality to perform implicitly.
For Example :
java.io.Serializable : If class implements the Serializable interface then JVM perform some special operation on it and writes the state of the object into object stream then this object stream will available to read by another JVM.