A slug is a short name using human-readable keywords to identify a web page. For example, in the following URL the slug is new-york-art-school. This post shows how to automatically generate slug using SQL in MySQL. Suppose we have a…
A slug is a short name using human-readable keywords to identify a web page. For example, in the following URL the slug is new-york-art-school. This post shows how to automatically generate slug using SQL in MySQL. Suppose we have a…
Here we show an example of updating two table at the same time using joins. Suppose we have two tables: lookup which holds information on a person, and activity which holds certain activities happening on a person. Imagine that lookup…
Nearest neighbor search is common in geographical databases. Here we consider searching for nearby locations in a large geographical database. Many commercial databases have geographical indexes supporting such queries; however, in MySQL there is no simple implementation. We show a…
Duplicate elimination is necessary when the database is messed up or when we integrate data from multiple sources. This tutorial shows several ways of removing duplicates in MySQL that may fit in different application scenarios. Suppose we have a table…