You can use the Database Project template to create a project for manipulating database objects and data. Your database project can contain scripts and queries for use with multiple databases. To access the Database Project template, from the File menu, point to New, and click Project. In the New Project dialog box, expand Other Projects, select Database Projects, and choose the Database Project template.
Note You cannot change the location of a database project. When creating your project, verify that the location specified in the New Project dialog box is appropriate. After you click OK in the New Project dialog box, you cannot move the project to a different location.
As you develop your application, you will be adding many projects for presentation, business, and data access services. By adding a database project to Solution Explorer, you'll have a convenient way to access and modify new and existing databases to fit your application's data design requirements. The information for a database project is conveniently saved as part of the Solution, so that when you reopen the Solution all of the database information is available again.
The Database Project template creates the following folders in Solution Explorer:
- Change Scripts
- Change scripts record a series of modifications you intend to make to a database diagram or selected database tables. They are useful because they can be run at another time if you do not have security permissions to alter a database or if you are not ready to update the database. For more information, see Saving a Change Script.
- Create Scripts
- Create scripts recreate part (or all) of a database. They are useful for resetting a database object to its original condition. For more information, see Generating Create Scripts.
- Queries retrieve, create, modify, or delete data in a database. For more information, see Database Queries and Visual Database Tools.
- Database References
- Each database reference contains connection information to a database and is saved as part of the project. A database project can have multiple database references. For more information, see Adding a Database Reference to a Database Project.