For the database, you set how you want the database configured in the project properties. In there, you'll find database settings.
For the master key and database scoped credentials, you just add those as objects within the database project.
One tip though: I've found if you have the master key and the database scoped credentials in separate .sql script files (i.e., one per object), it throws errors if you try to build. Put the master key definition and the database scoped credentials in a single .sql file. But yes, it can just live in the security node in your project.