I took a course in university on database management systems, that focused on relational databases. We started off learning relational algebra, and calculus, and then learned how to model relational databases, and refactor them into first normal form. It has been a few years but I am still comfortable with basics of querying SQL, and have a solid enough basis that I'm confident I can jump back into it.