views:

137

answers:

3

Since I took the basic undergrad course in databases design and SQL I haven't really touched anything like this.
So my question is - how would the database schema for a site like this one would usually look like? What are you generally expected to find? For instance, how are questions and answers stored?
Are there some tools which allow you to design it? or is it just something the devs come up with?

A: 

You can use tools to design a database, but they are normally just templates for creating the right shapes in a diagram.

The logical structure will be designed in the same way arn architect would design a building, using their best knowledge and experiences.

Also, always "work in pencil" until you are happy.

ck
+2  A: 

Stack Overflow used the MediaWiki database schema as a template before they went through a database refactoring a few weeks back.

George Stocker
Didn't Jeff say that using MediaWiki as a template was a bad idea?
epochwolf
Do you have a source for that?
George Stocker
+1  A: 

There are few principles in database design which im sure you pretty much know if you took that course. They all say basically that your data should not be duplicated across multiple tables and all your columns should be integral to the table they appear in. Then there are common entities aplied in all software design like objects and relations. Managing them is easiest part because it comes instinctively. Then there is optimization for scalability and performance which shouldn't be hard if first steps are done right. And this is usually done together with software team which is writing code for your db.