How to create this database from lexicon

There is a lexicon including 15000 words. And every word takes up one line, which means these words are separated by "Enter".
Now, I wanna create one database, as following:
1.Every line in DB has the random number of including words ;
2.The word is unique in each line of this DB;
3.I want the sequence of words in each DB line is equal to this in lexicon.

So, How should I do.
Topic archived. No new replies allowed.