PLTippen – Part 2 – adding database

This is a continued post by my last post “My First Windows Azure Development project”. I decided to develop a light-weight prediction league application based on my life-long database development project – TeamDB. Of obvious reasons, I will not publish all functinality in these blog posts, but these posts will contain most of the details for my “PLTippen” project that shall be hosted on Windows Azure with web site and SQL database.

The first task is to swap the initial SQL Server Express version of the Membership tables that is used in the default project when creating the MVC4 web application. User the section <connectionStrings> the key “DefaultConnection” is referring to the local express database…I want to change this to standard SQL Server 2012 to ease the maintenance.

Quick steps:

  1. Create a new database ‘PLTippenAzure’
  2. Locate the web.config in my VS2012 application
  3. Find the key “DefaultConnection”
  4. Replace the connection string with “Data Source=(Local);Initial Catalog=PLTippenAzure;Integrated Security=SSPI;”
  5. Save all, Clean, rebuild all
  6. Run the application in VS2012
  7. Register a new user
  8. Quit the application

Meanwhile, I have create a simplyfied version of the database model for this prediction application based on my TeamDB database. The database model is created in Microsoft Visio and using the plugin descibed in this post to generate the database schema for my application. This plugin helps you with creating a good database model, and it is recommended to use identity for primary keys.

After generating the database script through the “Forward Engineer” plugin, you can run the script against you database, before running the web application again. Now you have a database with Membership tables and custom tables for your application.

Any comments appreciated….Happy coding


One thought on “PLTippen – Part 2 – adding database

  1. Pingback: Summer-time « Sveroa's Developer Blog

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s