I like that idea. This would also allow us to automatically register all citizens to vote on their 18th birthday.
Unfortunately, for instance, if the database was indexed by name and social security number, all citizens would automatically be entered into the database upon applying for social security, or being naturalized and issued a citizen's-prefix social security card, and, deleted upon the entry of their death certificate. For the SS Administration to run voter registration it would have to accurately track the movement of citizens.
Your suggestion has given me an inspiration. The various DMV's of the states could index their records to the same national database. Then, votes could be scanned to ensure that the voter is both a citizen casting one vote, and, a resident of the jurisdiction in which he is voting for a sufficient duration. That would pretty much make provisional ballots self-verifying. Those that don't drive, and, refuse to take a non-driver ID, could avail themselves of voter registration.