1. We have moved to a new forum! There may be a few things not working properly so please let us know if you find a bug. Remember to use the bbCode [ sql ] tag for SQL statements.

efficient way to store text file line by line

Discussion in 'SQL - Questions and Answers' started by knuthertel, Aug 27, 2009.

  1. knuthertel New Member

    Hi,
    we want to store a text file with test data line by line in a sql db.
    Later on it should be possible to insert new lines easily.
    An easy solution would be that each row in the db has an order number and
    then when inserting every following line has to be increased, but that seems slow and awkward. We then though about using floats as order numbers, so that it is easy to increase an existing order number without "renaming" the rest, but this might lead to problems with rounding errors.
    Another idea was kind of a linked list, each row contains the id of the previous and next, so that when inserting an entry, three rows have to be changed.

    Does anybody have a better idea?

Share This Page