Yes you would setup the subdomain using cPanel first, then create the database using cPanel as normal.