CTP5 also introduces the New Project Wizard, which makes it a lot easier to create your initial database project.
All important decisions that you need to make when creating your database project are nicely represented in the wizard. Besides setting up the project properties based on your expressed preferences, the wizard allows you to import an existing schema from an existing SQL Server database as part of the project creation. This way you have one-stop-shopping for project creation and importing of an existing schema.
Lets walk through the wizard, so I can point out some important aspects. First thing you will see is the welcome page, just read it, like you read any documentation we ship to you :)
On the "Project Properties" page there are 3 pieces of important data.
The first choice you need to make is regarding the directory structure of the schema container. Based on user feedback it became apparent that there are two main preferences for organizing your files inside a directory structure: by object type (tables, view, procedures etc.) or by schema. This option reflects this ability.
Be aware that this reflects the initial directory structure we create for you; because an other piece of feedback from users has been, that they want to be able to re-organize the directory structure underneath of the schema objects container based on their own needs and requirements. CTP5 does allows this as well and enables full drag & drop drop support inside the Solution Explorer to make this even easier.
The second options allows you to set on a per user basis, what the default schema is that you will be using. So if you create a new object via one of the provided item template, we will default the schema to this value. The third options looks the same but has a rather different usage. Again you are specifying a default schema, but now for the case where you provide an object that is not disambiguated via the schema. Say you import a .SQL script that contains table T1, you did not specify its schema. In order to disambiguate all schema objects you can provide a default schema for this purpose. This is a project level setting, otherwise the results would differ per user and that is not what you would want to have happen.
The "Set Database Options" page lets you define the common SET options for the project, including the database collation to be used. These are the SET options that will be used for the creation of all you schema objects, this way we create consistency for all objects, which will lead to a more predictable usage. More about SET options in a later blog.
The "Import Database Schema" page allows you to select a server and database schema to import. There are some options that allow you to specify if you want to inherit settings like SET options and collation information from the source database. By default we import only the schema definition and use the SET options and collation settings as you specified them for the project.
The last page where you can set information is the "Configure Build and Deploy" page, here you specify your output directory for the build scripts and your target connection, this is the SQL Server and database that you want to deploy the build script to. This is most of the time set to your "sandbox" or test environment, since you want to be isolated from the production environment when you start to make changes.
Once you are done changing settings or when you just accepted the defaults; the project will get created and if you choose to do so the schema of the database selected will get imported and you are ready to go!
-GertD"DataDude" Development Manager