If you're trying to use Clientprefs via MySQL, you don't need to do anything. It should create the tables automatically (or at least, it has in my experience).
If you're trying to use SQLite, stop what you're doing. You're overthinking it. Just create a cookie using RegClientCookie and use GetClientCookie and SetClientCookie to access it. Everything else is taken care of for you.