Proposal - Schema

  • Users - maybe GravatarHash because it’s used frequently

  • TrustLevel - You mentioned “Name”, is that a human-readable name, and does the schema support localisation?

  • Posts - datePosted is important, so is dateEdited

    The isMeta boolean might be generalised to an enum or string (e.g. Discourse supports several “categories” of post).

    You might want a additional, denormal “summary” of the body (e.g. when displaying a list of several posts)

    You might want a denormal “isTheActiveAnswer” boolean otherwise it may be expensive to select the “Active” (i.e. sort by most recently-edited answer) view

    I’m not sure you want “Score” as well as “Upvotes” and “Downvote” (also the latter is singular and the former is plural?)

    There might be a benefit to splitting Posts into Topics and Answers – or the Topic’s header might be a subclass of post (or however you compose that, “is-a” versus “has-a”) – e.g. on SE a topic must have a title and at least one tag and may have one accepted answer, and the topic’s OP might have topic-specific privileges (e.g. “can comment”), whereas answers cannot.

  • VoteTypes - I didn’t understand this (which doesn’t mean it’s wrong)

  • UsersSites I’m not sure privileges belong with sites. In future privileges might be associated with something other than a site, e.g. you might be able to edit specific posts or a tags. Is this a time to consider that?

Perhaps you could have Posts (for the question body and/or answer bodies) and Topics (in a separate table). Then every post has a topic-id, and comments have a post-id, and topics have a title and tags (and/or tags are associated with topics not with posts). The topic’s question (as opposed to its answers – “which of these posts is the question?”) might even be identified by its date, i.e. the question is the “first” post associated with a topic, though you could use a boolean instead for that with some (slightly complicated) uniqueness constraint on it.