Category Archives: Database

NoSQL with MongoDB, NoRM and ASP.NET MVC

Thought I should keep watching this new trend: Document Databases. Just found a good introduction series about MongoDB, NoRM and ASP.NET MVC:

Part 1 – http://weblogs.asp.net/shijuvarghese/archive/2010/04/16/nosql-with-mongodb-norm-and-asp-net-mvc.aspx

Part 2 – http://weblogs.asp.net/shijuvarghese/archive/2010/04/21/nosql-with-mongodb-norm-and-asp-net-mvc-part-2.aspx

A .NET Developer Guide to: MongoDB and NoRM

Document databases seems to be a new trend compared to relational database which has been employed years ago. So beside a previous post/bookmark about document database, there is another one mentioning about this, read more on it at “A .NET Developer Guide to: MongoDB and NoRM

Document Databases

This post from Ayende is about Document Databases (DocDBs). The post give an introduction/explanation on what document database is, how it stores data using key/value, how the data “relates” to other compared to how a table relates to another in RDBMS. How to persist/retrieve data from document database. Some variants as CouchdB, MongoDB and Raven are also mentioned in the post.

Read the post at: http://ayende.com/Blog/archive/2010/04/11/that-no-sql-thing-ndash-document-databases.aspx

Use MSDeploy to generate import data script

I just found a very helpful tool to generate import data script when deploying database: msdeploy

First download it from here. The tool will be installed in “C:\Program Files\IIS\Microsoft Web Deploy” by default.

To use the tool, fire up command line, go to “C:\Program Files\IIS\Microsoft Web Deploy”  (assume that the tool has been installed in this folder). And type in this command:

C:\Program Files\IIS\Microsoft Web Deploy>msdeploy.exe -verb:sync -source:dbFullSql=”Data Source=[DATABASESERVER]; Initial Catalog=[DATABASENAME];Integrated Security=false ;user id=[USERID];password=[PASSWORD]”,IncludeData=[INCLUDE_DATA],IncludeSchema=[INCLUDE_SCHEMA] -dest:dbFullSql=”[FULL_PATH_TO_SCRIPT_FILE]”

  • [DATABASESERVER]: Computer name or IP address of database server
  • [DATABASENAME]: The name of database from which data are going to be exported
  • [USERID]: Id of user who has access rights to the database server
  • [PASSWORD]: Password to login to database server
  • [INCLUDE_SCHEMA]: Possible values are True or False. If this value is True, the database schema will also be generated
  • [INCLUDE_DATA]: Possible values are True or False. Set this to true to generate import data script
  • [FULL_PATH_TO_SCRIPT_FILE]: the name of the output script file including a path, i.e. C:\DataLoad.sql

Enjoy!