Hey guys,
I have limited experience with databases but in order to learn more, I've been attempting at designing databases myself. I'm trying to create a news aggregation database for users to retrieve news from.
The basic idea of this database is that a user will login his/her university account and choose their preferences. The preferences are based on colleges only (i.e. Science College, Engineering College, Liberal Arts College, etc.). The preferences can also be drilled down further with keywords (i.e. technology, educational, fun, etc.). Then the user can receive news as they please.
The database looks like this:
The basic business rules are as follows:
-A user can choose many colleges and a college can be chosen by many users.
-Thus we have a composite table for "User_College"
-A college can publish many articles but an article can only belong to one college.
-One could argue that an article could be jointly written by authors from two different colleges but for simplicity's sake, let's say it's not going to happen.
-An article can have multiple keywords tagged to it and a keyword can be tagged onto many articles.
-Thus we have a composite table for "Article_Keyword"
-An article can be written by many authors and an author can write many articles.
-Thus we have a composite table for "Article_Author"
My concerns are the following:
1) Well, if articles can be written by many authors, then it begs the question of, "Will it come from different colleges too?" Well, I'm not sure what to do - should I make the relationship between College and Articles many-to-many?
2) I have to store the user's preferences somewhere and I don't know where to store them.
3) I need to aggregate news from somewhere, right? How exactly do I implement such a function in a ERD (diagram) like this?
4) What if users prefer to be e-mailed news rather than to login and read news? How do I implement the functionality of letting users be e-mailed news?
5) I also feel that this diagram is too "simple". Or maybe I'm wrong - it is supposed to be that simple.
Any feedback would be great!
Appreciated,
Jeff~
I have limited experience with databases but in order to learn more, I've been attempting at designing databases myself. I'm trying to create a news aggregation database for users to retrieve news from.
The basic idea of this database is that a user will login his/her university account and choose their preferences. The preferences are based on colleges only (i.e. Science College, Engineering College, Liberal Arts College, etc.). The preferences can also be drilled down further with keywords (i.e. technology, educational, fun, etc.). Then the user can receive news as they please.
The database looks like this:
The basic business rules are as follows:
-A user can choose many colleges and a college can be chosen by many users.
-Thus we have a composite table for "User_College"
-A college can publish many articles but an article can only belong to one college.
-One could argue that an article could be jointly written by authors from two different colleges but for simplicity's sake, let's say it's not going to happen.
-An article can have multiple keywords tagged to it and a keyword can be tagged onto many articles.
-Thus we have a composite table for "Article_Keyword"
-An article can be written by many authors and an author can write many articles.
-Thus we have a composite table for "Article_Author"
My concerns are the following:
1) Well, if articles can be written by many authors, then it begs the question of, "Will it come from different colleges too?" Well, I'm not sure what to do - should I make the relationship between College and Articles many-to-many?
2) I have to store the user's preferences somewhere and I don't know where to store them.
3) I need to aggregate news from somewhere, right? How exactly do I implement such a function in a ERD (diagram) like this?
4) What if users prefer to be e-mailed news rather than to login and read news? How do I implement the functionality of letting users be e-mailed news?
5) I also feel that this diagram is too "simple". Or maybe I'm wrong - it is supposed to be that simple.
Any feedback would be great!
Appreciated,
Jeff~