Archive for the ‘MySQL’ Category

How To: Create a Query in One Shot

Tuesday, August 31st, 2010

To get information from a database it is necessary to execute a query to get this data.

Usually an ordinary SQL editor is used to create queries. To use such editor, one should remember the syntax of the SELECT operator and the names of tables and columns.

Let’s use a visual instrument developed specially to design queries, and see that it’s much easier to create queries visually instead of typing them in an editor.

Task:

It’s necessary to show the salaries of the employees of departments situated in different cities for the 2008 year in descending order.

(more…)

Quick start in database development with Sakila database project

Thursday, August 12th, 2010

The Sakila project was designed to demonstrate all cutting-edge capabilities of dbForge Studio for MySQL such as Database Projects, Database Diagram, Data Reports, Pivot Grid, Visual Query Builder, Code Refactoring, Database Comparison and Synchronization, and also to let a user get acquainted with the mentioned functionality quickly and easily with the help of the prepared examples.

(more…)

Be Careful While Using UNSIGNED Data Type in the Routine Body, Part 2

Tuesday, August 10th, 2010

In one of our posts, in the Be Careful While Using UNSIGNED Data Type in the Routine Body one, we’ve explained how to get invalid data in routine body when using UNSIGNED data type and that in this case MySQL does not throw any exceptions.

One of the possible solutions of this problem is explicit setting of the NO_UNSIGNED_SUBTRACTION mode as it is shown in an example in the MySQL documentation.

Let’s modify a routine script:

(more…)

How To: Setup Daily MySQL Backup on Windows

Wednesday, August 4th, 2010

Protecting information in databases and possibility to restore databases in case of need is the highest priority task in many companies. But not all DBMSs have built-in tools for data protection (tools to backup and restore databases). And MySQL is one of such DBMSs.

Making database backups is one of the most important things in the process of administrating MySQL databases, because some critical data loss can be irreplaceable.

The task of making daily mysql backup can be solved with the help of the backup database function of dbForge Studio for MySQL. To use it, you should setup backup in the wizard manually and schedule making backups.

(more…)

How To: Import Data to MySQL from Text File

Friday, July 30th, 2010

When working with databases it is always necessary to import data or schemas. In this article we describe the process of importing data from a text file into a MySQL database, and also we discuss questions concerning problems with MySQL import and the ways of solving these problems. We will give a detailed description of the Data Import tool of dbForge Studio for MySQL, describe the capabilities of this tool and illustrate its usage.

(more…)

How To: Export/Import Large MySQL Database

Friday, July 23rd, 2010

MySQL is frequently referred to as a database for Web applications. Partially it is really so, because MySQL became popular owing to its simplicity, high speed, and bounding with PHP. Developers of small Web projects often choose MySQL as a back end of their sites. Does this mean that MySQL can be used only for small databases? Not at all. There are lots of databases size of data in which is measured in gigabytes. Besides MySQL servers are frequently clustered to increase their performance. When a DBAs work with large amounts of data, they frequently have to make backup copies correctly and effectively, i. e. to export MySQL databases to SQL (or MySQL backup). It is extremely important to import MySQL database from SQL correctly is when restoring a corrupted database and when migrating a database from one server to another.

(more…)

How to: Create MySQL Database in One Shot

Monday, July 19th, 2010

This article gives a step-by-step instruction for visual database creation.
There is a lot of instruments that allow database developers avoid monotonous and error prone manual writing of scripts for tables creation. But to have a complete picture while creating a database it’s necessary not only to speed up the process of database objects creation, but also to visualize relations between them. dbForge Studio for MySQL offers a perfect tool for such purpose – Database Designer.

(more…)

More Tools Available: dbForge Studio for MySQL, v4.50!

Monday, June 21st, 2010

Devart today releases dbForge Studio for MySQL, v4.50 – cutting-edge administration tool and development environment for professional working with MySQL databases.

With dbForge Studio, Devart continues its initiative to produce efficient database experiences for all the people in MySQL world.

New features in dbForge Studio for MySQL, v4.50 include:

(more…)

How to: Create many-to-many table relationships

Friday, June 18th, 2010

Many-to-many relationships between tables are accommodated in databases by means of junction tables. A junction table contains the primary key columns of the two tables you want to relate.

To create a many-to-many relationship between tables in dbForge Studio for MySQL:

(more…)

Data Comparison Methods Overview

Tuesday, March 9th, 2010

Data comparison is a difficult and resource-intensive process. For convenience, this process can be divided into several steps.
First, you should compare tables from one database on one server with the database on the other server. You should choose columns for data comparison, and also choose a column that will be a comparison key.
The next step is to choose all data from these tables or some specified part of the data.
The third and the most important step is comparison of the two tables by the selected comparison key itself. During this process the status of each record is set to “only in source”, “only in target”, “different”, or “equal”.
The final steps of the data comparison process are including records to the synchronization and synchronization itself. During these steps records needed for synchronization are chosen, update script is created, and after that the script is executed.
You can read a detailed description of the comparison process here.

Now let’s look at the third step (data comparison) thoroughly.

There are several ways of data comparison that differ only by the side where data comparison is going to be performed – on the server side or on the client PC.

(more…)