SQL Zone is brought to you in partnership with:
  • submit to reddit
Moshe Kaplan09/02/14
1182 views
0 replies

MySQL Installation on Ubuntu

It seems that MySQL was created to be installed on RHEL/CentOS/Fedora... but what if you are actually using Ubuntu? Well, this is the purpose of the following tutorial

Lukas Eder09/01/14
973 views
0 replies

PL/SQL Backtraces for Debugging

For many PL/SQL developers, this might be common sense, but for one of our customers, this was an unknown PL/SQL feature: Backtraces.

Alec Noller08/31/14
3170 views
0 replies

The Best of the Week (July 28): SQL Zone

Make sure you didn't miss anything with this list of the Best of the Week in the SQL Zone. This week's best include JPA Hibernate alternatives, the wonderful SQL feature of quantified comparison predicates, sequence values in NuoDB, and more.

Vlad Mihalcea08/29/14
2800 views
0 replies

The Anatomy of Hibernate Dirty Checking

The persistence context enqueues entity state transitions that get translated to database statements upon flushing. For managed entities, Hibernate can auto-detect incoming changes and schedule SQL UPDATES on our behalf. This mechanism is called automatic dirty checking.

Madolyn Sullivan08/28/14
2048 views
0 replies

Sequence Values in NuoDB

Ever wonder why your Sequence numbers in NuoDB are not necessarily assigned in sequential order?

Jonas Gauffin08/26/14
1118 views
0 replies

How to Create a SqlException

Have you tried to create a SqlException only to discover that the constructor is private? Here is how you can create the exception despite that.

Hebert Coelho D...08/25/14
24451 views
5 replies

JPA Hibernate Alternatives: When JPA & Hibernate Aren't Right for Your Project

Today we will talk about situations in which the use of the JPA/Hibernate is not recommended. What problems do JPA/Hibernate present, what are some solutions, and what alternatives do we have outside of the JPA world?

Chris Travers08/25/14
2927 views
0 replies

Math and SQL Part 5: Projection and Selection

The SELECT statement is the workhorse of SQL. Updates and inserts are necessary, but selects are where the power is. One of the issues many people have in understanding these and using them is a clear understanding of the math involved, because there are a large number of implicit possibilities in the syntax.

Alec Noller08/24/14
3342 views
0 replies

The Best of the Week (Aug. 15): SQL Zone

Make sure you didn't miss anything with this list of the Best of the Week in the SQL Zone. This week's best include part of a series on Math & SQL, a tutorial for setting up JPA in a Java SE environment, a pair of PostgreSQL wishlists for Postgres 9.5, and more.

Lukas Eder08/22/14
2254 views
0 replies

A Wonderful SQL Feature: Quantified Comparison Predicates (ANY, ALL)

Have you ever wondered about the use-case behind SQL’s ANY (also: SOME) and ALL keywords? You have probably not yet encountered these keywords in the wild. Yet they can be extremely useful. But first, let’s see how they’re defined in the SQL standard.

Peter Zaitsev08/22/14
1539 views
0 replies

5 Great New Features From Percona Cloud Tools for MySQL

Percona Cloud Tools for MySQL is a hosted service providing access to query performance insights for all MySQL uses. After a brief setup, unlock new information about your database and how to improve your applications. There’s a lot more, but let’s just look at these five new features…

Matt Butcher08/21/14
2484 views
0 replies

Database Storage in Go with Structable

I'm not a huge fan of ORMs. I usually feel more productive with my query writing when I can just write SQL. Okay, not always. Writing plain old CRUD queries is a mindless chore equivalent to scrubbing the toilet. So I wrote a little library called structable that takes care of the boilerplate CRUD for me.

Alec Noller08/21/14
3183 views
1 replies

PostgreSQL Wishlists: What Users Want to See in 9.5

It wasn't too long ago that we saw the release of PostgreSQL 9.4 Beta 1, but now there's talk of PostgreSQL 9.5 and, in particular, what sorts of changes it ought to bring. Two separate wishlists have been assembled in the last few days, each sporting a handful of hopes for 9.5.

Lukas Eder08/20/14
1580 views
0 replies

The Difference Between ROW_NUMBER(), RANK(), and DENSE_RANK()

One of the most obvious and useful set of window functions are ranking functions where rows from your result set are ranked according to a certain scheme. There are three ranking functions: ROW_NUMBER(), RANK(), and DENSE_RANK(). The difference is easy to remember.

Chris Travers08/19/14
3353 views
0 replies

Math and SQL, Part 4: Basic Data Types - Sets, Tuples, and Bags

A reasonable understanding of the relational model requires understanding the basic data types which make it up, both in the idealized model and in real-world applications. This post discusses both the idealized model and the accommodations the standard implementations of it make to the messiness of the real world.

Sayem Ahmed08/18/14
2893 views
0 replies

JPA Tutorial: Setting Up JPA in a Java SE Environment

When I first started out with JPA, I had real difficulties to set it up because most of the articles on the web are written for Java EE environment only, whereas I was trying to use it in a Java SE environment. I hope that this article will be helpful for those who wish to do the same in the future.

Alec Noller08/17/14
1827 views
0 replies

The Best of the Week (Aug. 8): SQL Zone

Make sure you didn't miss anything with this list of the Best of the Week in the SQL Zone. This week's best include a beginner's guide to JPA/Hibernate flush strategies, how to avoid Hibernate anemia and reduce code bloat, part of the Math and SQL series, and more.

Vlad Mihalcea08/15/14
2360 views
0 replies

The Dark Side of Hibernate Auto Flush

Now that I described the the basics of JPA and Hibernate flush strategies, I can continue unraveling the surprising behavior of Hibernate’s AUTO flush mode.

Anders Karlsson08/15/14
2303 views
0 replies

Script to Manage MaxScale

There are still some rough edges and stuff to be fixed in MaxScale 1.0, but it is clearly close to GA. One thing missing, though, is something to manage starting and stopping MaxScale in a somewhat controlled way, which is what this blog is all about.

Robert Diana08/15/14
2515 views
0 replies

Geek Reading: August 14, 2014

These items are a combination of tech business news, development news and programming tools and techniques.

Michael Mainguy08/14/14
4680 views
3 replies

Avoid Hibernate Anemia and Reduce Code Bloat

One of my beefs with Hibernate as an ORM is that it encourages anemic domain models that have no operations and are simply data structures.

Lukas Eder08/14/14
2014 views
0 replies

SQL Tip of the Day: Be Wary of SELECT COUNT(*)

Unfortunately, COUNT(*) is often the first solution that comes to mind when we want to check our relations for some predicate. But COUNT() is expensive, especially if all we’re doing is checking our relations for existence. Does the word ring a bell?

Alec Noller08/13/14
9237 views
0 replies

Dev of the Week: Markus Winand

Every week, we feature a new developer/blogger from the DZone community to catch up and find out what he or she is working on now and what's coming next. This week we're talking to Markus Winand, author, trainer, and coach specializing in helping developers deal with SQL performance issues.

Drew Harvey08/13/14
1838 views
0 replies

MySQL Find and Replace (REPLACE)

Ever had need to do a MySQL find and replace to quickly replace some data in your database? Fear not, MySQL has a nifty little string function, REPLACE, that allows a user to find and replace instances of a search string with a substitution string.

Adrian Hills08/13/14
2725 views
0 replies

dm_exec_query_plan Returning NULL Query Plan

I recently hit a scenario (SQL Server 2012 Standard, 11.0.5058) where I was trying to pull out the execution plan for a stored procedure from the plan cache, but one query was returning a NULL query plan.