// archives

Database

This category contains 0 posts

PHP, Doctrine ORM & MySQL – How To Deal With Chinese, Korean, Japanese & Other Non-English UTF-8 Character Encoding

There was a web application project, PHP in nature, that my team and I had developed for the past couple of months and it was time to setup and move all of the application to the production server which is running on Ubuntu Linux. The application data stored in MySQL is a combination of both English and the Chinese Simplified characters (because of bilingualism). Unfortunately, most of our selenium functional test failed right after we ran it and we’d discovered that any form of data gotten from the MySQL database was displayed only with ???? characters for the data in the Chinese language. This caused me to look for a solution and I’m happy to document this in case some poor souls out there encounter the same problem as we did.
(more…)

MySQL Cluster NDB 7.2 on Solaris 10 Part 3 – Testing The Cluster

We are back again to have fun with our cluster that we’ve setup written in our previous articles on Part 1: MySQL Cluster NDB 7.2 on Solaris 10 Part 1 – How To Install, Setup and Configure and Part 2: MySQL Cluster NDB 7.2 on Solaris 10 Part 2 – Starting, Distributed Synchronized Users Management And Stopping The Cluster. This article, which is the Part 3 of the series – MySQL Cluster NDB on Solaris 10, and is a continuation from the previous parts. Here, we are going to discuss how we can carry out simple test to the cluster to make sure that it works as it should intended to be. Before we begin, please be inform that the cluster environment in this tutorial is tightly coupled with Part 1 and Part 2 of the tutorial, so if you haven’t read them and if you are interested in building your own MySQL Cluster, please complete Part 1 and Part 2 before reading the below.
(more…)

MySQL Cluster NDB 7.2 on Solaris 10 Part 2 – Starting, Distributed Synchronized Users Management And Stopping The Cluster

This is the continuation from the previous part of the tutorial MySQL Cluster NDB 7.2 on Solaris 10 Part 1 – How To Install, Setup and Configure. If you have not read it, it is highly recommended that you read Part 1 before coming on this. Anyway, this part is all about how you can start the servers within the cluster, enable synchronization of users across servers and stopping the cluster gracefully. The cluster environment is tightly coupled with the previous part of the tutorial. If you came from there, just read on.
(more…)

MySQL Cluster NDB 7.2 on Solaris 10 Part 1 – How To Install, Setup and Configure

If you have landed on this page, we believe you might either had a bumpy ride in getting the MySQL cluster working, or simple feeling tired to read and maneuver around those lengthy documentation or just desperate to get things done in the shortest time span; fret not, we’ve been there, done that and that is why this this tutorial was written so that it can benefit and shorten the learning curve for all those who are going through the same painful task of installing and getting MySQL Cluster NDB up and running on Solaris 10 in the shortest time.
(more…)

EJB3 JPA: 3 Ways Of Generating Primary Key Through @GeneratedValue

Let’s face it, different Databases have different ways of generating primary key values, either in the form of identity or through a sequence generator, if the primary key field is of a numerical data type. While coding Entity classes, it is necessary to define whether the primary key value (if is it of numerical type) could be generated from the sequence generator, self generated and inserted in the database during persistent or just self define. There are also times whereby your application would rather depend on a custom created table in the DB just to store generated sequential numbers as primary keys for the Entity. So, in this article, we’ll explore 3 ways in dealing with generating primary key values with the databases that support it and how to use the @GeneratedValue annotation effectively.
(more…)

How To Boot Oracle 11g Database On Solaris 10 During System Startup Through SMF

In the previous article “How To Install Oracle 11g Database R2 on Solaris 10 Through SSH and VNC“, I have mentioned that I’ll provide the instruction to start the Oracle Database during system boot. So, this post is all about the simple nuts and bolts in how you can achieve starting the Oracle DB during boot time on Solaris 10 through SMF.
(more…)

How To Install Oracle 11g Database R2 on Solaris 10 Through SSH and VNC

Quite too often when developers are to setup a development, test or even the production environment of Oracle database running on Solaris 10 (mostly for the first time), too much hurdles and bumpers are there to cause somebody to give up too easily. I’ve been through these tough bumpy roads too, especially when it comes to adding the proper user and groups, dealing with $DISPLAY export (just to get the installer’s UI up), changing of Kernel parameters when Oracle DB REQUIRES it, sizing of swap space if the installer yells at you and whatever the Oracle installer requires. It has always been in my heart for a very long time to write this “one page” installation guide as to aid people who are doing this installation process so that their journey could be short, sweet and less bumpy.
(more…)

EJB3.x JPA: How To Store An Image Or A Binary File As BLOB In Database

In this article, we will explore how to store any simple file in database through EJB3 JPA and how to code the property field and the proper annotation type in the entity class.
(more…)

EJB3 JPA: Dealing with Date, Time and Timestamp

Today, I feel the urge to document this. Yes, even though there had been ways which databases and Java JDBC driver/Persistent engines deal with Date, Time, DateTime, Calendar, Timestamp and whatever database data type or Java class types that represent dates and time and even time zone had long been there since the very beginning, but still many developers are often confused with how to persist fields that represents date, time, date-time or timestamp through EJB3/JPA. So, this article is mainly about 3 very simple ways that we could achieve this.
(more…)

How To Boot MySQL 5.5 On Solaris 10 During System Startup

In this article, I’ll show you how to boot-start MySQL5.5 as part of the Service Management Facility (SMF) in Solaris 10. This is especially useful when you need the MySQL database to be started the moment when Solaris 10 boots up and running.
(more…)

Previous Posts

MySQL Cluster NDB 7.2 on Solaris 10 Part 3 – Testing The Cluster

MySQL Cluster NDB 7.2 on Solaris 10 Part 3 - Testing The Cluster

September 22nd, 2012

We are back again to have fun with our cluster that we've setup written in our previous articles on [...]

MySQL Cluster NDB 7.2 on Solaris 10 Part 2 – Starting, Distributed Synchronized Users Management And Stopping The Cluster

MySQL Cluster NDB 7.2 on Solaris 10 Part 2 - Starting, Distributed Synchronized Users Management And Stopping The Cluster

September 18th, 2012

This is the continuation from the previous part of the tutorial MySQL Cluster NDB 7.2 on Solaris 10 [...]

MySQL Cluster NDB 7.2 on Solaris 10 Part 1 – How To Install, Setup and Configure

MySQL Cluster NDB 7.2 on Solaris 10 Part 1 - How To Install, Setup and Configure

September 18th, 2012

If you have landed on this page, we believe you might either had a bumpy ride in getting the MySQL c[...]

Quick Fix: How to Solve “Unable to read the logging configuration” on Netbeans7 with JBoss6

Quick Fix: How to Solve "Unable to read the logging configuration" on Netbeans7 with JBoss6

September 8th, 2012

This is just a quick fix post for those whom are having this problem when running JBoss 6.x with Net[...]

Making sense of EJB3.x Transaction Attributes – Part 4 (NEVER)

Making sense of EJB3.x Transaction Attributes – Part 4 (NEVER)

September 5th, 2012

This is the last part in the series of "Making sense of EJB3.x Transaction Attributes". So far, we'v[...]

Making sense of EJB3.x Transaction Attributes – Part 3 (Difference Between SUPPORTS and NOT_SUPPORTED)

Making sense of EJB3.x Transaction Attributes – Part 3 (Difference Between SUPPORTS and NOT_SUPPORTED)

September 5th, 2012

Oracle had extensively documented the behavior of each transaction attributes in the Java EE documen[...]

Making sense of EJB3.x Transaction Attributes – Part 2 (MANDATORY)

Making sense of EJB3.x Transaction Attributes - Part 2 (MANDATORY)

April 17th, 2012

In my previous post, we've discussed about TransactionAttributeType.REQUIRES_NEW: how it behaves and[...]

Making sense of EJB3.x Transaction Attributes – Part 1 (REQUIRES_NEW)

Making sense of EJB3.x Transaction Attributes - Part 1 (REQUIRES_NEW)

March 29th, 2012

For the previous past posts, I have dealth much with manual fine-grind transaction, mostly on the su[...]

EJB3.x JPA: When to use rollback() and setRollbackOnly()

EJB3.x JPA: When to use rollback() and setRollbackOnly()

March 23rd, 2012

After JTA was introduced for more than a decade ago, then later with the introduction of Bean-Manage[...]