Click here to Skip to main content
15,889,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear Friends!

I am going to develop a Payroll Application in VB.Net using SQL2008 Database. (Previously I have developed two windows applications using MS Access Database.)

Now, Plz guide me that What should I do with SQL2008 Database
1. To keep my database file size (sod.mdf) shorter.
2. To stop its size from increasing rapidly with the passage of time.
3. To run my payroll application efficiently with this database

(Note: I am also inserting images of the employee in my database).

And if there are other issues related to my problem, plz also guide me about that.

I will be thankful to you.
Posted

Thank you for your question. Follow the code bellow.
SQL
USE master;
GO
CREATE DATABASE Sales
ON PRIMARY
( NAME = SPri1_dat,
    FILENAME = 'D:\SalesData\SPri1dat.mdf',
    SIZE = 10,
    MAXSIZE = 50,
    FILEGROWTH = 15% ),
( NAME = SPri2_dat,
    FILENAME = 'D:\SalesData\SPri2dt.ndf',
    SIZE = 10,
    MAXSIZE = 50,
    FILEGROWTH = 15% ),
FILEGROUP SalesGroup1
( NAME = SGrp1Fi1_dat,
    FILENAME = 'D:\SalesData\SG1Fi1dt.ndf',
    SIZE = 10,
    MAXSIZE = 50,
    FILEGROWTH = 5 ),
( NAME = SGrp1Fi2_dat,
    FILENAME = 'D:\SalesData\SG1Fi2dt.ndf',
    SIZE = 10,
    MAXSIZE = 50,
    FILEGROWTH = 5 ),
FILEGROUP SalesGroup2
( NAME = SGrp2Fi1_dat,
    FILENAME = 'D:\SalesData\SG2Fi1dt.ndf',
    SIZE = 10,
    MAXSIZE = 50,
    FILEGROWTH = 5 ),
( NAME = SGrp2Fi2_dat,
    FILENAME = 'D:\SalesData\SG2Fi2dt.ndf',
    SIZE = 10,
    MAXSIZE = 50,
    FILEGROWTH = 5 )
LOG ON
( NAME = Sales_log,
    FILENAME = 'E:\SalesLog\salelog.ldf',
    SIZE = 5MB,
    MAXSIZE = 25MB,
    FILEGROWTH = 5MB ) ;
GO


You can use image data type for store image in database.

For more info,
http://msdn.microsoft.com/en-us/library/ms176061.aspx[^]


Thanks,
Mamun
 
Share this answer
 
Hi rashid,

plese refer this link .

http://hubpages.com/hub/Optimising_SQL_Server[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900