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

Advertisements

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

Why is Redis So Fast

Redis is single-threaded with epoll/kqueue and scale indefinitely in terms of I/O concurrency. In server-side software, concurrency and parallelism are often considered as different concepts. In a server, supporting concurrent I/Os means the server is able to serve several clients by executing several flows corresponding to those clients with only one computation unit. In this… Continue reading Why is Redis So Fast

Database Concept

ACID Properties  - 1, 2, 3, 4 In order to perform a Transaction in a database system and to make sure it works without any issues, there are few rules a Database Transaction should follow. These rules are the standards across all Relational Database systems (RDBMS) and are called ACID rules. ACID stands for Atomicity, Consistency, Isolation and Durability. So let’s check what all these Rules… Continue reading Database Concept