Database Sharding

What's the difference between sharding DB tables and partitioning them? I take sharding to mean the partitioning of a table over multiple machines (over multiple database instances in a distributed database system - each having it's own replication node setup), whereas partitioning may just refer to the splitting up of a table on the same machine. So a… Continue reading Database Sharding


Mysql Like Query

Link B-Tree Index Characteristics   A B-tree index can be used for column comparisons in expressions that use the =, >, >=, <, <=, or BETWEEN operators. The index also can be used for LIKE comparisons if the argument to LIKE is a constant string that does not start with a wildcard character. For example, the following SELECT statements use indexes: SELECT * FROM tbl_name WHERE key_col LIKE… Continue reading Mysql Like Query

Schema vs Database

Depends on the database server. MySQL doesn't care, its basically the same thing. In MySQL, physically, a schema is synonymous with a database. You can substitute the keyword SCHEMA instead of DATABASE in MySQL SQL syntax, for example using CREATE SCHEMA instead of CREATE DATABASE. Some other database products draw a distinction. For example, in… Continue reading Schema vs Database