Bruno Raljić

A Java Developer's Blog


How to create customized CSV files directly from MySQL query results

In one of my previous articles, I described how to import data from CSV file into MySQL and now I’ll show you how to export it into the CSV file directly, as a result of query execution. First, let’s start with the basics. Here is the syntax for creating CSV file with some optional parameters […]

, ,

Import data from CSV files into MySQL

When I got this task (importing data from csv into database) for the first time, my reaction was – “OK, I’ll transform the data into one big insert statement, with a bit help of regex and execute it”. And, indeed, I did it that way. Shortly after that, Nikola Cakarevic showed me how to import […]

, , ,

Carbon 5 – How to keep track of executed SQL scripts

If your application use a database and you often execute scripts manually (extending tables with new fields, adding new values) you need to keep records which scripts are executed and which aren’t. Keep in mind that you usually have more than one database (localhost, one or many production databases) and in addition, there are several […]

, ,

How to merge two MySQL databases manually [part 2]

Okay, here I will continue with my story about the database merging. In the second part, I’ll focus more on the technical stuff, how it is realized, how to get some values, how to execute some steps etc. The idea… After the discussion about the potential ways how to execute this migration, we agreed to […]

, ,

How to merge two MySQL databases manually [part 1]

If you want a thing done well, do it yourself! Sometimes, when working on large projects, you’ll end up with customer’s request to merge two databases (db with identical structure but different data, stored probably on different servers). If you’re lucky enough, you won’t end up with this kind of requests, and you won’t find […]

, ,