10-13-14, 03:44 #1Registered User
- Join Date
- Oct 2014
Unanswered: Multi Dimensional Arrays in Column
I was wondering if anyone could help. I am busy trying to put together a database for my company, but what my boss requires has me a bit stumped.
I am no expert in database design, but what he has asked me to do just makes no sense. But perhaps that is just due to my lack of database knowledge.
In the one table i am creating, he has asked me to implement 2 arrays as a single column. One is 1 to infinity, and the other 1 - 3. I just cant understand his reasoning behind this, but he is insistent it will work. Could anyone please tell me if this is even possible, and if it is, is it wise to implement this sort of logic into a db? Honestly i have no idea how to even begin doing something like this and with my little experience i have never seen anything like this done. Then for another column, he would like an array of arrays. I think this stems from his background in Excel and Visual Basic.
If this is possible and normal practice, could anyone please give me some advice as to where i could start looking or even a small example of how it could be done?
Thank you very much for any help with this!
10-13-14, 07:54 #2Resident Curmudgeon
Provided Answers: 54
- Join Date
- Feb 2004
- In front of the computer
At least from my perspective, the best answer is to have a given row in the table hold a single cell from an array and allow the array itself to span as many rows as needed to contain the array. This allows you to build/store associative arrays, ragged arrays, and even the conventional static arrays. This structure is also portable from one relational database engine to another with little or no effort.
-PatPIn theory, theory and practice are identical. In practice, theory and practice are unrelated.