I'm quite a beginner at database design. I have two problems that I'd like to solve using a database, but am not sure how to deal with an unknown number of fields.
Here are the two types of data I'd like to store (they represent the same schema issue I think):
I want to store a bunch of coordinates for a map route. The proposed DB would look like this:
Name Point 1 Point 2 ...
---- ------- -------
Jogging Loop 5, 10 6, 11 ...
And the other problem I'd like to solve is a partial solver for anagrams. I want to go through a dictionary and alphabetize the letters in each word. For each alphabetized string, I'd like to associate the words that can be formed from that string. IE
Alphabetized String Word 1 Word 2 Word 3
------------------- ------ ------ ------
abet abet beat bate
The part I don't know how to solve is the unknown number of columns. There must be a better way than to have an arbitrary # of columns based on the max length of any row in the table. Do I need two tables and do I join them somehow?
Thanks for shedding light on how this is typically addressed.