Update dd3.lua

Now supports external database file.