Friday 30 December 2011

Automatic MySQL Database Backup and Restore

It's likely that you're already familiar with MySQL, the open source software program that allows you to create, maintain, and manage relational databases. After all, it is by far the most popular of all the database management systems designed especially for internet content. MySQL is used by nearly all the biggest names on the web (i.e., Google, YouTube, Wikipedia, Facebook) thanks to its reliability and convenience. High-traffic websites, new start-ups, personal sites, informational resources-- most websites rely on MySQL for comprehensive storage of important data such as user info, indices, and recent activity. If you've ever needed to organize data pertaining to your, your company's, and/or your client's website, you've probably researched and utilized this software to accomplish the task.

Chances are though that you aren't yet familiar with a lot of the pertinent software offered to help make your MySQL far more pleasant. Of particular interest are those programs designed to both automatically backup and restore your MySQL database. They make the time- and labor-intensive process of backing up data more streamlined. Whether your website is a one-man venture or multi-million dollar operation, this can free up a lot of time and funds better spent elsewhere. On a more basic level, this automatic backup also means less worrying. If something goes wrong (say, for example, your MySQL server dies or a table crashes), you know everything will make it. Restoring the website and database should even take less time; this means your visitors aren't detracted from your page a second longer than necessary. It allows your business to grow while also guaranteeing that all-too-common issues like excessive downtime and permanent data loss don't damage its reputation.

A quality automatic MySQL backup program will offer the following basic features: compatibility with all operating systems, support for all MySQL character sets, store engines, and field and table types, ability to backup data to SQL files, PHP files, different servers, or different databases, and an easy-to-use interface. Typically, a software program intended to automatically backup and restore MySQL databases is a self-contained utility. When you initially run it, you'll be presented with a simple set-up wizard to guide you through choosing presets and schedules. Any program worth its salt will allow you to set up multiple tasks for varying degrees of backup. Tasks may be added, edited, or deleted at any time with an equally minimal amount of effort and hassle. Once you've set things up, the program will live up to its description as "automatic." This is in definite contrast to the labor involved with routine, manual backups. The software will follow your instructions, reliably and without folly.

You should also, with a good program, be able to disable an automatic shutdown, log off, or suspension from occurring while the operation is being performed so as to avoid disruption. Furthermore, make sure the software you choose offers an e-mail alert in the rare case that an error happens or a task fails. Regarding failure, by the way, a good program will be just as automatic in the restoration of the database in the instance of any problem with your MySQL server. Automatic restoration is set up and enabled with tasks-just like automatic backup.

Many of the options available offer both a regular and professional version. Software available in this dual format is typically more developed, secure, and stable. The basic software will offer all the key functions while the professional versions tend to pack more features, more punch, and run more smoothly on newer operating systems.

Regardless of which version you choose, you'll be progressing towards an ever better website by making the investment in such complementary MySQL software. Think about it-how often do you follow routine maintenance schedules (be it for MySQL, your hard drive, or even your car) to a tee? By eliminating the bother, risk, and time usually required by such tasks, you can devote more time to expanding your site or actually enjoying the profits garnered from it.

Article Source: http://EzineArticles.com/3710353

Thursday 29 December 2011

How to Write SQL to Display Data From MySQL Databases

SQL is short for Structured Query Language, which is broadly used in a database system for data programming, such as structure designing and data manipulation. While it may seem easy at first glance, it takes time and practice to be perfect at this data language. Queries can be as simple as a single keyword or as sophisticated as a sentence with 20 keywords or even a whole structured routine.

MySQL is the most popular relational database system in the world, as the name suggests, it's SQL compatible. It will be our subject in this series of articles in teaching you how to use the basic SQL commands to operate on databases and data tables.

How to display data from MySQL database?

The simplest SQL query to display data from a MySQL table should be:

SELECT * FROM table1;

Which selects all records by fields * from table table1. SELECT is the SQL command to display data or output something. The asterisk simply means all fields. There can be a conditional clause that indicates the conditions that must be met to display the data:

SELECT * FROM table1 WHERE id

Which selects and outputs all fields of all records from table1 that has an id field with value smaller than 100. You can spice things up by:

SELECT field1, field2, FROM table1 WHERE id = 50;

Which selects field1 and field2 only of all the records in table1 that has an id smaller than 100 AND larger than or equals to 50.

Therefore, AND means both conditions should be met to have a positive return. Other than AND, you have other logic operators such as OR and XOR. By OR you mean either this or that would do. By XOR, however, it means only one of them should be true and no more.

You can also have multiply stacked SELECT queries such as:

SELECT * FROM (SELECT * FROM table1);

Which is essentially the same with just the clause. This is useful when you need to combine or filter the selected results on multiple steps from more than one tables.

SELECT has a lot more uses, it can be used for numeric calculations:

SELECT 123 + 567;

Or date:

SELECT GETDATE();

Or count the total number of records in a table:

SELECT COUNT(*) FROM table1;

Otherwise, you may want to order the results by a specific field:

SELECT * FROM table1 ORDER BY id;

Which would output the results ordered by the id field in ascendant order. To order the results in descendant order:

SELECT * FROM table1 ORDER BY id DESC;

Article Source: http://EzineArticles.com/3547401

Wednesday 28 December 2011

PHP 5 - The King Of Web Development Languages

Since the release of PHP version 5, the woes of developers have indeed finally come to an end. PHP 5 is essentially the most robust version of this web coding language that comes integrated with support for Object Oriented Programming as well as enhanced MySQL and XML. These three essential components of PHP 5 have been completely recoded in order to unleash their full capability. Apart from this, there are tons of other improvements that have been inculcated within this release. Here is a brief overview of all good things that happened to PHP 5:

Enhanced Support For OOP:

Before this 5th release of PHP, some developers were really frustrated due to limited OOP support. However, this version of PHP carries a huge variety of classes and public / private methods that help is making PHP the king of all web development application languages. The PHP 5 comes integrated with constructors, final properties and method, enhanced interfaces, destructors, class type hints and objects plus a complete collection of magical methods.

Recoded and Enhanced MySql:

PHP and MySQL together are deployed for programming robust and scalable web applications. Although earlier version of PHP was acting OK with MySQL, but this version comes with even better enhancements. Components like prepared statements and inbound / outbound parameters have been fully recoded along with SSL connection and Multi Query functions. MySQLi has also been deployed to gather some juice from newly OOP functionality added to

New XML Extension:

1. The new XML extension integrated with this release of PHP include:
2. Unified whole extension
3. Single Library Standardization
4. Full W3C Compliance
5. Easy to Handle and Worthy XML Tool
6. Effective and Quick Processing of Data
SQLite Database Integration:
SQlite is a lighter version of MySQL that doesn't requires you to install complete database and only needs a single library to store and query the required data. PHP 5 comes packaged with SQLite that is bound to operate on all PHP 5 installations. The SQLite support of sub queries, triggers and transaction makes it a wonderful add-on.

Revamped Exception Handling:

This new version of PHP comes with a highly enhanced and clear error handling interface that wasn't present in previous releases. The new and revamped exception / error handling allows you to separate coding logic from exception handling and parsing them to different and associated code joints.

Apart from these important changes in PHP 5, some minor enhancements include better SOAP deployment with WSDL file and Iterators. Iteration is a new addition to PHP 5 and allows programmers to clean jumbled details from their code.

Article Source: http://EzineArticles.com/6150961