This starts with figuring out what you want to store and what you want out of the data, and then deciding on how to model the data. Unfortunately, the topic is too vast to cover in a forum post.
One place to start is to look at relational database systems, i.e., things like entity-relationship modeling and relational database normalisation.