Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 DATABASE


  How to optimize MySQL insert statement

For a big data system, one problem is the data access efficiency, one more problem is that the data insertion is very slow. We had a service system, the data loading process would take 4-5 hours. This time consuming operation is risky since if the program is interrupted during the loading process, it might be rerun, this will be troublesome. So it's necessary to improve the insertion efficiency for big data systems.Here we provide two optimization suggestions.1. Combine multiple insert statementCommon insert statement use is:INSERT INTO `insert_table` (`datetime`, `uid`,&nb...

9,109 0       MYSQL OPTIMIZATION INSERT


  How does MySQL handle DROP TABLE

A few days ago, when executing DROP TABLE in MySQL, all processes including DDL and DML were hung until DROP TABLE was completed. I am confused about this phenomenon.I have reviewed the source codes of MySQL to check how MySQL internally handle DROP TABLE.When user trigger DROP TABLE command:########################MySQL SERVER drop table########################/* Sql_table.cc  delete (drop) tables. */bool mysql_rm_table( )  /*   Execute the drop of a normal or temporary table */  int mysql_rm_table_part2 ()    /* Remove matching tables from the HANDLER&...

4,041 1       MYSQL DROP TABLE


  10gen provides free training courses for MongoDB

MongoDB is an open source document oriented database, developed with C++, it is to solve some real problems existing among development communities. In October 2007, MongoDB development began at 10gen, in 2009, MongoDB was open sourced as a standalone product. 10gen provides technical support, training and consultancy service.According to 10gen education, 10gen will provide some training courses for MongoDB starting from 22 October, 2012. Now it's available for registration.There are two courses currently :M101 and M102, target to developers abd DBAs. The courses will end on 10 December 2012, 1...

4,305 0       COURSE FREE TRAINING MONGODB 10GEN


  SQLite C/C++ function interfaces

Some simple introduction to the SQLite function interfaces. First let's check some error codes defined in SQLite3 (They are in SQLite3.h file in the SQLite installation).#define SQLITE_OK           0   /* Successful result */  /* beginning-of-error-codes */  #define SQLITE_ERROR        1   /* SQL error or missing database */  #define SQLITE_INTERNAL     2   /* Internal logic error in SQLite */  #define SQLITE_PERM    &nbs...

4,890 0       SQLITE FUNCTION INTERFACE C/C++


  Work with MySQL character set and collation

For non-English websites, they often have to deal with character set and collation if they want to store data to and read data from databases with other languages. Character set tells the database which kind of character encoding scheme to use to store or read data, collation can be simply understood as a subset of character set, it tells the database how to sort data. We talk about working with character set and collation of MySQL today.  In MySQL, if we want to store Chinese, Japanese or other languages other than English, we may need to set the relative character set for the database, ...

11,183 0       MYSQL CHARACTER SET COLLATION CHINESE QUESTION MARK


  A serious security vulnerability found in MySQL/MariaDB

Recently a serious security vulnerability was found in MySQL/MariaDB. It relates to the access to the database. The issue is described below.When a user connects to MariaDB/MySQL, a token (SHA over a password and a random scramble string) is calculated and compared with the expected value. Because of incorrect casting, it might've happened that the token and the expected value were considered equal, even if the memcmp() returned a non-zero value. In this case MySQL/MariaDB would think that the password is correct, even while it is not.  Because the protocol uses random strings, the probab...

5,432 0       MYSQL BUG PASSWORD FIX MARIADB MEMCMP()


  Can API be copyrighted? At least Oracle hopes so

 The result of the lawsuit case war between Oracle and Google is clearer now. The court said that 9 lines of code of Android has violated intellectual property right, these 9 lines of code can be ignored relative to the number of codes for the whole Android system. But just like LinuxToy points out that the reasons why this case catches so much attention are : 1). The amount of money Oracle asked from Google is $1 billion; 2). The statement says Java language itself doesn't violate the intellectual property rights, but the used public API did.If Oracle wins the case, it means that API can...

7,192 0       GOOGLE API ORACLE COPYRIGHT LAWSUIT CASE


  Three things you should never put in your database

As I've said in a few talks, the best way to improve your systems is by first notdoing "dumb things". I don't mean you or your development staff is "dumb", it'seasy to overlook the implications of these types of decisions and not realize howbad they are for maintainability let alone scaling. As a consultant I see this stuffall of the time and I have yet to ever see it work out well for anyone.Images, files, and binary dataYour database supports BLOBs so it must be a good idea to shove your files in thereright? No it isn't! Hell it isn't even very convenient to use with many DB languagebindings...

3,274 0       DATABASE IMAGE LOG BLOB