I’m Working on My Program that Works With SQL Server.
for Store Data in Database Table, Which of the below approaches is correct?
-
Store Many Rows Just in One Table (10 Million Record)
-
Store Fewer Rows in Several Table (500000 Record) (exp: for each Year Create One Table)
Well, it depends!
What are you going to do with the data? If you are querying this data a lot of times it could be a better solution to split the data in (for example) year tables. That way you would have a better performance since you have to query smaller tables.
But on the other side. With a bigger table and with good query’s you might not even see a performance issue. If you only need to store this data it would be better to just use 1 table.
BTW For loading this data into the database you could use BCP (bulkcopy), which is a fast way of inserting a lot of rows.