I want to use both ubuntu and windows7 as dual booting, so please let me know because I had already lost data when I installed ubuntu as replace widows 7 with ubuntu, so I don't want to lose again.
If you do it correctly NO data is deleted during installation of Ubuntu. There are just 2 steps in creating a dual boot:
If done with these 2 steps the only partition that is getting changed is the unallocated one.
But as always: when using an operating system making a regular backup is the best method to keep your data safe. When changing partitions (or any alteration to your machine) it is wise to make another backup before committing these changes. And of course make sure the backup is indeed correctly created (so it can be restored if need be). Safety first.