I recently made a database for a side project (10-15 tables, moderate complexity). I estimated it would take 40 hours for the entire db (tables, columns, relations, validations, indexes), but so far it has taken 5x as long and still isn't finished.
I'd like to get better so such blow-outs don't happen in the future. Here's my plan:
1. Before modelling, map out business processes thoroughly on paper or whiteboard, including edgecases.
2. Implement ideas early to inexpensively discover if they work or don't work
3. Experience improves pattern recognition, so practice, practice, practice.
4. Know the types of table associations well
What other things can a self-taught SWE do/read/watch to get better at quickly and competently designing relational databases?
1. Model business processes that you expect to be generating data as well as those that will be asking for data. Both sides inform the design: how hard it is to put data in, and how well the representation supports the different ways you want to get it out again.
2. Design the schema. Pen and paper is a good start, as are some tools that let you do it graphically.
3. Start writing down queries you expect to be able to do. Again, pen and paper/whiteboard. These force you to think through the relations and see if they make sense when you're building queries. It isn't uncommon for a schema that makes sense for putting data into a database to not quite be flexible enough to support the kinds of queries you care about.
4. Prototype, test. This entails not just coding up the schema, but connecting it to some source that will populate the database. I often write synthetic data generators to shove a bunch of data in so I can evaluate queries. This can inform schema revisions to address performance issues.
SQLite is invaluable for prototyping. Last time I did this I used the SQLite manager plugin for Firefox to play with the database design as it was being designed in that 4th step above. Even if the plan is to move to a different database, SQLite is good for getting the rough picture right and playing with it with minimal work/friction.
I have a couple database textbooks around that I refer to that are good references for SQL and schema design. I'd have to go dig them out of a box to find the names though - it's been a couple years since the last time I went through this exercise.