Monthly Archives: April 2014

Interfaces and Abstract Class

Use abstraction if you have default methods (with accompanying code) for inheritors. Use interfaces if you just need to make sure that classes inheriting from this parent should implement all methods defined. I use abstract classes when I want the … Continue reading

Posted in PHP | Leave a comment

Database Normalization

Normalization is a systematic approach of decomposing tables to eliminate data redundancy and undesirable characteristics like Insertion, Update and Deletion Anamolies. It is a multi-step process that puts data into tabular form by removing duplicated data from the relation tables. … Continue reading

Posted in Database | Leave a comment

Sharding

Sharding is the equivalent of “horizontal partitioning”. When you shard a database, you create replica’s of the schema, and then divide what data is stored in each shard based on a shard key. For example, I might shard my customer … Continue reading

Posted in Database | Leave a comment

MySQL Cluster vs MySQL Replication

MySQL currently supports two different solutions for creating a high availability environment and achieving multi-server scalability. MySQL Replication The first form is replication, which MySQL has supported since MySQL version 3.23. Replication in MySQL is currently implemented as an asyncronous … Continue reading

Posted in Database | Leave a comment

Storage Engines for MySQL Tables

MySQL provides various storage engines for its tables as below: MyISAM InnoDB MERGE MEMORY (HEAP) ARCHIVE CSV FEDERATED NDB EXAMPLE BLACKHOLE Each storage engine has its own advantages and disadvantages. It is crucial to understand each storage engine features and … Continue reading

Posted in Database | Leave a comment