In mathematics, zero is usually considered without a sign. It’s neither positive nor negative. In computer floating point numbers there are two zeros: one positive, +0.0, and one negative -0.0, at least if we follow the IEEE standard.
Tag Archives: MySQL
Did you know this about AUTO_INCREMENT?
The AUTO_INCREMENT feature of MySQL is the easiest way to generate an automatic sequence of incrementing values for a primary key. It’s very easy to use, too: create table t ( i integer auto_increment, other_field varchar(100), primary key(id) ); There some features and “features” that you have to keep in mind when using AUTO_INCREMENT, though.
Fixing Doubly UTF-8 Encoded Text in MySQL
Earlier I wrote about fixing UTF-8 encoded text stored in a latin1 column by converting it back to latin1. What if you want to convert the column to UTF-8 instead? Changing the storage encoding is easy to do, it takes just one ALTER TABLE statement and MySQL converts the column to UTF-8. But afterwards you …
Continue reading “Fixing Doubly UTF-8 Encoded Text in MySQL”
K-means Clustering in MySQL
Clustering is about finding data points that are grouped together. K-means clustering a fairly simple clustering algorithm. Here we’ll show how to do it in MySQL.
MySQL Collations in practice
Collations are important for how text is ordered by indices and ORDER BY clauses; in fact a collation defines the order. Sadly developers seem to often ignore collations in data models, and the database default settings are used. If you are using MySQL and haven’t configured any particular collation, your database is probably sorted according to …