background preloader


Facebook Twitter

iBATIS, Hibernate, and JPA: Which is right for you? Object-relational mapping in Java is a tricky business, and solutions like JDBC and entity beans have met with less than overwhelming enthusiasm.

iBATIS, Hibernate, and JPA: Which is right for you?

But a new generation of ORM solutions has since emerged. These tools allow for easier programming and a closer adherence to the ideals of object-oriented programming and multi-tiered architectural development. Learn how Hibernate, iBATIS, and the Java Persistence API compare based on factors such as query-language support, performance, and portability across different relational databases. In this article we introduce and compare two of the most popular open source persistence frameworks, iBATIS and Hibernate.

We also discuss the Java Persistence API (JPA). If you are a beginning Java programmer new to persistence concepts, reading this article will serve as a primer to the topic and to the most popular open source persistence solutions. There are different ways to achieve persistence. iBATIS, Hibernate, and JPA: Which is right for you? What is Normalization? 1NF, 2NF, 3NF & BCNF with Examples. What is Normalization?

What is Normalization? 1NF, 2NF, 3NF & BCNF with Examples

Normalization is a database design technique which organizes tables in a manner that reduces redundancy and dependency of data. It divides larger tables to smaller tables and link them using relationships. In this tutorial, you will learn- The inventor of the relational model Edgar Codd proposed the theory of normalization with the introduction of First Normal Form and he continued to extend theory with Second and Third Normal Form. Later he joined with Raymond F. Theory of Data Normalization in Sql is still being developed further. Database Normalization Examples - Assume a video library maintains a database of movies rented out.

Table 1 Here you see Movies Rented column has multiple values. Database Normal Forms Now let's move in to 1st Normal Forms 1NF (First Normal Form) Rules Each table cell should contain single value. The above table in 1NF- Down Home Country Coding With Scott Selikoff and Jeanne Boyarsky. Some of my readers may be aware that nested subqueries such as “SELECT * FROM widgets WHERE id IN (SELECT …)”, don’t work all that well in MYSQL.

Down Home Country Coding With Scott Selikoff and Jeanne Boyarsky

While the syntax is usually correct, the performance issues in practice can be horrendous. This article delves deeper into this issue, and why MySQL performs so poorly with nested subqueries, but not so deep as to drive us all crazy. Background The first complex query I learned how to write was a nested subquery, or just nested query for short. Down Home Country Coding With Scott Selikoff and Jeanne Boyarsky. Five simple database design tips. A flawed database can affect all areas of your application, so getting the design right is of paramount importance.

Five simple database design tips

Check out Builder's five simple design tips, and share some of your own. If an enterprise’s data is its lifeblood, then the database design can be the most important part of an application. Volumes have been written on this topic, and entire college degrees have been built around it. However, as has been said time and time again here on, there’s no teacher like experience. I’ll get the show started by listing my five favorite tips and giving a brief explanation of the rationale behind each one. . #1: Use meaningful field namesI once worked on a project I inherited from another programmer who liked to name fields using the name of the onscreen control that displayed the data from that field. A Visual Explanation of SQL Joins. I love the concept, though, so let's see if we can make it work.

A Visual Explanation of SQL Joins

Assume we have the following two tables. Table A is on the left, and Table B is on the right. A Visual Explanation of SQL Joins. Ten Common SQL Programming Mistakes. Database delivery patterns & practices STAGE 2 Continuous Integration: Fundamentals It is not always easy to spot "antipatterns" in your SQL, especially in more complex queries.

Ten Common SQL Programming Mistakes

In this article, Plamen demonstrates some of the most common SQL coding errors that he encounters, explains their root cause, and illustrates potential solutions. How to share data between stored procedures. An SQL text by Erland Sommarskog, SQL Server MVP.

How to share data between stored procedures

Most recent update 2013-11-02. Introduction This article tackles two related questions: Using Connection String Keywords with SQL Server Native Client. There are two ways OLE DB applications can initialize data source objects: IDBInitialize::Initialize IDataInitialize::GetDataSource In the first case, a provider string can be used to initialize connection properties by setting the property DBPROP_INIT_PROVIDERSTRING in the DBPROPSET_DBINIT property set.

Using Connection String Keywords with SQL Server Native Client

In the second case, an initialization string can be passed to IDataInitialize::GetDataSource method to initialize connection properties. Both methods initialize the same OLE DB connection properties, but different sets of keywords are used. The set of keywords used by IDataInitialize::GetDataSource is at minimum the description of properties within the initialization property group.

Any provider string setting that has a corresponding OLE DB property set to some default value or explicitly set to a value, the OLE DB property value will override the setting in the provider string. connection-string ::= empty-string[;] | attribute[;] | attribute; connection-string empty-string ::= Five simple database design tips.

Ten Common Database Design Mistakes. No list of mistakes is ever going to be exhaustive.

Ten Common Database Design Mistakes

People (myself included) do a lot of really stupid things, at times, in the name of “getting it done.” This list simply reflects the database design mistakes that are currently on my mind, or in some cases, constantly on my mind.