Recently in Tech Category

Do you know MySQL Sample Database

| No Comments | No TrackBacks
For language learners, "The best way to learn a foreign language is to speak it" (via antimoon.com), which must be the most frequently repeat pieces. This approach for learning new staff is also useful for learning MySQL, with a little bit modify, "The best way to learn MySQL is to use it", which is the fast way to familiar with it.

After you install MySQL on your PC, Mac OS, Linux, whatever system you used, but with the blank database of default installation, you don't have a chance to have fun with it. So, MySQL also provides some sample databases to help you out.

1. employee sample database

Quote from MySQL AB,

"The Employees sample database was developed by Patrick Crews and Giuseppe Maxia and provides a combination of a large base of data (approximately 160MB) spread over six separate tables and consisting of 4 million records in total. The structure is compatible with a wide range of storage engine types. Through an included data file, support for partitioned tables is also provided.

In addition to the base data, the Employees database also includes a suite of tests that can be executed across the test data to ensure the integrity of the data that you have loaded. This should help ensure the quality of the data during initial load, and can be used after usage to ensure that no changes have been made to the database during testing."

2. world sample database

Maybe 10 years ago, world sample database is the only one that MySQL AB provided for users, which has just 3 tables, cities, counties and langs. MySQL AB obtained from other outside source, so they don't have the ability to control it and don't have the right to bundle it inside MySQL, because it is not intellectual property of mysql. Additionally, users found lots of flaws of this sample, such as below:

  • No table type diversity, not a lot of data type diversity
  • No MySQL 5 features
  • Not a lot of data
  • Not really used in tutorials and articles because it's not robust enough
which means this sample is totally out of date, but still can find a shadow inside the newer sample database history documentation.

The world sample database provides a set of tables containing information on the countries and cities of the world and is useful for basic queries, but lacks structures for testing MySQL-specific functionality and new features found in MySQL 5.

3. Sakila sample database (require MySQL 5.0 or later)

Sakila is the official name of MySQL dolphin (the logo). The name come from Ambrose Twebaze, a open source software developer from Swaziland, Africa. This sample database was designed as a replacement to the world sample database. Development of the Sakila sample database began in early 2005. Early designs were based on the database used in the Dell whitepaper Three Approaches to MySQL Applications on Dell PowerEdge Servers.

4. menagerie database

5. Wikipedia:Database download (Link)

If you need big data sets, you may want to take a peak at wikipedia, which offers free copies of all available content to interested users, for "mirroring, personal use, informal backups, offline use or database queries". Or you can go straight to public data dumps, which you can find on http://download.wikimedia.org/, listed by UTC time.


Yesterday afternoon, when I worked on the assignment 2 of Internet Programming with CodeIgniter. The problem below always occurred am I'm struggling with solving this weird problem.

    A PHP Error was encountered
    Severity: Notice
    Message: Undefined index: Subject
    Filename: libraries/Email.php
    Line Number: 930 

At first, I thought the reason of this error occurred is related to the codeigniter email function within my confirmation controller. After I review my code several time, I still cannot get a clue for what's the issue there.

if ($this->protocol == 'mail')
{
    $this->_subject = $this->_headers['Subject'];
    unset($this->_headers['Subject']);
} 

I guess the problem is the programme flow is trying to ccess the 'Subject' index and which has unset in earlier time. I found a solution post "Bug with Email Class: Undefined Subject, although it's sent!!!" to confirm my guess. The code should be like this below an it does work. <
if ($this->protocol == 'mail')
{
    if (array_key_exists('Subject', $this->_headers))
    {
        $this->_subject = $this->_headers['Subject'];
        unset($this->_headers['Subject']);
    }
} 

MySQL 5 Certification Study Guide

| No Comments | No TrackBacks
I will complete my master degree in UTS at the end of this year, so the task of getting a good job for me become essential day by day. Although I'm kind of interesting of the concept of DBA of Oracle, MySQL, when I took the course of Advance Database in uni, the subject didn't told me so much things related to DBA but for Data warehouse. After that, I think that I need to study it by myself, not be told from the uni lecture. Certification always a good way to guide you to learn the important bits of that certain universe. 
In this case, for MySQL version 5.0, this book "MySQL 5 Certification Study Guide" will be the guidance for me to familiar with the "Core" of MySQL. There are something need to know about MySQL version exams:

  • There are two levels of certification to pass, they are called Developer and Database Administrator (DBA) certifications.
  • The titles that belong with the two certification levels will be Certified MySQL Developer (CMDEV) and Certified MySQL Database Administrator (CMDBA), respectively.
  • There will be two exams per certification level. If you wish to attain both titles, you will need to pass four exams.
Passing a MySQL certification exam is no easy feat. The statistics tell the story: 40 to 50 percent will fail an exam the first time they take it. This guide is a primer for the exams, but not a replacement for the MySQL Reference Manual or any other MySQL documentation.

Categories

Pages

OpenID accepted here Learn more about OpenID

About this Archive

This page is an archive of recent entries in the Tech category.

Reading is the previous category.

Find recent content on the main index or look in the archives to find all content.