(looking over a colleague’s shoulder) If more people edited HTML via the MySQL command line tool, the world would have been a better place.
Tag: databases
The worst typo in MySQL query ever
Well, today I’ve learned something new. Â Typing a query like this:
UPDATE `table` SET `field` = '1' WHERE `id` = '123'
I made a typo and entered the following:
UPDATE `table` SET `field` = '1' WHERE `id` - '123'
Yup. Â A simple dash (-) instead of an equal (=) sign. Â I know, I’m supposed to do a SELECT before, or use a transaction, or, at least, have a backup of the database – depending on which school of thought you follow the most. Â I didn’t have any of these. Â And once the query went in, there was little I could do.
Guess what the query does? Â I’m still looking into the exact consequences, but so far it looks like ALL records EXCEPT the one with id 123 have been updated.
Gladly I have some history revision tables from which I could restore most of the state. Â But this is scary dangerous anyway. Â I would expect a syntax error intuitively.
TextQL – execute SQL against structured text like CSV or TSV
RedBeanPHP – a lightweight, configuration-less ORM library for PHP
BayesDB – a Bayesian database table for querying the probable implications of data
BayesDB – a Bayesian database table for querying the probable implications of data
BayesDB, a Bayesian database, lets users query the probable implications of their data as easily as a SQL database lets them query the data itself. Using the built-in Bayesian Query Language (BQL), users with no statistics training can solve basic data science problems, such as detecting predictive relationships between variables, inferring missing values, simulating probable observations, and identifying statistically similar database entries.
BayesDB is suitable for analyzing complex, heterogeneous data tables with up to tens of thousands of rows and hundreds of variables. No preprocessing or parameter adjustment is required, though experts can override BayesDB’s default assumptions when appropriate.
BayesDB’s inferences are based in part on CrossCat, a new, nonparametric Bayesian machine learning method, that automatically estimates the full joint distribution behind arbitrary data tables.