Added database method

Using example on class webpage. Nothing works though.