1 min read

Learning about databases to use with Django for Bootcamp Index 2.0

Learning about databases to use with Django for Bootcamp Index 2.0

I've been learning today a bit more about databases and which ones to use with Django.

Django comes with a built-in database called SqLite which is a small file which is only really made for testing on your computer. However, people like Pieter Levels have used it on all their sites like Nomad List and Remote OK and Pieter makes about $500,000 these days or there abouts!

I was asked on Twitter just now why I'm planning on using Postgres instead. Postgres is the most common database used with Django so that's a pretty good reason right away. Another thing is that although I hope to keep doing the entrepreneurship thing, I feel it makes sense to adopt some best practises so if I ever have to do contracting or get a dev job this way I've learned how to use a database that companies use themselves.

From my research over the last couple of days as well it seems that things like Postgres can handle lots of users adding data a lot more easily than SqLite due to something called 'concurrency'.

I had a bit of a pain trying to add PgAdmin on the Commandline and the later my friend Austin explained that it comes bundled with the Postgres download any way! I haven't quite worked out how to change the settings in Django yet to connect to Postgres so that's tomorrow's task!

I also spoke to Sergio from MakerLog and if I understand this correctly, I can use the Django admin page on localhost just the same no matter what database I use so that's good to know. He also said it's easy to transfer data from SqLite to Postgres later by using migrations so that's cool.

A bit of a tough day mentally but I'm starting to get my head around how things work under the hood!