How to create a spell check enabled MySQL query by leveraging SOUNDEX and Levenshtein Distance algorithms

Recently I came across a situation where I needed to perform the MySQL search in such way, that it would account for typos in user search queries. For example, if the database of words in MySQL contained only the word “assistance” and the user typed the misspelled word “asistence”, I had to be able to return the correct word “assistance” as a closest possible suggestion from the database. It seemed like a trivial task at first, but it took me quite a while to figure the SQL query that had a good balance between performance and overal quality of results.  [Read more…]

MongoDB and BSON format

Recently I came across a statement that said: “MongoDB (btw. that’s MongoDB) uses the BSON format which extends the JSON model to provide additional data types” and I think this topic deserves a bit of clarification. [Read more…]

Local vs Distributed Databases

In this article, we’ll analyze the situations in which it is more appropriate to implement a distributed database instead of a centralized (local) database. But before we do so, let’s see how the two of the database concepts differ. [Read more…]

How to fix “Warning: PDO::__construct(): The server requested authentication method unknown to the client [mysql_old_password]” authentication error

This article describes how to fix MySQL connection error: (“Warning: PDO::__construct(): The server requested authentication method unknown to the client [mysql_old_password]”), experienced during MySQL or MariaDB authentication (typically during establishing a database connection). [Read more…]