[0.4-PRE2] Use Canary's database API.

This is also highly experimental, and subject to be reversed.