Bug 1691 Command 'datatodb', views from DB

do review 
https://gist.github.com/gruber86/8b437a8d8371410b3411