Continuing the series of building a spring-based web application, in this post, we will discuss database design. Based on this database, we will eventually build our REST APIs.
Database Design
We will build database design as we go about discussing the APIs that we will be using from Twitter, Facebook, and Instagram. Since we will have users of a company logging into our application, few basic database tables that we will need
- User
- Company
- Role
- UserPassword
- Address
An administrator user can add their company and can also add users. An administrator will be allowed to create reports and she can share these reports with other users. These other users will have the role of reporters.
These tables will be the foundation blocks for our application. As referred to user flow, a user with a particular role will log in to the application. He can view/change the social performance data for his company and propose new marketing strategies. Of course, this is not the complete database model for the application. We still have to look into what data we will be fetching from Facebook, Twitter, and Instagram APIs. We will study those APIs in the next post.
Follow the progress of this application here.