How to deploy a windows application (in VS 2010) with database.
I know to do the setup project for the windows application. I have to give demo that one machine act as client and another machine as server. I have to deploy the setup on one machine which will work as client and have to give datbase attachment on another machine which will work as server. What configuration i have to do with sqlserver 2008 R2.?

How are you creating the database? Libraries such as the Entity Framework can create the database for you, and deployment is trivial given the correct connections and permissions into SQL. If the database was created manually, you need to recreate it manually, provide SQL scripts that recreate it, or include a backup drop that can be restored into the SQL Server at installation time. Automating this is harder though, and it may be better to just include a second step in your wherein a DBA makes sure that everything is set up properly.