views:

142

answers:

1

My homework was to create a relational UML diagram about a discussion site. I used the SO schema, and I did some modifications:

  • removed Age in the User Information
  • added representatives, which allows users to categorise posts by their usernames (voluntary)

Otherwise, the schema is rather similar, but rudimentary. How would you improve it?

Clarification

The main idea of representatives is to categorise posts. The list contains only a handful possible names. In contrast to badges, the idea is not to funny, but organised. If you ask questions about Mathematics, you could be Steve.math or just math. It helps other users to see directly what you are like, and space is not wasted to you Username. Perhaps, there is an easier way to organise things, so don't hesitate to comment.

+1  A: 

Votes

Add:

UserID (FK)
PostID (FK)

Users

  • Get rid of Upvotes and Downvotes, that is information that can come from the votes table.
  • Make it an 'integer'. Unless you have a really big site, there's no need to have a GUID as a user ID.

Posts

  • ID Should be GUID

Comments

  • ID should be GUID

If you keep Representatives, I'd change the name of it. The name doesn't tell me anything about what it holds.

Otherwise, I don't think it's a good idea to keep that -- it's something that the 'tags' can tell you, unless I'm completely missing why that exists.

George Stocker
"Representatives" looks more like a tag that is assigned to a user rather than to a question.
Welbog
@Gortok: Actually, you can have Representatives in SO if you use many Gmail accounts. It is misleading to think SO without it. I am SimpleThings because I want to categorise my beginner questions. I am a math-quy with very mathematical questions. "Such representatives" are natural because of better replies. My math-account attracts very different people in contrast to SimpleThings. It is easier to start to follow people with descriptive name, or let's call it profile/representative -- it does not really matter. The main idea in Representatives is better order, tags are mere refinements.
Masi
For Stack Overflow, the purpose isn't to follow 'people' it's to follow types of questions, hence the tagging. "Representatives" (still dont' like the naming, If I saw that in code I'd probably go, "WTF does that mean?". If you're building Stack Overflow's schema, it doesn't make sense to have 'representatives'.
George Stocker
@Gortok: I agree, but would it be easier for you if the questions were better organised? Can you really find things fast in SO even with tags and Google? Many times, I found gems in SO by accident. I would like to increase the probability.
Masi
Yes. If you use site:google.com plus your search string, you can almost be guaranteed to find it.
George Stocker
@SimpleThings: If you think you have a good idea to improve the usability of the site, you should post it on http://meta.stackoverflow.com/ so that other users can check it out, add input and vote on it. If the idea gains enough support Jeff et al. will add it. I personally would like to see a more detailed description of "representatives" because admittedly I'm having trouble understanding the concept.
Welbog
Please, note I do not oppose tags. I just feel things, such as questions, tags and even users, could be better organised with "representatives". It would bring some complexity for better order, so it is a tradeoff.
Masi
@Gortok: Thank you! I changed the name "representatives" to "profiles". I will do a test site first before submitting it to Meta. One part is missing, I agree it. Such complexity would require better tools.
Masi
I updated the photo with your fixes. Thanks again!
Masi