Building a toy social network with Python, Part 1: The database