Deploy sample data along with main setup of app
We need to deploy some sam开发者_如何转开发ple data along with the application. The idea is after the deployment of application, and setting up the database. there should be some sample data available to users .This data is around 30-40 rows in 4 tables.
What should be the best approach to achieve this.
- Insert SQL scripts
- Export data to files and then We should write a program which will import it
- SSIS package, I don't know about it.. just read somewhere.
Another consideration is that there is foreign key constraint on the table where data needs to be transferred. So while transferring data I need to select the key from existing table, update my data and then insert in the target table.
Sounds like not a lot of data, so just scripts would be the easiest option.
However they would be awkward to update if not generated from a program that can be changed when the requirements change.
Go for the scripts option.
If you are maintaining the test data on your development box then you can use the SSMS Tools to generate the insert scripts for you.
精彩评论