1

1. I can see here that Stack Exchange sites have separate databases.

But does it have separate users tables for each database? If yes, then how are passwords synchronised across databases?

2. I can see from here that every site's user table has the AccountId of the Stack Exchange Network profile.

An Example:

  1. Here is Nick Craver, network profile with ID 7598.

  2. His profile in History Site has the account ID linked with the same ID, 7598. Check this query.

I can't see the Accounts table anywhere in the data dumps.

Is the Accounts table with AccountId stored in a separate database?

I would like to know the database structure for accounts.

  • There are no identities (and with that passwords) in any site database. The passwords are either stored at Google, Facebook or the OpenId provider of your choice. One of the openid providers is Stack Exchange themselves, with openid.stackexchange.com. So the only thing that gets linked is the accountid with an identity. For obvious reasons you don't get the table with identities but it is guaranteed that the same accountid is used across databases. You don't need the accounts table to link users across databases – rene Jun 25 '16 at 12:15
  • @rene ok but there should be centralized accounts table were AccountID is generated and if i signup without Google then password should be stored some where. Could you explain more clearly ? – shaijut Jun 25 '16 at 13:12
  • 1
    I can assure you that the password is not stored by SE, the salted-hash of the password probably. I don't know their implementation. – rene Jun 25 '16 at 13:15
  • Maybe this helps a bit: meta.stackexchange.com/questions/260153/… – rene Jun 25 '16 at 13:21
  • As far as I know, the cross-site Accounts table is not available in the data dump, which only has per-site information. Stack Exchange logins are actually stored elsewhere, in a different service -- they're not linked 1:1 with Accounts. At openid.stackexchange.com you can create Stack Exchange OpenID logins, which can be used on other sites, and you can have multiple associated with a single Stack Exchange Account. Also not in the data dump. – Jeremy Banks Jun 25 '16 at 20:06
2

The cross-site-login system is separate from the database. OpenID passwords (like Google) aren't stored in any case; if you log in using Google, SE asks Google to validate you. I don't know how SE manages passwords for the email-based accounts you can create, but it's not in the database that contains posts, users, and so on.

There is no publicly-visible table of network IDs. You can get the network IDs for all current users on a particular site from SEDE or the data dump for that site, and in principle you could run that query on all sites and then collect the results. You'd still miss some (for example, deleted accounts, or users who only had accounts on deleted sites). But there's no place where you can get all the network accounts in one place.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .