You can get the schema for the data dump and SEDE in this Meta Stack Exchange post.
The architecture of the production database is not available to non-corporate customers (if it's available at all). But, you can grab one of the public domain Stack Exchange clones;Stack Exchange clones; their schema is no-doubt similar.