<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
					xmlns:content="http://purl.org/rss/1.0/modules/content/"
					xmlns:wfw="http://wellformedweb.org/CommentAPI/"
				  >
<channel>
<title>Navicat Blog</title>
<link>http://www.navicat.com</link>
<language>en-us</language>
<pubDate>Wed, 17 Jun 2026 23:23:00 +0000</pubDate>
<item>
<title>Navicat Query Builder- Field Selection (Part 2)</title>
<link>http://www.navicat.com</link>
<description><![CDATA[<b>January 24, 2018</b> by Robert Gravelle<br/><br/><p>Available in Non-Essentials editions of Navicat for MySQL, PostgreSQL, SQLite, MariaDB, and Navicat Premium, the Query Builder allows anyone to create and edit queries with only a cursory knowledge of SQL.  In Part 1, we used it to write a query to fetch a list of actors that appeared in movies released during a given year. Today's blog will provide a more detailed overview on selecting output fields.</p><h1 class="blog-sub-title">Today's Query</h1><p>The query that we'll be building here today will again run against the <a class="default-links" href="http://dev.mysql.com/doc/sakila/en/index.html" target="_blank">Sakila sample database</a>.  It contains a number of tables themed around the film industry that cover everything from actors and film studios to video rental stores.  Please refer to the <a class="default-links" href="http://www.databasejournal.com/features/mysql/generating-reports-on-mysql-data.html" target="_blank">Generating Reports on MySQL Data</a> tutorial for instructions on downloading and installing the Sakila database.</p><p>Much like the previous blog, we will be building a query to fetch a list of actors that appeared in movies released during a given year. The difference is that this time we will make use of a view that lists actors for each title as a comma-delimited list.</p><h1 class="blog-sub-title">Setting Field Associations</h1><p>Dragging a table/view from the left pane to the Diagram Design pane or double-clicking it adds the table or view to query. The Query Builder will automatically include entity relationships where foreign key constraints have been declared. In this case, we'll be needing the film table and film_list view. They do not have a defined association, so we have to add one ourselves. To do that, just drag one field from one object to another and a line will appear between the linked fields - i.e. between film.film_id and film_list.FID.</p><p> The Query Builder will not only draw the association between the objects, but it will also add an INNER JOIN to the query:</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180124/tables with inner join.jpg" style="max-width: 100%;"></td></tr><p>With the tables/views selected, we are ready to choose out output fields.</p><p>Click the checkbox beside each field that you want to appear in your query results - i.e. film.title, film.film_id, film.release_year, and film_list.actors.</p><p>The fields you have selected in the Diagram Design pane will then be displayed in the Syntax pane, where then may then be modified clicking on the &lt;Distinct&gt;, &lt;func&gt; and &lt;Alias&gt; modifiers.</p><h1 class="blog-sub-title">Using Functions</h1><p>Clicking the &lt;func&gt; modifier opens a list of SUM, MAX, MIX, AVG, and COUNT aggregate functions. You may also enter another function via the Edit tab.  For example, we could select the film_list.price field and enter "concat('$', film_list.price)" in the Edit tab to format the price. We can also move the field position by dragging it - for instance, before the actor list:</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180124/custom function.jpg" style="max-width: 100%;"></td></tr><p style="font-size: 18px">Field Aliases</p><p>When using functions, it's always a good idea to choose a more descriptive field name using an alias.  For example, in this case we can simply go with the original field name of "price":</p><tr><td><img src="https://www2.navicat.com/link/Blog/Image/2018/20180124/setting the field alias.jpg" style="max-width: 100%;"></td></tr><p>Here is the final query produced by the Query Builder:</p><pre>SELECTfilm.title,film.film_id,film.release_year,concat('$', film_list.price) AS price,film_list.actorsFROMfilmINNER JOIN film_list ON film.film_id = film_list.FID</pre><p>And here are the results:</p><tr><td><img src="https://www2.navicat.com/link/Blog/Image/2018/20180124/results.jpg" style="max-width: 100%;"></td></tr>]]></description>
</item>
<item>
<title>How to Delete Duplicate Rows with Different IDs in MySQL (Part 3)</title>
<link>http://www.navicat.com</link>
<description><![CDATA[<b>January 16, 2018</b> by Robert Gravelle</br><br/><p>The majority of duplicate records fall into one of two categories: Duplicate Meaning and Non-unique Keys. The <a class="default-links" href="https://www.navicat.com/en/company/aboutus/blog/671-how-to-spot-and-delete-values-with-duplicate-meaning-in-mysql-part-1.html" target="blank">How to Spot and Delete Values with Duplicate Meaning in MySQL</a> blog dealt with Duplicate Meaning; the <a class="default-links" href="https://www.navicat.com/en/company/aboutus/blog/672-how-to-identify-duplicates-with-non-unique-keys-part-2.html" target="blank">follow-up</a> addressed how to identify Non-unique Keys. Thats where two records in the same table have the same key, but may or may not have different values and meanings.  Todays blog will cover how to delete rows with duplicated data, but with different keys.</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180116/duplicates3.png" style="max-width: 100%;"></td></tr><h1 class="blog-sub-title">Identifying Duplicates by Type</h1><p>The last query presented in the <a class="default-links" href="https://www.navicat.com/en/company/aboutus/blog/672-how-to-identify-duplicates-with-non-unique-keys-part-2.html" target="blank">How to Identify Duplicates with Non-unique Keys in MySQL blog</a> listed all the duplicates in a format that was easy to visually scan through:</p><font face="courier New"><body><table border="0"><tr><td><b>Repetitions</b></td><td>&nbsp;&nbsp;&nbsp;</td><td><b>row_data</b></td></tr><tr><td colspan="3"><b>----------------------------------------------------------------</b></td></tr><tr><td>2</td><td/><td>22 (DAVIS, JENNIFER) | 22 (DAVIS, JENNIFER)</td></tr><tr><td>2</td><td/><td>23 (LOLLOBRIGIDA, JOHNNY) | 23 (GABLE, CHRISTIAN)</td></tr><tr><td>2</td><td/><td>41 (WAHLBERG, NICK) | 12 (WAHLBERG, NICK)</td></tr></table></body></font><p>Having identified all of the duplicated keys and values, we can decide how best to deal with the redundant data.</p><p>JENNIFER DAVIS appears in two records with the same key of 22, making those rows exact duplicates. Nick Walbergs name fields are duplicated, but the IDs are not.  There is also a duplicated key that is associated with two unrelated actors: #23 for JOHNNY LOLLOBRIGIDA and CHRISTIAN GABLE.  With regards to the duplicated keys of 22 and 23, the first is a true duplicate, whereas the second only needs a new key to be generated for one of the records.</p><h1 class="blog-sub-title">Deleting Rows using DELETE JOIN</h1><p>In the <a class="default-links" href="https://www.navicat.com/en/company/aboutus/blog/671-how-to-spot-and-delete-values-with-duplicate-meaning-in-mysql-part-1.html" target="blank">How to Spot and Delete Values with Duplicate Meaning in MySQL</a> blog, we removed duplicates from SELECT result sets by performing a Search &amp; Replace on values.  Here we will permanently delete one of the duplicated rows using the DELETE JOIN statement.</p><p>Since we are comparing fields from the same table, we have to join the table to itself.  We can choose to keep either the lower or higher id number by comparing the ids in the WHERE clause.  The following statement keeps the highest id:</p><pre>DELETE a FROM wp.amalgamated_actors a  INNER JOIN wp.amalgamated_actors a2WHERE a.id < a2.idAND   a.first_name = a2.first_nameAND   a.last_name  = a2.last_name;1 row(s) affected0.093 sec</pre><p>In this case, the affected (deleted) row is NICK WAHLBERG with an id of 12. A quick SELECT confirms the result:</p><font face="courier New"><body><table border="0"><tr><td><b>id</b></td><td>&nbsp;&nbsp;&nbsp;</td><td><b>first_name</b></td><td>&nbsp;&nbsp;&nbsp;</td><td><b>last_name</b></td></tr><td colspan="5"><b>-------------------------------------</b></td><tr><td>10</td><td/><td>PENELOPE</td><td/><td>GUINESS</td></tr><tr><td>12</td><td/><td>NICK</td><td/><td>WAHLBERG</td></tr><tr><td>14</td><td/><td>ED</td><td/><td>CHASE</td></tr><tr><td>22</td><td/><td>JENNIFER</td><td/><td>DAVIS</td></tr><tr><td>23</td><td/><td>JOHNNY</td><td/><td>LOLLOBRIGIDA</td></tr><tr><td>27</td><td/><td>BETTE</td><td/><td>NICHOLSON</td></tr><tr><td>34</td><td/><td>GRACE</td><td/><td>MOSTEL</td></tr><tr><td>39</td><td/><td>JOE</td><td/><td>SWANK</td></tr><tr><td>23</td><td/><td>CHRISTIAN</td><td/><td>GABLE</td></tr><tr><td>22</td><td/><td>JENNIFER</td><td/><td>DAVIS</td></tr></table></body></font><p>If you wanted to keep the lowest id, you would just change the <font face="courier New">a.id &lt; a2.id</font> expression to <font face="courier New">a.id &gt; a2.id</font>.</p><font face="courier New"><body><table border="0"><tr><td><b>id</b></td><td>&nbsp;&nbsp;&nbsp;</td><td><b>first_name</b></td><td>&nbsp;&nbsp;&nbsp;</td><td><b>last_name</b></td></tr><td colspan="5"><b>-------------------------------------</b></td><tr><td>10</td><td/><td>PENELOPE</td><td/><td>GUINESS</td></tr><tr><td>14</td><td/><td>ED</td><td/><td>CHASE</td></tr><tr><td>22</td><td/><td>JENNIFER</td><td/><td>DAVIS</td></tr><tr><td>23</td><td/><td>JOHNNY</td><td/><td>LOLLOBRIGIDA</td></tr><tr><td>27</td><td/><td>BETTE</td><td/><td>NICHOLSON</td></tr><tr><td>34</td><td/><td>GRACE</td><td/><td>MOSTEL</td></tr><tr><td>41</td><td/><td>NICK</td><td/><td>WAHLBERG</td></tr><tr><td>39</td><td/><td>JOE</td><td/><td>SWANK</td></tr><tr><td>23</td><td/><td>CHRISTIAN</td><td/><td>GABLE</td></tr><tr><td>22</td><td/><td>JENNIFER</td><td/><td>DAVIS</td></tr></table></body></font><h1 class="blog-sub-title">Deleting Rows with Non-unique Keys</h1><p>In the case of JENNIFER DAVIS, who appears twice with the same id of 22, we would need to employ a different approach because running the above statement with <font face="courier New">a.id = a2.id</font> will target every row in the table! The reason is that we are essentially matching every row against itself!  In the next blog, well learn how to delete rows with non-unique keys such as these.</p>]]></description>
</item>
<item>
<title>Automate Database Replication with Navicat Premium 12</title>
<link>http://www.navicat.com</link>
<description><![CDATA[<b>January 9, 2018</b> by Robert Gravelle<br/><br/><p>Unlike synchronization, which is a one-time process that brings the schema and data of two databases in sync, replication is a process that continuously (automatically) reproduces data between two databases (although schema updates are also possible).  Replication may either be done asynchronously, so that a permanent connection between the two databases is not required, or during non-peak hours, when there is little traffic on the database server, for instance, during the late-night hours.</p><p>The main role of replication is to create an amalgamated repository of all user databases and/or disseminate the same level of information amongst all users. In either case the result is a distributed database in which users can access data relevant to their tasks without interfering with the work of others. The implementation of database replication for the purpose of eliminating data ambiguity or inconsistency among users is known as normalization.</p><p>In the Database Synchronization Strategies whitepaper, we explored some strategies for synchronizing two databases that are of the same and of dissimilar type, using the Navicat Premium Database Management System.  In todays follow-up, well cover how to automate database replication using Navicat Premiums new Automation utility.</p><h1 class="blog-sub-title">Replication Types</h1><p>Database replication can be done in at least three different ways:</p><ul style="list-style-type: disc;"><li>Snapshot replication: Data on one server is simply copied to another database on the same or on a different server.</li><li>Merging replication: Data from two or more databases is combined into a single database.</li><li>Transactional replication: Users receive full initial copies of the database and then receive periodic updates as data changes.</li></ul><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/replication.jpg" style="max-width: 100%;"></td></tr><p>In a distributed database management system (DDBMS) changes, additions, and deletions performed on the data at one location are automatically reflected in the data stored at all the other locations. Doing so ensures that every user accesses the same data set as all the other users.</p><p>Like synchronization, replication can be either Homogenous or Heterogeneous:</p><ul style="list-style-type: disc"><li>Homogenous: Same source and target DBs, i.e. Percona to Percona, MariaDB to MariaDB, MySQL to MySQL.</li><li>Heterogeneous: Dissimilar source and target DBs, i.e. Oracle to Microsoft SQL Server, PostgresSQL, to Amazon DynamoDB, MySQL to Amazon Aurora</li></ul><p>A scenario where Heterogeneous replication would be required would be where one or more external business partners employ a different database type than our own. Automated regular data replication between the two environments is often an integral part of such an arrangement.</p><h1 class="blog-sub-title">Navicat Premiums Automation Utility</h1><p>Introduced in version 12, Navicat Premiums new Automation utility features an easy-to-use and intuitive interface for creating automated batch jobs. Automation is the execution of a process at one or more regular intervals, beginning and ending at a specific date and time, much like Windows Task Scheduler.  In addition to replication, it can be utilized for a variety of jobs, including backups, queries, and reports.</p><p style="font-size: 12px"><i>Figure 1: Navicat Premium 12 Automation utility in Windows</i></p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/navicat automation utility in windows.png" style="max-width: 100%;"></td></tr><p></p><p style="font-size: 12px"><i>Figure 2: Navicat Premium 12 Automation utility in macOS</i></p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/navicat automation utility in macOS.png" style="max-width: 100%;"></td></tr><h1 class="blog-sub-title">The User Database</h1><p>Well be using the <a class="default-links" href="https://dev.mysql.com/doc/sakila/en/" target="blank">Sakila Sample MySQL Database</a> as our user database.  It was developed by Mike Hillyer, a former member of the MySQL AB documentation team, and was created specifically for the purpose of providing a standard schema for use in books, tutorials, articles, and the like.</p><p>Its themed around the film industry and covers everything from actors and film studios to video rental stores. The full schema structure can be viewed on the <a class="default-links" href="http://dev.mysql.com/doc/sakila/en/sakila-structure.html" target="blank">MySQL Dev site</a>, if youre interested.</p><p>For instructions on setting up the Sakila database using Navicat, see the <a class="default-links" href="http://www.databasejournal.com/features/mysql/generating-reports-on-mysql-data.html" target="blank">Generating Reports on MySQL Data</a> article on databasejournal.com.</p><p style="font-size: 12px"><br>Sakila MySQL database structure in Navicat Premium 12</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/Sakila MySQL database structure.png" style="max-width: 100%;"></td></tr><h1 class="blog-sub-title">Snapshot replication </h1><p>As described above, Snapshot Replication puts two databases in sync by copying data from one database to another on the same or on a different server.  It is the simplest of the three types.</p><h1 class="blog-sub-title">Creating a Data Synchronization Job</h1><p>A data synchronization profile must first be created in order to automate it as a replication process.  The steps to achieve both Homogenous and Heterogeneous synchronization in Navicat Premium 12 were described in the Database Synchronization Strategies whitepaper.  For the purposes of this tutorial, well use the first example on Homogenous synchronization between the sakila and sakila2 databases.</p><p><i>Hint: Once youve created the sakila database, you can create the sakila2 database by right-clicking the connection in the Navigation pane and choosing New Database.  Then enter the database name (sakila2) in the pop-up window.</i></p><p>To open the Data Synchronization wizard:</p><ul style="list-style-type: decimal;"><li>Select <b>Tools -&gt; Data Synchronization</b> from the menu bar.</li><tr><td align="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/Data Synchronization1.png" style="max-width: 100%"></td></tr>  <p></p><li>The Data Synchronization Options tab contains only a few Compare Options checkboxes. We can leave them as is:</li><tr><td align="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/Data Synchronization2.png" style="max-width: 100%"></td></tr>  <p></p><li>The next step of the Data Synchronization wizard is for mapping tables. Target tables may be selected via a dropdown list. In this case, we dont need to provide any mapping instructions as the tables in both databases are identical:</li><tr><td align="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/Data Synchronization3.png" style="max-width: 100%"></td></tr>  <p></p><li><p>After comparing data, the window shows the number of records that will be inserted, updated or deleted in the target tables. You can uncheck the <b>Show identical table and others</b> option if you dont want to include tables with identical data or tables with different structures  in other words, tables that wont be updated.  There are also checkboxes to deselect the tables or the actions you do not wish to apply to the target.</p><p>Selecting a table in the list displays the source and target tables data in the bottom pane. Values that differ between source and target are highlighted. As in the top pane, you can uncheck the records that you do not want to apply to the target.</p></li><tr><td align="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/Data Synchronization4.png" style="max-width: 100%"></td></tr></ul><p><b><i>Difference Options</i></b></p><p>The kind of differences to show may be selected from a dropdown list. Here are the possible options:</p><ul style="list-style-type: disc;"><li>Difference: Show all records that are different in source and target tables.</li><li>Insert: Only show the records that do not exist in the target table.</li><li>Update: Only show the records that exist in both source and target tables having different values.</li><li>Delete: Only show the records that do not exist in the source table.</li><li>Same: Show the records that exist in both source and target tables having identical values.</li><li>All Rows: Show all records in source and target tables.</li></ul><p>In our case, selecting Update or Same would show zero rows because there are no rows to update (only insert) and none the same:</p><tr><td align="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/option.png" style="max-width: 100%"></td></tr><p>As before, clicking the <b>Deploy</b> button generates and displays the Deployment Script:</p><tr><td align="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/Data Synchronization5.png" style="max-width: 100%"></td></tr><p>This screen, like all the previous ones, contains a <b>Save Profile</b> button that allows you to save your settings for future use. This particular screen also has a button for saving the <b>Deployment Script</b>.</p><p>You may still <b>Recompare</b> the two databases, or proceed to <b>Execute</b> the deployment script.  There is a checkbox to <b>Continue on error</b> so that deployment does not halt upon encountering an error.</p><p>As the script executes, you may view its progress in the Message Log. It displays both the number of records processed and completed percentage:</p><tr><td align="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/Data Synchronization6.png" style="max-width: 100%"></td></tr><p>After closing the dialog, we can confirm that the <i>sakila2</i> database tables now contain data:</p><tr><td align="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/sakila2 database tables.png" style="max-width: 100%"></td></tr><br><b>Dont forget to save the profile because the batch job will be utilizing it.</b><p><b><i>Creating a Batch Job</i></b></p><p>We will now employ Navicats Automation tool to setup a recurring replication between the sakila and sakila2 databases.</p><ul style="list-style-type: decimal;"><li>To begin, click the <b>Automation</b> button in the main toolbar.</li>  <p></p><li>Then click on <b>New Batch Job</b> in the Objects toolbar to open a New Batch Job tab.</li>  <p></p><li>Browse the source connection, database and/or schema on the in the Objects pane. That will make saved jobs for that database appear in the Available Jobs bottom pane.<br>In the Available Jobs pane, select the <b>Data Synchronization</b> job type, and then move the job from the Available Jobs list to the Selected Jobs list above by double-clicking or dragging it. (You can delete the jobs from the Selected Jobs list in the same way.)</li><tr><td align="bottom"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/homogeneous job selected.jpg" style="max-width: 100%"></td></tr><li>Click the <b>Save</b> button on the Automation toolbar and provide a descriptive name in the Save dialog.</li></ul><p>That will enable <b>the Set Task Schedule</b> and <b>Delete Task Schedule</b> buttons.</p><p><b><i>The General tab</i></b></p><p>In the General tab of the Task Schedule dialog, you may provide a description for the task as well as provide several options for its execution.</p><tr><td align="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/homogeneous job general tab.jpg" style="max-width: 100%"></td></tr><ul style="list-style-type: decimal;"><li>Within the Security Options frame, you may configure which user or group account to run the task under. There is also an option to run the task whether the user is logged on or not. If you do choose that option, you'll have provide your OS user password in Windows Scheduler when you save the schedule.</li>  <p></p><tr><td align="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/saving user credentials.jpg" style="max-width: 100%"></td></tr><p>You may also choose to run the task as Hidden as well as configure it to run on a specific operating system.</p></ul><p><b><i>Triggering the Task</i></b></p><p>The Triggers tab lists the task's schedule. Tasks may be configured to run on a variety of schedules, including One Time, Daily, Weekly, Monthly, and according to just about any permutation of each.</p><p>Click the <b>New...</b> button to bring up the New Trigger dialog:</p><tr><td align="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/new trigger dialog.jpg" style="max-width: 100%"></td></tr><p>The same task may run according to numerous schedules.  For instance, we could schedule our database synchronization task to run every first of the month as well as on every second Sunday:</p><tr><td align="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/triggers tab.jpg" style="max-width: 100%"></td></tr><p><b><i>Set Email Notification</i></b></p><p>Navicat allows you to generate and send personalized emails with results returned from a schedule. The results can be emailed to multiple recipients. Check the <b>Send Email</b> option in the Advanced tab and enter the required information.</p><p><b>From</b></p><p>Specify the email address of sender. For example, someone@navicat.com.</p><p><b>To, CC</b></p><p>Specify the email address of each recipient, separating them with a comma or a semicolon (;).</p><p><b>Subject</b></p><p>Specify the email subject with customized format.</p><p><b>Body</b></p><p>Write email content.</p><p><b>Host (SMTP Server)</b></p><p>Enter your Simple Mail Transfer Protocol (SMTP) server for outgoing messages.</p><p><b>Port</b></p><p>Enter the port number you connect to your outgoing email (SMTP) server.</p><p><b>Use authentication</b></p><p>Check this option and enter User Name and Password if your SMTP server requires authorization to send emails.</p><p><b>Secure connection</b></p><p>Specify the connection to use <i>TLS, SSL secure connection</i> or <i>Never</i>.</p><p><b>Send Test Mail</b></p><p>Navicat will send you a test mail indicating success or failure.</p><tr><td align="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/advanced tab.jpg" style="max-width: 100%"></td></tr><p>Once you've finished configuring your automated job, you can test it by clicking the Start button in the Automation toolbar.</p><h1 class="blog-sub-title">Merging Replication</h1><p>As the name suggests, Merging Replication consists of combining data from two or more databases into a single database. As an exercise, we will merge the contents of the sakila and sakla2 databases into a third database named sakila_merged that will store the merged dataset.</p><h1 class="blog-sub-title">The Required Data Synchronization Jobs</h1><p>The Merging Replication job will require us to create and save two Data Synchronization profiles: one for each source database. The steps will be exactly the same as in the Creating a Data Synchronization Job section above, so we wont reiterate them here.</p><h1 class="blog-sub-title">Creating the Batch Job</h1><p>Batch jobs may be triggered by the source databases or by the target, as we did in the previous section on Snapshot Replication. However, it is usually easiest to trigger batch jobs from the target database since they will all reside on the same server. We'll do that here as well.</p><ul style="list-style-type: decimal;"><li>Click the <b>Automation</b> button in the main toolbar.</li>  <p></p><li>Then click on <b>New Batch Job</b> in the Objects toolbar to open a new batch job tab.</li>  <p></p><li>Browse the source connection, database and/or schema on the in the Objects pane. That will make saved jobs for that database appear in the Available Jobs bottom pane.</li>  <p></p><li>In the Available Jobs pane, select the <b>Data Synchronization</b> job type, and then move the job from the Available Jobs list to the Selected Jobs list above by double-clicking or dragging it.</li>  <p></p><tr><td align="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/merging replication jobs selected.jpg" style="max-width: 100%"></td></tr>  <p></p><li>Click the <b>Save</b> button on the Automation toolbar and provide a descriptive name in the Save dialog.  That will enable <b>the Set Task Schedule</b> and <b>Delete Task Schedule</b> buttons.</li>  <p></p><li>In the General tab of the Task Schedule dialog, you may again provide a description for the task as well as provide several options for its execution.</li>  <p></p><li>Within the Triggers tab, Tasks may be configured to run on a variety of schedules, including One Time, Daily, Weekly, Monthly, and within just about any permutation of each. This time, two jobs will execute rather than one.</li>  <p></p><li>Once you've finished configuring your automated job, you can test it by clicking the <b>Start</b> button in the Automation toolbar.</li></ul><h1 class="blog-sub-title">Transactional replication</h1><p>In Merged Replication, only the merged database contains all of the latest data. Each source database contains only the baseline data, plus whatever was inserted since it was first populated.  In Transactional Replication, users receive full initial copies of the database and then receive periodic updates as data changes so that all databases are working with the same dataset. Keeping multiple databases in synch makes this the most complex replication type.</p><h1 class="blog-sub-title">The Required Data Synchronization Jobs</h1><p>With Transactional replication, the number of required Data Synchronization Jobs increases substantially because data must be replicated across all of the user databases. For example, say that we had three databases called sakila, sakila2, and sakila3. We could merge and propagate the full dataset across all of the user databases using a total of six Data Synchronization Jobs: three to merge the user databases, and another three to update them with the merged dataset.</p><p>Here is the Automation wizard with all six jobs:</p><tr><td align="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/Automation wizard.png" style="max-width: 100%"></td></tr><p>To allow sufficient time for the data merging to complete, it is best to split the jobs into two parts where the first merges the data and the second updates the user databases with the full dataset after a specified delay.</p><p>Here is what the Automation Job that propagates the merged dataset to the user databases might look like:</p><tr><td align="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/transactional replication update jobs selected.jpg" style="max-width: 100%"></td></tr><p>Running this job two hours after the first should provide plenty of time for the merging to complete.  Hence, if the first job was scheduled to run at midnight, we would set this job to start at 2 Am:</p><tr><td align="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180109/transactional replication update schedule.jpg" style="max-width: 100%"></td></tr><h1 class="blog-sub-title">Conclusion</h1><p>In this follow-up to the Database Synchronization Strategies whitepaper, we covered how to automate database replication using Navicat Premium 12s Automation utility. Used in conjunction with its Synchronization tool, it allows DBAs to automate various types of replication to run on a predefined schedule.</p><p>For more information about Navicat Premium 12, visit the <a class="default-links" href="https://www.navicat.com/en/products/navicat-premium" target="blank">product page</a>.</p>]]></description>
</item>
<item>
<title>Design SELECT Queries using Navicat's Query Builder (Part 1)</title>
<link>http://www.navicat.com</link>
<description><![CDATA[<b>January 3, 2018</b> by Robert Gravelle<br/><br/><p>Available in Non-Essentials editions of Navicat for MySQL, PostgreSQL, SQLite, MariaDB, and Navicat Premium, the Query Builder allows anyone to create and edit queries with only a cursory knowledge of SQL. In today's blog, we'll use it to write a query to fetch a list of actors that appeared in movies released during a given year.</p><h1 class="blog-sub-title">The Source Database</h1><p>The query that we'll be building will run against the <a class="default-links" href="https://dev.mysql.com/doc/sakila/en/" target="blank">Sakila sample database</a>. A former member of the MySQL AB documentation team named Mike Hillyer created the Sakila database specifically for the purpose of providing a standard schema for use in books, tutorials, and articles just like the one you're reading.</p><p>The database contains a number of tables themed around the film industry that cover everything from actors and film studios to video rental stores. Please refer to the <a class="default-links" href="http://www.databasejournal.com/features/mysql/generating-reports-on-mysql-data.html" target="_blank">Generating Reports on MySQL Data</a> tutorial for instructions on downloading and installing the Sakila database.</p><h1 class="blog-sub-title">Opening the Query Builder</h1><p>You can think of the Query Builder as a tool for building queries visually. It's accessible from the Query Designer screen. Let's bring it up by opening a new query:</p><ul style="list-style-type:decimal;" class="blog-list"><li>Click the Query icon on the main toolbar, followed by the New Query button from the Object toolbar:</li><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180103/new query.jpg" style="max-width: 100%;"></td></tr><li>In the Query Designer, click the Query Builder button to open the visual SQL Builder.<p>The database objects are displayed in left pane, whereas the right pane is divided into two portions: the upper Diagram Design pane, and the lower Syntax pane:</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180103/empty query builder.jpg" style="max-width: 100%;"></td></tr></li></ul><h1 class="blog-sub-title">Constructing the Actors for Year's Films Query</h1><p>It's a good idea to select the tables first, so that the Query Builder knows which fields to present for the field list:</p><ul style="list-style-type: decimal;" class="blog-list"><li>Drag a table/view from the left pane to the Diagram Design pane or double-click it to add it to query. We'll be needing the actor, film_actor, and film tables.</li><li>You can assign table aliases by clicking on "&lt;alias&gt;" beside each table. To add the table alias, simply double-click the table name and enter the alias in the Diagram Design pane.</li><p>Note how the Query Builder already knows the table relationships. That's because foreign key constraints have already been declared on Table objects:</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180103/query builder with tables.jpg" style="max-width: 100%;"></td></tr><li>To include a field in the query, check the left of the field name in the Diagram Design pane. To include all the fields, click at the left of the object caption. Select the actor first and last names as well as the film title.</li></ul><h3 style="font-size: 18px;">Adding WHERE Criteria</h3><p>Clicking on "&lt;Click here to add conditions&gt;" beside the WHERE keyword adds a default WHERE condition of "&lt;--&gt; = &lt;--&gt;".</p><ul style="list-style-type: decimal;" class="blog-list"><li>Click on the left-hand "&lt;--&gt; = &lt;--&gt;" to select a field. That opens a popup dialog that contains a List of fields as well as an Edit tab.</li><li>Click the List tab and choose the f.release_year field.</li><li>Click OK to close the dialog.</li><li>Next, click on the right-hand "&lt;--&gt; = &lt;--&gt;" to set the release year. This time enter a value of "2006" in the Edit tab. Click OK to close the dialog.</li><li>Click OK to close the Query Builder. You should now see the generated SELECT statement in the Query Editor:</li><pre>SELECTa.first_name,a.last_name,f.titleFROMactor AS aINNER JOIN film_actor AS fa ON fa.actor_id = a.actor_idINNER JOIN film AS f ON fa.film_id = f.film_idWHEREf.release_year = 2006</pre><li>Click the Run button to execute the query. The results will be sorted by Film title:</li><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/2018/20180103/query result.jpg" style="max-width: 100%;"></td></tr></ul><h1 class="blog-sub-title">Conclusion</h1><p>Whether you're a novice or experience DBA, Navicat's Query Builder makes writing SELECT queries easier than ever before. In an upcoming blog, we'll get into some of its more advanced features.</p>]]></description>
</item>
<item>
<title>How to Identify Duplicates with Non-unique Keys (Part 2)</title>
<link>http://www.navicat.com</link>
<description><![CDATA[<b>December 27, 2017</b> by Robert Gravelle<br/><br/><p>The majority of duplicate records fall into one of two categories: Duplicate Meaning and Non-unique Keys.  The How to Spot and Delete Values with Duplicate Meaning in MySQL blog dealt with Duplicate Meaning; in today's follow-up, we'll address how to identify Non-unique Keys.  That's where two records in the same table have the same key, but may or may not have different values and meanings.</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20171227/duplicates2.png" style="max-width: 100%;"></td></tr><h1 class="blog-sub-title">How Does this Happen?</h1><p>Even a well-designed database can accumulate non-unique key duplicates.  It often happens as a result of data that is imported from external sources such as text, csv, or excel files as well as data feeds.  Even merging data from two different databases might create duplicate keys if you are combining each in some way to generate a new key  assuming of course that the new key column supports non-unique values.  For example, concatenating two numbers to generate a new key could prove problematic: </p><p></p><font face="courier New"><body><table border="0"><tr><td>Key 1</td><td>&nbsp;&nbsp;&nbsp;</td><td>Key 2</td><td>&nbsp;&nbsp;&nbsp;</td><td>New Key</td></tr><tr><td colspan="5">--------------------------</td></tr><tr><td>10</td><td></td><td>25</td><td></td><td>1025</td></tr><tr><td>102</td><td></td><td>5</td><td></td><td>1025 !!!</td></tr></table></body></font><p></p><h1 class="blog-sub-title">An Example Table</h1><p>In databases that support complex systems, it isn't always feasible to prevent duplicate keys from occurring. What's important is being able to deal with them quickly and effectively before they taint your data.</p><p>Let's begin by separating the true duplicate values from overlapping keys.</p><p>Here's the product of amalgamating two data sources of actors.  You'll notice that there a couple of duplicated names, specifically JENNIFER DAVIS and NICK WAHLBERG:</p><p></p><font face="courier New"><body><table border="0"><tr><td><b>id</b></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><b>first_name</b></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><b>last_name</b></td></tr><tr><td colspan="5">--------------------------------------</td></tr><tr><td>10</td><td></td><td>PENELOPE</td><td></td><td>GUINESS</td></tr><tr><td>12</td><td></td><td>NICK</td><td></td><td>WAHLBERG</td></tr><tr><td>14</td><td></td><td>ED</td><td></td><td>CHASE</td></tr><tr><td>22</td><td></td><td>JENNIFER</td><td></td><td>DAVIS</td></tr><tr><td>23</td><td></td><td>JOHNNY</td><td></td><td>LOLLOBRIGIDA</td></tr><tr><td>27</td><td></td><td>BETTE</td><td></td><td>NICHOLSON</td></tr><tr><td>34</td><td></td><td>GRACE</td><td></td><td>MOSTEL</td></tr><tr><td>41</td><td></td><td>NICK</td><td></td><td>WAHLBERG</td></tr><tr><td>39</td><td></td><td>JOE</td><td></td><td>SWANK</td></tr><tr><td>23</td><td></td><td>CHRISTIAN</td><td></td><td>GABLE</td></tr><tr><td>22</td><td></td><td>JENNIFER</td><td></td><td>DAVIS</td></tr></table></body></font><p></p><p>Nick Walberg would be an instance of Duplicate Meaning, which we explored in the last blog.  JENNIFER DAVIS, on the other hand, appears in two records with the same key of 22.  There is also a duplicated key that is associated with two unrelated actors: #23 for JOHNNY LOLLOBRIGIDA and CHRISTIAN GABLE.  With regards to the duplicated keys of 22 and 23, the first is a true duplicate, whereas the second only needs a new key to be generated for one of the records.</p><h1 class="blog-sub-title">Identifying and Counting Duplicates</h1><p>The following query will identify all of the records of the above table that share a common id.  I recommend using the MySQL group_concat() function to format duplicated rows together on one line:</p><p></p><font face="Courier New"><body><table border="0"><tr><td>SELECT</td></tr><tr><td>&nbsp;&nbsp;COUNT(*) as repetitions,</td></tr><tr><td>&nbsp;&nbsp;group_concat(id, ' (', last_name, ', ', first_name, ') '  SEPARATOR ' | ')</td></tr><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;as row_data</td></tr><tr><td>FROM amalgamated_actors</td></tr><tr><td>GROUP BY id</td></tr><tr><td>HAVING repetitions > 1;</td></tr></table></body></font><p></p><font face="courier New"><body><table border="0"><tr><td><b>Repetitions</b></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><b>row_data</b></td></tr><tr><td colspan="3">-------------------------------------------------------------</td></tr><tr><td>2</td><td></td><td>22 (DAVIS, JENNIFER) | 22 (DAVIS, JENNIFER)</td></tr><tr><td>2</td><td></td><td>23 (LOLLOBRIGIDA, JOHNNY) | 23 (GABLE, CHRISTIAN)</td></tr></table></body></font><p></p><p>If you ever wanted to find all duplicates - that is Duplicate Meaning and Non-unique Key duplicates - at the same time, you can combine the above query with one that checks for duplicated names using the UNION operator: </p><font face="courier New"><table><tr><td>SELECT</td></tr><tr><td>&nbsp;&nbsp;COUNT(*) as repetitions,</td></tr><tr><td>&nbsp;&nbsp;group_concat(id, ' (', last_name, ', ', first_name, ') '  SEPARATOR ' | ')</td></tr><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;as row_data</td></tr><tr><td>FROM amalgamated_actors</td></tr><tr><td>GROUP BY id</td></tr><tr><td>HAVING repetitions > 1</td></tr><tr><td>UNION</td></tr><tr><td>SELECT</td></tr><tr><td>&nbsp;&nbsp;COUNT(*) as repetitions,</td></tr><tr><td>&nbsp;&nbsp;group_concat(id, ' (', last_name, ', ', first_name, ') '  SEPARATOR ' | ')</td></tr><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;as row_data</td></tr><tr><td>FROM amalgamated_actors</td></tr><tr><td>GROUP BY last_name, first_name</td></tr><tr><td>HAVING repetitions > 1;</td></tr></table></font><p></p><p>That highlights all the duplicates in one result set:</p><p></p><font face="courier New"><body><table border="0"><tr><td><b>Repetitions</b></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><b>row_data</b></td></tr><tr><td colspan="3">-------------------------------------------------------------</td></tr><tr><td>2</td><td></td><td>22 (DAVIS, JENNIFER) | 22 (DAVIS, JENNIFER)</td></tr><tr><td>2</td><td></td><td>23 (LOLLOBRIGIDA, JOHNNY) | 23 (GABLE, CHRISTIAN)</td></tr><tr><td>2</td><td></td><td>41 (WAHLBERG, NICK) | 12 (WAHLBERG, NICK)</td></tr></table></body></font><h1 class="blog-sub-title">Conclusion</h1><p>Crafting a query to identify duplicate keys in MySQL is relatively simple because you only need to group on the key field and include the <i>Having COUNT(*) > 1</i> clause.  In a future article, we'll review some different approaches for deleting duplicate rows and updating keys.</p>]]></description>
</item>
<item>
<title>How to Spot and Delete Values with Duplicate Meaning in MySQL (Part 1)</title>
<link>http://www.navicat.com</link>
<description><![CDATA[<b>December 21, 2017</b> by Robert Gravelle<br/><br/><p>One of the DBA's biggest annoyances is dealing with duplicate data.  No matter how much we try to guard against it, duplicates always mange to find their way into our tables.  Duplicate data is a big problem because it can affect application views (where each item is supposed to be unique), skew statistics, and, in severe cases, increase server overhead.</p><p>In this tip, we'll learn how to recognize duplicate data in MySQL, as well as how to delete them without removing precious valid data.</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20171221/duplicates.png" style="max-width: 100%;"></td></tr><h1 class="blog-sub-title">Duplicate Types</h1><p>Most of the duplicate records that you'll encounter are one of two distinct types: Duplicate Meaning and Non-unique Keys.  In this instalment we'll be dealing with Duplicate Meaning; we'll address Non-unique Keys in the next one.</p><h1 class="blog-sub-title">When a Duplicate is not a Duplicate</h1><p>Duplicate Meaning is the most common type of duplicate.  It's a situation where two or more fields' contents are not the same, but their meaning is.  You could think of it as a semantic duplicate.</p><p>Consider the following table excerpt:</p><font face="courier New"><body><table border="0"><tr><td><b>movie_name</b></td><td><b>media</b></td></tr><tr><td colspan="2">---------------------------</td></tr><tr><td>ACADEMY DINOSAUR</td><td>Theatre</td></tr><tr><td>ACE GOLDFINGER</td><td>Television</td></tr><tr><td>ADAPTATION HOLES</td><td>Theatre</td></tr><tr><td>AFFAIR PREJUDICE</td><td>Theatre</td></tr><tr><td>AFRICAN EGG</td><td>TV</td></tr></table></body></font><p>In the media column, the entries "Television" and "TV" have the same connotation, but expressed differently.  This issue is often caused by the use of free-text input where a limited dropdown would have been a better choice.</p><p>This type of duplication can be very challenging to deal with because you can't exclude duplicates using a SELECT DISTINCT.</p><p>There are two ways to deal with this problem:</p><ul style="list-style-type:decimal;" class="blog-list"><li>Select data using REPLACE() to swap out values that we don't want with those that we want to see instead:</li><p></p>    <font face="courier New"><body><table border="0"><tr><td>SELECT DISTINCT</td><td>movie_name,</td></tr><tr><td></td><td>REPLACE(media, "TV", "TELEVISION") as media,</td></tr><tr><td>FROM   films;</td><td></td></tr></table></body></font><p></p><li>Update the actual table data.  Here's a statement that updates all instances of TV with the preferred TELEVISION value:</li><p></p><font face="courier New"><body><table border="0"><tr><td>UPDATE films</td></tr><tr><td>SET media = REPLACE(media, "TV", "TELEVISION")</td></tr><tr><td>WHERE media = "TV";</td></tr></table></body></font></ul><p></p><p>Here's a real-life example that I came across only a month ago!</p><p>Somehow, some unwanted curly apostrophes found their way into our data.  Notice the O'BRIEN and O'BRIEN entries:</p><font face="courier New"><body><table border="0"><tr><td><b>first_name</b></td><td><b>last_name</b></td></tr><tr><td colspan="2">---------------------</td></tr><tr><td>PENELOPE</td><td>GUINESS</td></tr><tr><td>CONAN</td><td>O'BRIEN</td></tr><tr><td>ED</td><td>CHASE</td></tr><tr><td>JENNIFER</td><td>DAVIS</td></tr><tr><td>CONAN</td><td>O'BRIEN</td></tr></table></body></font><p>We can deal with this problem in the same way we did above:</p><ul style=list-style-type:decimal;" class="blog-list"><li>Select data using REPLACE() to swap out curly apostrophes with regular single quotes so that we're always dealing with the same character:</li><p></p><font face="courier New"><body><table border="0"><tr><td>SELECT DISTINCT</td><td>first_name,</td></tr><tr><td></td><td>REPLACE(last_name, "'", "'") as last_name,</td></tr><tr><td>FROM   actors</td><td></td></tr><td colspan="2">WHERE  REPLACE(last_name, "'", "'") like "O'BRIEN";</td></table></body></font><p></p><li>Update the actual table data.  This statement updates all apostrophes in the last_name column with regular single quotes:</li><p></p><font face="courier New"><body><table border="0"><tr><td>UPDATE actors</td></tr><tr><td>SET last_name = REPLACE(last_name, "'", "'")</td></tr><tr><td>WHERE last_name like "%'%";</td></tr></table></body></font><p></p></ul><h1 class="blog-sub-title">Conclusion</h1><p>Duplicate records, doubles, redundant data, duplicate rows; whatever you want to call them, they are one of the biggest banes in a DBA's life.  Nevertheless, it's crucial that you weed them out on a regular basis, lest you want to generate faulty statistics and confuse your users who interact with the database.</p>]]></description>
</item>
<item>
<title>Create a Model from a Database in Navicat</title>
<link>http://www.navicat.com</link>
<description><![CDATA[<b>December 13, 2017</b> by Robert Gravelle<br/><br/><p>A database model is a type of data model that determines the logical structure of a database and fundamentally determines in which manner data can be stored, organized and manipulated. There are many kinds of data models, but the most popular type is the relational model, which uses a table-based format.</p><p>Usually, the data warehousing staff of a business will design one or more types of data models in order to most effectively normalize the tables and pan how to most efficiently store and retrieve business data.  Another advantage of doing this exercise upfront is that many professional tools like Navicat can utilize the models as plans and build the database according to their specifications.</p><p>That being said, it is an unfortunate fact that all-too-often, data models get misplaced or deleted over time.  In that event, DBAs have no recourse but to either redraft the models from scratch or, if they're in the know, let their Database Management Tool create models for them based on the existing database.</p><p>In today's tip, we'll learn how to create a model from a variety of database objects in Navicat Premium.</p><h1 class="blog-sub-title">Launching the Wizard</h1><p>The process of extracting design information from a software product is known as reverse engineering.  In Navicat, you can reverse engineer a database/schema, tables or views to a physical model.</p><p>To reverse engineer a database schema, right-click it in the Navigation Pane and choose <b>Reverse Schema to Model</b> from the popup menu:</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20171213/Reverse Schema to Model menu item.jpg" style="max-width: 100%;"></td></tr><p>Navicat will then generate a physical model from the selected schema and open it in a new Model window:</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20171213/untitled model of sakila db.jpg" style="max-width: 100%;"></td></tr><p>You can then work with the new model just as you would one that you created from scratch.  For example, you can add relationships, move objects around, and save the model.</p><h1 class="blog-sub-title">Reversing Tables to Model</h1><p>Individual tables or views may be reverse engineered into physical models as well by right-clicking them in the Navigation Pane and selecting <b>Reverse Tables to Model</b> from the popup list:</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20171213/reverse tables to model menu item.jpg" style="max-width: 100%;"></td></tr><p>That will open the selected table in a new Model window:</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20171213/actor table model.jpg" style="max-width: 100%;"></td></tr><h1 class="blog-sub-title">Selecting Multiple Tables/Views</h1><p>It is also possible to select more than one table or view by selecting them in the Objects pane:</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20171213/selecting multiple tables.jpg" style="max-width: 100%;"></td></tr><p>Right-clicking anywhere within the selection and choosing <b>Reverse Tables to Model</b> from the popup list will now open those tables/views in a new Model window:</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20171213/multiple tables in model window.jpg" style="max-width: 100%;"></td></tr><h1 class="blog-sub-title">Importing Databases, Schema, Tables or Views from the Model Window</h1><p>Navicat also supports the importing of databases, schema, tables or views from the Model window. A step-by-step wizard is provided to guide you through the import process.</p><ul style="list-style-type:decimal;" class="blog-list"><li>Begin by opening a new Model window, either by:</li>  <p/><ul style="list-style-type:lower-alpha;" class="blog-list"><li>Clicking the <b>Model</b> button on the main toolbar followed by the <b>New Model</b> button on the Objects toolbar:</li><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20171213/new model button.jpg" style="max-width: 100%;"></td></tr><p>OR</p><li>Selecting <b>File > New > Model</b> from the main menu:</li><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20171213/new model menu item.jpg" style="max-width: 100%;"></td></tr></ul>  <p/><li>Enter the Database Vendor and Version number in the New Model dialog and click <b>OK</b> to open a new Model window for that product:</li><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20171213/New Model dialog.jpg" style="max-width: 100%;"></td></tr>  <p/><li>Select <b>File -> Import from Database</b> from the Model window menu:</li><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20171213/Import from Database menu item.jpg" style="max-width: 100%;"></td></tr>  <p/><li>On the Import from Database dialog, select a Connection.</li>  <p/><li>Choose the databases, schemas, tables or views you want to import:</li><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20171213/Import from Database dialog.jpg" style="max-width: 100%;"></td></tr>  <p/><li>Click <b>Start</b> to create the model from the selected objects.</li></ul><h1 class="blog-sub-title">Conclusion</h1><p>Should the need ever arise to reverse engineer database objects into a model, Navicat has you covered.  Available in Navicat Premium and Enterprise Editions, the Reverse Engineering feature takes the challenge out of physical model creation from databases, schema, tables or views.</p>]]></description>
</item>
<item>
<title>Performing Database-wide Searches in Navicat</title>
<link>http://www.navicat.com</link>
<description><![CDATA[<b>December 6, 2017</b> by Robert Gravelle<br/><br/><p>Whether your database of choice is app like MySQL, MariaDB, SQL Server, Oracle, and PostgreSQL, or a cloud-based service such as Amazon RDS, Amazon Aurora, Amazon Redshift, SQL Azure, Oracle Cloud and Google Cloud, you'll inevitably be looking for a piece of data whose location eludes you.  For those occasions, you'll be happy that you use one of Navicat's award winning database administration products.</p><p>Available in all editions, with the except of Navicat Essentials, the Find In Database/Schema tool allows you to search tables, views and even object structures within a database and/or schema.</p><p>You'll find it under the Tools item in the main menu:</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20171206/find_in_db_menu_item.jpg" style="max-width: 100%;"></td></tr><h1 class="blog-sub-title">Searching for Data</h1><p>Suppose that we were looking for a record associated with the word jungle.  You could bushwhack your way through each and every table or simply enter the search term in the Find in Database screen.  There are four Search Modes to choose from: Contains, Whole Word, Prefix and even using powerful Regular Expression pattern matching.</p><ul style="list-style-type:disc;" class="blog-list"><li>Contains will match your search term against any part of a text value.</li><li>Whole Word will only match if the text value is exactly the same as the search term.</li><li>Prefix matches the start of a text value.</li><li>Regular Expression apply pattern matching to text values.</li></ul><p>Matching is performed on a case insensitive basis unless you uncheck the Case Insensitive box.</p><p>The results of your search are displayed in the Find results pane.  The table/view Name is displayed, along with the Number of Matched Records.  I got two matches for jungle:</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20171206/find_in_db_data_results.jpg" style="max-width: 100%;"></td></tr><p>To take a better look at the matched rows, just double-click the item in the Find results pane.  That will open a new Query Editor with only the row that contains the match:</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20171206/data_search_result_in_query_editor.jpg" style="max-width: 100%;"></td></tr><h1 class="blog-sub-title">Searching for Object Structures</h1><p>An Object Structure search looks for matches against database object names.  These would include Tables, Views, Functions, Queries, Indexes, Triggers, Events and/or Materialized Views.</p><p>The Search Modes include the same four as in data searches and can either be case sensitive or insensitive.</p><p>For this search I set the Search Mode to Prefix so that the Find In Database/Schema tool would find object names that begin with my search term.  Not surprisingly, in a movie rental store database, a Prefix of film_ hit a few times!</p><p>Below are the results.  Notice that the object type and match are both included in the Find results pane. The search term text within Matched Content is highlighted in red as well:</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20171206/find_in_db_object_structure_results.jpg" style="max-width: 100%;"></td></tr><p>This time, double-clicking an item in the Find results pane opens the appropriate editor for that database object.  For example, clicking the last match in the list for the inventory table opens the Table Editor with the matching field selected and highlighted:</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20171206/object_structure_search_result_in_table_editor.jpg" style="max-width: 100%;"></td></tr><h1 class="blog-sub-title">Conclusion</h1><p>The Find In Database/Schema feature makes searching for text content within data and object structure names so much easier than the alternative that you'll ask yourself how you every got by without it.  For more information on how to use the tool, there's a <a class="default-links" href=https://youtu.be/4Jf2_vKBDIQ target="_blank" >video</a> about that very subject on YouTube.</p>]]></description>
</item>
<item>
<title>Compare two MySQL databases for any differences</title>
<link>http://www.navicat.com</link>
<description><![CDATA[<b>October 16, 2017</b> by Gavin<br/><br/><p>The utility shows comparison between the data and objects from two databases to see differences. It acknowledges objects having separate definitions in both the databases and presents them in a separate style format of selection. Variations in the data are seen in standard form of CSV, VERTICAL, GRID or TAB.</p><p>Make use of notation db1: db2 and name both the databases to compare or just compare DB1 to compare two databases under similar name.</p><p>The comparison might just run against both databases of varied names on a singular server by suggesting only the server1 alternative. Users can also interlink to another serve by stipulating just the server 1 option. However, they can also link to another server by stipulating the server 2 alternative. Under such a condition, db1 is taken from server 1 while db2 is taken from server 2.</p><p>All the databases between both the servers can also be compared via the all option. Under such a situation, only the databases in common with similar name between the servers are efficiently compared. So, you do not have to be specified but server 1 and server 2 alternatives are needed. You can skip the comparison of some databases via the exclude option.</p><p>Remember the data shouldn't be changed during the comparison. You may see errors occur when data is changed during the comparative study.</p><p>The objects chosen in the database comprise of views, procedures, events, functions, triggers and tables. You can show the count for every object type via vv option.</p><p>The check is performed via tests. By default, when the first test fails, the utility stops, but with the help of run all tests options to run all the tests together irrespective of their final state.</p><h1 class="blog-sub-title">The tests comprise of:</h1><ul style="list-style-type:decimal;" class="blog-list"><li>Evaluate database definitions: ensure both the databases are present.</li><li>Evaluate the existence of objects in the two databases: ensure that both the databases acknowledges the objects.</li><li>Make a comparative study of object definitions: the objects are compared and differences shown.</li><li>Evaluate table row counts: ensure that the two database tables have similar row numbers.</li><li>Evaluate table data uniformity: it ensures both the changed rows and the missing rows from each table in the databases. The step is divided into two stages: firstly the complete table is compared between the table, but if it fails, then the program to search rows differences is implemented.</li></ul><p>You might wish to use  skip  xxx function to just run few tests. It is helpful when you want to synchronize two databases, to ignore running all the tests again and again in the procedure. Every test shows following results:</p><ul style="list-style-type:disc" class="blog-list"><b><li>Pass- the test is successful.</li></b><b><li>Fail- the test failed.</li></b><b><li>Skip- the test skipped because of a missing point.</li></b><b><li>Warn- the test witnessed an unusual error.</li></b><b><li>- -the test isn't right for this object.</li></b></ul><p>With the help of these results, you can find out whether the tests were successful or not and whether you need to conduct them again or not.</p>]]></description>
</item>
<item>
<title>Prepare to Migrate Databases to Amazon Aurora</title>
<link>http://www.navicat.com</link>
<description><![CDATA[<b>October 3, 2017</b> by Gavin<br/><br/><p>Being a MySQL compatible relational database engine, Amazon Aurora amalgamates safety, availability and speed of top notch commercial databases with the easiness and cost efficiency of open source database. The engine has been tagged at 1/10th of the price of the commercial engines.</p><p>After determining that Aurora is the database to be used for application development, the second stage is to choose on a migration methodology and to generate a database migration program.</p><p>Migration Factors: Source Database</p><p>There are two types of migration factors:</p><ul style="list-style-type:disc" class="blog-list"><li><b>Homogenous migrations</b> - Percona, MariaDB and MySQL to Amazon Aurora</li><li><b>Heterogeneous migrations</b> - Oracle, PostgresSQL, Microsoft SQL Server to Amazon Aurora</li></ul><h1 class="blog-sub-title">Homogeneous Migration</h1><p>For the source database you desire to migrate is amenable to MySQL 5.6 such as Percona or MariaDB, then you have the below stated migration methodologies:</p><p><b>RDS Snapshot migration:</b> for those who have AWS RDS system accessing their MYSQL Data Base server, then they just have to migrate the database snapshot to the AWS Aurora Database. For downtime migrations, you may either have to terminate your application or may just terminate writing to the database whilst migration and snapshot is in evolvement.</p><p><b>Migration with the help of native Navicat Tools:</b> one can make use of <a class="default-links" href="https://www.navicat.com/en/products" target="_blank">native Navicat tools</a> to migrate the plan from your DB server to AWS Aurora DB. With the help of this approach, you get more control over the database migration procedure.</p><p>Migration by utilizing AWS DMS: it is equipment rendered by AWS just to migrate he database scheme to AWS Aurora DB. Before making use of AWS DMS to shift the data, one needs to copy the database plan from the resource to the place where you have targeted via using native Navicat tools.</p><p>Making use of AWS DMS is a reliable idea when you do not have the experience to use native Navicat tools. It is provided with the option of having downtime as well as not having downtime methodology.</p><h1 class="blog-sub-title">Heterogeneous Migrations</h1><p>When the source database you wish to migrate isn't MySQL compliant database such as PostgresSQL, Oracle to AWS Aurora DB, then you have a number of options accessible to fulfill the migration procedure.</p><p><b>Schema Migration:</b> schema migration to Amazon Aurora from a non-MySQL compliant database can be accomplished by making use of AWS Schema Conversion Tool. It is a desktop app which assists you to convert your database plan from PostgreSQL, Microsoft SQL Server as well as Oracle database to an Amazon RDS MySQL DB or Amazon Aurora DB cluster.</p><p><b>Data Migration:</b> whilst assisting homogeneous migrations with zero downtime, AWS DMS (AWS Database Migration Service) assists constant replication over heterogeneous databases and is a priority alternative to move your resource database to your destination database, for migrations with downtime as well as migrations with near-zero downtime.</p><p>With the help of these migrations, you can effectively migrate database to Amazon Aurora. They are the simplest and easiest way to migrate database. So, choose any according to your compliance and then go for it.</p>]]></description>
</item>
<item>
<title>Manage your AWS Aurora databases with Navicat</title>
<link>http://www.navicat.com</link>
<description><![CDATA[<b>September 18, 2017</b> by Gavin<br/><br/><p>Now you have the availability of Navicat for Amazon Aurora Databases. You can now handle Amazon Aurora Databases via Navicat, the sturdiest powerful database manager, Graphical User Interface and admin tool.</p><p><b>Amazon Aurora</b> is a MySQL compliant, interactive database engine which interconnects the availability and speed of top notch commercial databases with easiness and cost efficiency of open source databases.</p><p><b>Navicat Premium</b> is one of the most prominent database management solutions for database development on all the leading platforms like Linux, Windows and MacOS. It permits you to connect to SQLite , SQL Server, Oracle, MySQL, PostgreSQL and MariaDB databases from just one app. It is basically installed on your computer and interconnects not just on-premises databases but also cloud database like Amazon Redshift, Amazon Aurora as well as Amazon RDS.</p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20170918/navicat-amzon-aurora.jpg" style="max-width: 100%;"></td></tr><p>Amazon eradicates the requirement of set up, operation and measure a relational database, permitting the users to concentrate on the database design and efficient management. Along with Amazon instance, Navicat gives you a top notch end to end database development experience.</p><h1 class="blog-sub-title">Manage AWS Aurora Database with Navicat on Windows as well as Mac.</h1><ul style="list-style-type:decimal" class="blog-list"><b><li>Go to Navicat Premium and Click File > New Connection > Amazon AWS and then finally Amazon Aurora.</li></b><b><li>Type in a suitable name that best describes your connection in the text box of Connection Name.</li></b><b><li>When you choose to Navicat Cloud feature, you can select to save the connection to My Connections or the assignments on Cloud from drop-down list of Add To. If you have chosen My Connections, then the settings are stored in the local device.</li></b><b><li>Type in the endpoint details of the cluster in the Endpoint and Port columns.</li></b><b><li>Type in your username and password.</li></b><b><li>Check your connection.</li></b></ul><h1 class="blog-sub-title">Migration</h1><p>Navicat renders you with an interactive and powerful GUI and provides a set of full-fledged specs for Amazon database development as well as maintenance. To enhance the efficacy and productivity for your database, it's Data Transfer feature assists you to transfer the data across several DBMS  local to SQL file, local to cloud and local to local. It allows you to perform automation work at periodic intervals and send alerts mails to mentioned recipients on job completion to assure your migration is well submitted and 100% successful.</p><h1 class="blog-sub-title">Amazon Web Services</h1><p>Amazon Web Services renders a complete bunch of cloud based products for your developmental needs and business requirements. It provides easy access to and simple handling of the services via a communicative web based user interface. Big companies and organizations rely on Amazon AWS because of its reliability and service level registrations. </p><p>Some of the <b>features offered by Navicat</b> are mentioned below:</p><ul style="list-style-type:disc" class="blog-list"><b><li>Unified data migration</li></b><b><li>Diversified manipulation equipment</li></b><b><li>Quick and reliable SQL editing</li></b><b><li>Smart Database designer</li></b><b><li>Productivity increment</li></b><b><li>Simple and easy collaborations</li></b><b><li>Enhanced secure connection</li></b></ul><p>With that being said, you can manage your AWS Aurora databases efficiently with navicat. It is reliable, fast, simple and convenient to handle. You will no longer need to go for anything else. </p>]]></description>
</item>
<item>
<title>How to optimize the MySQL Server</title>
<link>http://www.navicat.com</link>
<description><![CDATA[<b>September 4, 2017</b> by Gavin<br/><br/><p>There are optimization techniques for database server, majorly managing system configuration rather than tweaking SQL statements. It is suitable for DBAs who desire to assure performance as well as scalability over the servers they handle, for developer initiating installation scripts which comprise of establishing the database and for those running MySQL themselves for development, testing and more to enhance their productivity. </p><tr><td valign="middle"><img src="https://www2.navicat.com/link/Blog/Image/20170904/1200px-MySQL.svg_.png" style="max-width: 100%;"></td></tr><h1 class="blog-sub-title">System Factors</h1><p>Some system level aspects also impact the performance in a great way:</p><p><b>If you have sufficient RAM,</b> you can get rid of all swap devices. Often OS use a swap device in some regards regardless of having free memory.</p><p><b>Ignore exterior locking for MyISAM tables.</b> The default is for exterior locking to be restricted. The exterior locking and skip exterior locking alternatives unambiguously enable and disable exterior locking. Disabling exterior locking doesn't impact MySQL functionality till the time you run just one server. Make sure you take down the server before running myisamchk. On few systems, it is important to disable exterior locking because it won't work. </p><p>You cannot disable the external locking when you run several MySQL servers on the similar data, or when you run myisamchk to evaluate a table without seeing the server to level and lock the tables primarily. Remember that making use of several MySQL servers to evaluate the same data synchronously isn't usually recommended, except when you're utilizing NDB cluster.</p><h1 class="blog-sub-title">Optimizing Disk I/O</h1><p>It shows pathways to organize storage devices when you can devote better and quicker storage hardware to the database server.</p><p>Disk seeks are a big performance blockage. The issue becomes more obvious when the data amount commences to grow so big that efficient caching gets impossible. </p><p>Enhance the number of present disk spindles by symliking files to other disks or disks striping.</p><p>A good idea is to differ the RAID level according to the critical kind of data. </p><h1 class="blog-sub-title">Using NFS with MySQL</h1><p>You need to be cautious when thinking of using NFS with MySQL. Possible problems which differ by OS and NFS version comprise of:</p><ul style="list-style-type:disc" class="blog-list"><li>Log files and MySQL data files sited on NFS volumes get locked and are unavailable for usage.</li><li>Data inconsistencies produced because to messages received out of order or poor network traffic. To get rid of it, make use of TCP with hard and intr mount support.</li><li>High file size restrictions.</li></ul><h1 class="blog-sub-title">Use symbolic links</h1><p>You can shift database from database directory to any other place or replace it with symbolic links to a new place. You may wish to do this, for instance, to shift a database to a file system with higher free space or enhance your system's speed by spreading your table to varying disks.</p><p>The suggested idea to do it is to symlink complete database directories to a separate disk. Symlink MYISAM tables just as a last choice. </p><p><b>1.You can use symbolic links for databases on Unix<br>2.You can use symbolic links for MyISAM tables on Unix</br>3.You can use symbolic links for databases on Windows</b></p>]]></description>
</item>
</channel>
</rss>