{"id":23298,"date":"2014-03-27T07:00:06","date_gmt":"2014-03-27T05:00:06","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=23298"},"modified":"2015-01-05T12:52:06","modified_gmt":"2015-01-05T10:52:06","slug":"java-8-friday-java-8-will-revolutionize-database-access","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2014\/03\/java-8-friday-java-8-will-revolutionize-database-access.html","title":{"rendered":"Java 8 Friday: Java 8 Will Revolutionize Database Access"},"content":{"rendered":"<p>At <a href=\"http:\/\/www.datageekery.com\/\">Data Geekery<\/a>, we love Java. And as we\u2019re really into <a href=\"http:\/\/www.jooq.org\">jOOQ\u2019s fluent API and query DSL<\/a>, we\u2019re absolutely thrilled about what Java 8 will bring to our ecosystem. For our <a href=\"http:\/\/blog.jooq.org\/tag\/java-8\/\">Java 8 series<\/a>, we\u2019re honoured to host a very relevant guest post by <a href=\"https:\/\/github.com\/my2iu\">Dr. Ming-Yee Iu<\/a>.<\/p>\n<blockquote>\n<p>Dr. Ming-Yee Iu completed a PhD on Database Queries in Java at <a href=\"http:\/\/www.epfl.ch\">EPFL<\/a>. He has created the open source project <a href=\"http:\/\/www.jinq.org\">Jinq<\/a> to demonstrate some new techniques for supporting database queries in Java.<\/p>\n<\/blockquote>\n<p>Our editorial note:<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\nEver since Erik Meijer has introduced LINQ to the .NET ecosystem, us Java folks have been wondering whether we could have the same. We\u2019ve blogged about this topic before, a couple of times:<\/p>\n<ul>\n<li><a title=\"Does Java 8 Still Need LINQ? Or is it Better than LINQ?\" href=\"http:\/\/blog.jooq.org\/2013\/11\/02\/does-java-8-still-need-linq-or-is-it-better-than-linq\/\">Does Java 8 Still Need LINQ? Or is it Better than LINQ?<\/a><\/li>\n<li><a title=\"LINQ and Java\" href=\"http:\/\/blog.jooq.org\/2013\/07\/01\/linq-and-java\/\">LINQ and Java<\/a><\/li>\n<li><a title=\"Java Streams Preview vs .Net LINQ\" href=\"http:\/\/blog.jooq.org\/2013\/03\/25\/java-streams-preview-vs-net-linq\/\">Java Streams Preview vs .Net LINQ<\/a><\/li>\n<li><a title=\"Will Java add LINQ to EL 3.0 in JSR-341?\" href=\"http:\/\/blog.jooq.org\/2013\/03\/22\/will-java-add-linq-to-el-3-0-in-jsr-341\/\">Will Java add LINQ to EL 3.0 in JSR-341?<\/a><\/li>\n<li><a title=\"When will we have LINQ in Java?\" href=\"http:\/\/blog.jooq.org\/2012\/07\/30\/when-will-we-have-linq-in-java\/\">When will we have LINQ in Java?<\/a><\/li>\n<\/ul>\n<p>While most LINQesque APIs in the Java ecosystem operate as <a href=\"http:\/\/www.jooq.org\">internal domain-specific languages like jOOQ<\/a>, some try to tackle the integration on a bytecode level, like <a href=\"http:\/\/www.h2database.com\/html\/jaqu.html\">JaQu<\/a>.<\/p>\n<p>JINQ formalises runtime bytecode transformations through what Dr. Ming-Yee Iu calls <em>symbolic execution<\/em>. We find this very interesting to a point that we wonder if we should start building a JINQ-to-jOOQ JINQ provider, where the expressive power of the <a title=\"Java 8 ResultSet Streams\" href=\"http:\/\/www.jooq.org\/java-8-and-sql\">Java 8 Streams API could be combined with our great SQL standardisation and transformation features\u2026<\/a>?<\/p>\n<p>Convince yourselves:<\/p>\n<h2>Java 8 Goodie: Java 8 Will Revolutionize Database Access<\/h2>\n<p>Java 8 is finally here! After years of waiting, Java programmers will finally get support for functional programming in Java. Functional programming support helps streamline existing code while providing powerful new capabilities to the Java language. One area that will be disrupted by these new features is how programmers work with databases in Java. Functional programming support opens up exciting new possibilities for simpler yet more powerful database APIs. Java 8 will enable new ways to access databases that are competitive with those of other programming languages such as C#\u2019s LINQ.<\/p>\n<h2>The Functional Way of Working With Data<\/h2>\n<p>Java 8 not only adds functional-support to the Java language, but it extends the Java collection classes with new functional ways of working with data. Traditionally, working with large amounts of data in Java requires a lot of loops and iterators.<\/p>\n<p>For example, suppose you have a collection of <code>Customer<\/code> objects:<\/p>\n<pre class=\" brush:java\">Collection&lt;Customer&gt; customers;<\/pre>\n<p>If you were only interested in the customers from Belgium, you would have to iterate over all the customers and save the ones you wanted.<\/p>\n<pre class=\" brush:java\">Collection&lt;Customer&gt; belgians = new ArrayList&lt;&gt;();\r\nfor (Customer c : customers) {\r\n    if (c.getCountry().equals(\"Belgium\"))\r\n        belgians.add(c);\r\n}<\/pre>\n<p>This takes five lines of code. It is also poorly abstracted. What happens if you have 10 million customers, and you want to speed up the code by filtering it in parallel using two threads? You would have to rewrite everything to use futures and a lot of hairy multi-threaded code.<\/p>\n<p>With Java 8, you can write the same code in one line. With its support for functional programming, Java 8 lets you write a function saying which customers you are interested in (those from Belgium) and then to filter collections using that function. Java 8 has a new Streams API that lets you do this.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\" brush:java\">customers.stream().filter(\r\n    c -&gt; c.getCountry().equals(\"Belgium\")\r\n);<\/pre>\n<p>Not only is the Java 8 version of the code shorter, but the code is easier to understand as well. There is almost no boilerplate. The code calls the method <code>filter()<\/code>, so it\u2019s clear that this code is used for filtering customers. You don\u2019t have to spend your time trying to decipher the code in a loop to understand what it is doing with its data.<\/p>\n<p>And what happens if you want to run the code in parallel? You just have to use a different type of stream.<\/p>\n<pre class=\" brush:java\">customers.parallelStream().filter(\r\n    c -&gt; c.getCountry().equals(\"Belgium\")\r\n);<\/pre>\n<p>What\u2019s even more exciting is that this functional-style of code works with databases as well!<\/p>\n<h2>The Functional Way of Working with Databases<\/h2>\n<p>Traditionally, programmers have needed to use special database query languages to access the data in databases. For example, below is some JDBC code for finding all the customers from Belgium:<\/p>\n<pre class=\" brush:java\">PreparedStatement s = con.prepareStatement(\r\n      \"SELECT * \"\r\n    + \"FROM Customer C \"\r\n    + \"WHERE C.Country = ? \");\r\ns.setString(1, \"Belgium\");\r\nResultSet rs = s.executeQuery();<\/pre>\n<p>Much of the code is in the form a string, which the compiler can\u2019t check for errors and which can lead to security problems due to sloppy coding. There is also a lot of boilerplate code that makes writing database access code quite tedious. Tools such as <a href=\"http:\/\/www.jooq.org\">jOOQ<\/a> solve the problem of error-checking and security by providing a database query language that can be written using special Java libraries. Or you can use tools such as object-relational mappers to hide a lot of boring database code for common access patterns, but if you need to write non-trivial database queries, you will still need to use a special database query language again.<\/p>\n<p>With Java 8, it\u2019s possible to write database queries using the same functional-style used when working with the Streams API. For example, <a href=\"http:\/\/www.jinq.org\">Jinq<\/a> is an open source project that explores how future database APIs can make use of functional programming. Here is a database query written using Jinq:<\/p>\n<pre class=\" brush:java\">customers.where(\r\n    c -&gt; c.getCountry().equals(\"Belgium\")\r\n);<\/pre>\n<p>This code is almost identical to the code using the Streams API. In fact, future versions of Jinq will let you write queries directly using the Streams API. When the code is run, Jinq will <em>automatically translate<\/em> the code into a database query like the JDBC query shown before.<\/p>\n<p>So without having to learn a new database query language, you can write efficient database queries. You can use the same style of code you would use for Java collections. You also don\u2019t need a special Java compiler or virtual machine. All of this code compiles and runs using the normal Java 8 JDK. If there are errors in your code, the compiler will find them and report them to you, just like normal Java code.<\/p>\n<p>Jinq supports queries that can be as complicated as SQL92. Selection, projection, joins, and subqueries are all supported. The algorithm for translating Java code into database queries is also very flexible in what code it will accept and translate. For example, Jinq has no problem translating the code below into a database query, despite its complexity.<\/p>\n<pre class=\" brush:java\">customers\r\n    .where( c -&gt; c.getCountry().equals(\"Belgium\") )\r\n    .where( c -&gt; {\r\n        if (c.getSalary() &lt; 100000)\r\n            return c.getSalary() &lt; c.getDebt();\r\n        else\r\n            return c.getSalary() &lt; 2 * c.getDebt();\r\n        } );<\/pre>\n<p>As you can see, the functional programming support in Java 8 is well-suited for writing database queries. The queries are compact, and complex queries are supported.<\/p>\n<h2>Inner Workings<\/h2>\n<p>But how does this all work? How can a normal Java compiler translate Java code into database queries? Is there something special about Java 8 that makes this possible?<\/p>\n<p>The key to supporting these new functional-style database APIs is a type of bytecode analysis called symbolic execution. Although your code is compiled by a normal Java compiler and run in a normal Java virtual machine, Jinq is able to analyze your compiled Java code when it is run and construct database queries from them. Symbolic execution works best when analyzing small functions, which are common when using the Java 8 Streams API.<\/p>\n<p>The easiest way to understand how this symbolic execution works is with an example. Let\u2019s examine how the following query is converted by Jinq into the SQL query language:<\/p>\n<pre class=\" brush:java\">customers\r\n    .where( c -&gt; c.getCountry().equals(\"Belgium\") )<\/pre>\n<p>Initially, the <code>customers<\/code> variable is a collection that represents this database query<\/p>\n<pre class=\" brush:java\">SELECT *\r\n  FROM Customers C<\/pre>\n<p>Then, the <code>where()<\/code> method is called, and a function is passed to it. In this <code>where()<\/code> method, Jinq opens the <code>.class<\/code> file of the function and gets the compiled bytecode for the function to analyze. In this example, instead of using real bytecode, let\u2019s just use some simple instructions to represent the bytecode of the function:<\/p>\n<ol>\n<li>d = c.getCountry()<\/li>\n<li>e = \u201cBelgium\u201d<\/li>\n<li>e = d.equals(e)<\/li>\n<li>return e<\/li>\n<\/ol>\n<p>Here, we pretend that the function has been compiled by the Java compiler into four instructions. This is what Jinq sees when the <code>where()<\/code> method is called. How can Jinq make sense of this code?<\/p>\n<p>Jinq analyzes the code by executing it. Jinq doesn\u2019t run the code directly though. It runs the code \u2018abstractly\u2019. Instead of using real variables and real values, Jinq uses symbols to represent all values when executing the code. This is why the analysis is called <em>symbolic execution<\/em>.<\/p>\n<p>Jinq executes each instruction and keeps track of all the <em>side-effects<\/em> or all the things that the code changes in the state of the program. Below is a diagram showing all the side-effects that Jinq finds when it executes the four lines of code using symbolic execution.<\/p>\n<p><figure id=\"attachment_23337\" aria-describedby=\"caption-attachment-23337\" style=\"width: 465px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/03\/jinq_blog_jooq.png\"><img decoding=\"async\" class=\"size-full wp-image-23337\" alt=\"Symbolic execution example\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/03\/jinq_blog_jooq.png\" width=\"465\" height=\"669\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/03\/jinq_blog_jooq.png 480w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/03\/jinq_blog_jooq-208x300.png 208w\" sizes=\"(max-width: 465px) 100vw, 465px\" \/><\/a><figcaption id=\"caption-attachment-23337\" class=\"wp-caption-text\">Symbolic execution example<\/figcaption><\/figure><\/p>\n<p>In the diagram, you can see how after the first instruction runs, Jinq finds two side-effects: the variable <code>d<\/code> has changed and the method <code>Customer.getCountry()<\/code> has been called. With symbolic execution, the variable <code>d<\/code> is not given a real value like \u201cUSA\u201d or \u201cDenmark\u201d. It is assigned the symbolic value of <code>c.getCountry()<\/code>.<\/p>\n<p>After all the instructions have been executed symbolically, Jinq prunes the side-effects. Since the variables <code>d<\/code> and <code>e<\/code> are local variables, any changes to them are discarded after the function exits, so those side-effects can be ignored. Jinq also knows that the methods <code>Customer.getCountry()<\/code> and <code>String.equals()<\/code> do not modify any variables or show any output, so those method calls can also be ignored. From this, Jinq can conclude that executing the function produces only one effect: it returns <code>c.getCountry().equals(\"Belgium\")<\/code>.<\/p>\n<p>Once Jinq has understood what the function passed to it in the <code>where()<\/code> method does, it can then merge this knowledge with the database query underlying the <code>customers<\/code> collection to create a new database query.<\/p>\n<p><figure id=\"attachment_23338\" aria-describedby=\"caption-attachment-23338\" style=\"width: 465px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/03\/jinq_blog_jooq2.png\"><img decoding=\"async\" class=\"size-full wp-image-23338\" alt=\"Generating a database query\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/03\/jinq_blog_jooq2.png\" width=\"465\" height=\"344\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/03\/jinq_blog_jooq2.png 480w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/03\/jinq_blog_jooq2-300x222.png 300w\" sizes=\"(max-width: 465px) 100vw, 465px\" \/><\/a><figcaption id=\"caption-attachment-23338\" class=\"wp-caption-text\">Generating a database query<\/figcaption><\/figure><\/p>\n<p>And that\u2019s how Jinq generates database queries from your code. The use of symbolic execution means that this approach is quite robust to the different code patterns outputted by different Java compilers. If Jinq ever encounters code with side-effects that can\u2019t be emulated using a database query, Jinq will leave your code untouched. Since everything is written using normal Java code, Jinq can just run that code directly instead, and your code will produce the expected results.<\/p>\n<p>This simple translation example should have given you an idea of how the query translation works. You should feel confident that these algorithms can correctly generate database queries from your code.<\/p>\n<h2>An Exciting Future<\/h2>\n<p>I hope I have given you a taste for how Java 8 enables new ways of working with databases in Java. The functional programming support in Java 8 allows you write database code in a similar way to writing code for working with Java collections. Hopefully, existing database APIs will soon be extended to support these styles of queries.<\/p>\n<ul>\n<li>To play with a prototype for these new types of queries, you can visit <a href=\"http:\/\/www.jinq.org\" rel=\"nofollow\">http:\/\/www.jinq.org<\/a><\/li>\n<\/ul>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/blog.jooq.org\/2014\/03\/21\/java-8-friday-java-8-will-revolutionize-database-access\/\">Java 8 Friday: Java 8 Will Revolutionize Database Access<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\">JCG partner<\/a> Lukas Eder at the <a href=\"http:\/\/blog.jooq.org\/\">JAVA, SQL, AND JOOQ<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>At Data Geekery, we love Java. And as we\u2019re really into jOOQ\u2019s fluent API and query DSL, we\u2019re absolutely thrilled about what Java 8 will bring to our ecosystem. For our Java 8 series, we\u2019re honoured to host a very relevant guest post by Dr. Ming-Yee Iu. Dr. Ming-Yee Iu completed a PhD on Database &hellip;<\/p>\n","protected":false},"author":68,"featured_media":112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[662,196],"class_list":["post-23298","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-databases","tag-java-8"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Java 8 Friday: Java 8 Will Revolutionize Database Access<\/title>\n<meta name=\"description\" content=\"At Data Geekery, we love Java. And as we\u2019re really into jOOQ\u2019s fluent API and query DSL, we\u2019re absolutely thrilled about what Java 8 will bring to our\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2014\/03\/java-8-friday-java-8-will-revolutionize-database-access.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java 8 Friday: Java 8 Will Revolutionize Database Access\" \/>\n<meta property=\"og:description\" content=\"At Data Geekery, we love Java. And as we\u2019re really into jOOQ\u2019s fluent API and query DSL, we\u2019re absolutely thrilled about what Java 8 will bring to our\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2014\/03\/java-8-friday-java-8-will-revolutionize-database-access.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2014-03-27T05:00:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-01-05T10:52:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Lukas Eder\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@http:\/\/twitter.com\/JavaOOQ\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lukas Eder\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/java-8-friday-java-8-will-revolutionize-database-access.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/java-8-friday-java-8-will-revolutionize-database-access.html\"},\"author\":{\"name\":\"Lukas Eder\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/2e5562e68acc527c00dbe1cc618081b2\"},\"headline\":\"Java 8 Friday: Java 8 Will Revolutionize Database Access\",\"datePublished\":\"2014-03-27T05:00:06+00:00\",\"dateModified\":\"2015-01-05T10:52:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/java-8-friday-java-8-will-revolutionize-database-access.html\"},\"wordCount\":1753,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/java-8-friday-java-8-will-revolutionize-database-access.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"keywords\":[\"Databases\",\"Java 8\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/java-8-friday-java-8-will-revolutionize-database-access.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/java-8-friday-java-8-will-revolutionize-database-access.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/java-8-friday-java-8-will-revolutionize-database-access.html\",\"name\":\"Java 8 Friday: Java 8 Will Revolutionize Database Access\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/java-8-friday-java-8-will-revolutionize-database-access.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/java-8-friday-java-8-will-revolutionize-database-access.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2014-03-27T05:00:06+00:00\",\"dateModified\":\"2015-01-05T10:52:06+00:00\",\"description\":\"At Data Geekery, we love Java. And as we\u2019re really into jOOQ\u2019s fluent API and query DSL, we\u2019re absolutely thrilled about what Java 8 will bring to our\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/java-8-friday-java-8-will-revolutionize-database-access.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/java-8-friday-java-8-will-revolutionize-database-access.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/java-8-friday-java-8-will-revolutionize-database-access.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"java-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/java-8-friday-java-8-will-revolutionize-database-access.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Java 8 Friday: Java 8 Will Revolutionize Database Access\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/2e5562e68acc527c00dbe1cc618081b2\",\"name\":\"Lukas Eder\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0539ed8cbcebfd5df5c2bd3048cf645d90f259da6851a005099b51edfd7a68e1?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0539ed8cbcebfd5df5c2bd3048cf645d90f259da6851a005099b51edfd7a68e1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0539ed8cbcebfd5df5c2bd3048cf645d90f259da6851a005099b51edfd7a68e1?s=96&d=mm&r=g\",\"caption\":\"Lukas Eder\"},\"description\":\"Lukas is a Java and SQL enthusiast developer. He created the Data Geekery GmbH. He is the creator of jOOQ, a comprehensive SQL library for Java, and he is blogging mostly about these three topics: Java, SQL and jOOQ.\",\"sameAs\":[\"http:\\\/\\\/blog.jooq.org\\\/\",\"http:\\\/\\\/www.linkedin.com\\\/profile\\\/view?id=6409824\",\"https:\\\/\\\/x.com\\\/http:\\\/\\\/twitter.com\\\/JavaOOQ\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Lukas-Eder\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java 8 Friday: Java 8 Will Revolutionize Database Access","description":"At Data Geekery, we love Java. And as we\u2019re really into jOOQ\u2019s fluent API and query DSL, we\u2019re absolutely thrilled about what Java 8 will bring to our","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2014\/03\/java-8-friday-java-8-will-revolutionize-database-access.html","og_locale":"en_US","og_type":"article","og_title":"Java 8 Friday: Java 8 Will Revolutionize Database Access","og_description":"At Data Geekery, we love Java. And as we\u2019re really into jOOQ\u2019s fluent API and query DSL, we\u2019re absolutely thrilled about what Java 8 will bring to our","og_url":"https:\/\/www.javacodegeeks.com\/2014\/03\/java-8-friday-java-8-will-revolutionize-database-access.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2014-03-27T05:00:06+00:00","article_modified_time":"2015-01-05T10:52:06+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","type":"image\/jpeg"}],"author":"Lukas Eder","twitter_card":"summary_large_image","twitter_creator":"@http:\/\/twitter.com\/JavaOOQ","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Lukas Eder","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/java-8-friday-java-8-will-revolutionize-database-access.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/java-8-friday-java-8-will-revolutionize-database-access.html"},"author":{"name":"Lukas Eder","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/2e5562e68acc527c00dbe1cc618081b2"},"headline":"Java 8 Friday: Java 8 Will Revolutionize Database Access","datePublished":"2014-03-27T05:00:06+00:00","dateModified":"2015-01-05T10:52:06+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/java-8-friday-java-8-will-revolutionize-database-access.html"},"wordCount":1753,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/java-8-friday-java-8-will-revolutionize-database-access.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","keywords":["Databases","Java 8"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2014\/03\/java-8-friday-java-8-will-revolutionize-database-access.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/java-8-friday-java-8-will-revolutionize-database-access.html","url":"https:\/\/www.javacodegeeks.com\/2014\/03\/java-8-friday-java-8-will-revolutionize-database-access.html","name":"Java 8 Friday: Java 8 Will Revolutionize Database Access","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/java-8-friday-java-8-will-revolutionize-database-access.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/java-8-friday-java-8-will-revolutionize-database-access.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2014-03-27T05:00:06+00:00","dateModified":"2015-01-05T10:52:06+00:00","description":"At Data Geekery, we love Java. And as we\u2019re really into jOOQ\u2019s fluent API and query DSL, we\u2019re absolutely thrilled about what Java 8 will bring to our","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/java-8-friday-java-8-will-revolutionize-database-access.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2014\/03\/java-8-friday-java-8-will-revolutionize-database-access.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/java-8-friday-java-8-will-revolutionize-database-access.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","width":150,"height":150,"caption":"java-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/java-8-friday-java-8-will-revolutionize-database-access.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Java 8 Friday: Java 8 Will Revolutionize Database Access"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/2e5562e68acc527c00dbe1cc618081b2","name":"Lukas Eder","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0539ed8cbcebfd5df5c2bd3048cf645d90f259da6851a005099b51edfd7a68e1?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0539ed8cbcebfd5df5c2bd3048cf645d90f259da6851a005099b51edfd7a68e1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0539ed8cbcebfd5df5c2bd3048cf645d90f259da6851a005099b51edfd7a68e1?s=96&d=mm&r=g","caption":"Lukas Eder"},"description":"Lukas is a Java and SQL enthusiast developer. He created the Data Geekery GmbH. He is the creator of jOOQ, a comprehensive SQL library for Java, and he is blogging mostly about these three topics: Java, SQL and jOOQ.","sameAs":["http:\/\/blog.jooq.org\/","http:\/\/www.linkedin.com\/profile\/view?id=6409824","https:\/\/x.com\/http:\/\/twitter.com\/JavaOOQ"],"url":"https:\/\/www.javacodegeeks.com\/author\/Lukas-Eder"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/23298","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=23298"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/23298\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/112"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=23298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=23298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=23298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}