Ask SQL-SERVER how to insert the test data problem

Diagram of relation database.!
I need to go to this database into a large amount of test data now, may I ask what is better!
My current thinking is to write stored procedures in the database, and then in the C# a lot of cyclic generation data insertion.
But there is a serious problem (I still database newbie) for example, I want to add data to the Song this form, The Song table and Genre and Band in the presence of a foreign key constraint, Is it right? I give Song to insert the data when, The need to Genre Band and insert the data? The Band and Location locationid is the foreign key constraint relation is it right? Is related to the need to add data to here? According to this word has been associated with down is not the whole database table to add data.?

Started by Rudolf at February 10, 2016 - 4:58 PM

Unless you know the business logic, and using the cascade update delete these means, or separately inserted if debugging is very painful, the simplest method: download the trial version of the third party software to assist you to insert, the software has to help you organize business logic, used red gate, SQLDelta, just register can be used more than ten day, enough for you to generate test data.

Posted by Lena at February 22, 2016 - 5:49 PM

There are strict foreign key relationship, requires strict successively insertion. If the LZ has a large number of test data, using the SSIS import is a reference method. The node can be observed in the actual problem, the efficiency will come faster than C# cycle.

Posted by Jack at February 27, 2016 - 5:57 PM

I think the most important thing is you have to know the business logic, business logic. In theory, the data is inserted into the small things, that should be pay attention during are father and son relationship table data, a foreign key constraint relational data, the other are no difficult.

Posted by Griffith at November 25, 2016 - 11:58 AM

I have come to learn also have a question to ask, how is not attached.

Posted by Jamie at December 01, 2016 - 12:47 PM

You is it right? There is no available points.?

Posted by Abby at December 13, 2016 - 12:48 PM

Your database test library is the library, should not formal.

If only the test library, no problem, just disable the foreign key constraint, you can insert, here is an example:

- the main table
create table a (id int primary key)

insert into a values(1)

-- construction schedule, the foreign key constraint
create table b(id int foreign key references a(id))

The insertion errors, as in violation of the foreign key constraint
insert into b values(2)

- do not check the foreign key constraint
alter table b
Nocheck constraint FK__b__id__407A839F - this is a foreign key constraint name, is generated by the system, you need to modify the system more you

- you can insert
insert into b values(2)

Posted by Abby at December 16, 2016 - 1:23 PM

I don't know
Do you know that? Pointing to the next.
Net page static problem, in the background update every things, one day can only use a static, the two generation of static, on the site will display does not come out, how to solve and refresh the page data do not update each new HTML files?? Reference. So the static generation, a day can be used once, news also generate static, the other is no use. The two generation of static, background display is completed, but the front is not displayed. The master to understand an advice on, kneel to thank

Posted by Jamie at December 31, 2016 - 2:12 PM

Oh, feel shy ah, static problems I don't understand this webpage, you go to the.Net version of the web ask, they should know.

Posted by Abby at January 04, 2017 - 3:45 PM

The red gate and SQLDelta seems very complicated, I see a Datafactory like it very simple, is that ok?

Posted by Rudolf at January 07, 2017 - 4:06 PM

Most mature third party software can be, because your logic is more complex, if you don't, it is best to use third party tools to achieve. I have not used that, as long as you meet the requirements can

Posted by Lena at January 07, 2017 - 4:32 PM

Can send to me? I can't find the similar software on the Internet, only can produce data on the line!

Posted by Rudolf at January 10, 2017 - 3:00 PM

I use red gate, you can register for 14 days

Posted by Lena at January 11, 2017 - 2:36 PM