Delete a Foreign Key if exists

I’m currently developing a new database, requiring the initialisation code to be run over and over again. Creating tables with IF EXISTS is easy. Delete a foreign key if one had been created already was a little more problematic. set @var=if((SELECT true FROM...

Todays MySQL Timestamp Learnings

Today I have decided to take a look at the redesign of the Medieval Realms database. This is the first production database I’ve ever written. It’s ugly. It’s not really relational. And it’s bloated to 34 tables. This database has grown...

Databases, databases, databases

No tech updates since October the 16th huh? Well, I realised that my SQL skills were somewhat limited to some basic stuff I still remembered from Uni days (when beer and having fun was more important than learning about RDBMS’). I know enough to get by, but...

RDBMS’

So I decided to slam the brakes on MySQL and do some research into RDBMS before I got too involved again. The next biggest RDBMS next to MySQL that I know of is PostgreSQL. So I thought I would take a peek at the data and see what other people are using (and therefore...

MySQL Workbench Database Design

So I’m designing a database in MySQL Workbench for the first time. Previously they’ve all been on scraps of paper. Designing a database in MySQL has a lot of benefits. The biggest of which is the ability to populate it with data and test it as you go, not...

Back to Basics – MySQL

So it’s been a few years now since I created a database in MySQL (version 6 in fact). I installed the latest version MySQL – version 8 for my new project. A little different from before as you now need need to add a preceding sql to the command. Looks like...