Results 1 to 14 of 14
Jan 22, 2011, 02:28 #1
- Join Date
- Jul 2005
- West Springfield, Massachusetts
- 191 Post(s)
- 2 Thread(s)
Multi-dimensional array to Database schema
OK, I've been collecting data in a multi-dimensional array. The array is getting quite large now, and it might be nice to put the data online so others could use it too. Before it gets any more difficult to maintain I'm thinking it's about time to get this into a database.
I'll eventually be doing this with PHP and MySQL, but I don't think that's important at this point, I should be able to do OK once I figure out how to get started, and I'm sure I'll be able to import the data into tables, but ....
I can't figure out how to determine what table relationships to use.
I have 3 types of data. By far, the vast majority of data sets are a single Member ID with a single IP and a single URL. If this was the case for all of the data sets I would have little to no problem. Unfortunately there are a few "troublemakers".
and each has at least one IP - but may have more
and may have none - or several - URLs
IPs can be associated with one or more MemberIds
and none or several URLs
URLs can be associated with one or more MemberIds
and one or several IPs
At some point I may want to add a "comment" type.
I'm not looking for the finished answer, but I would like to be pointed to something that explains what logic to use in determining how relationships dictate table structure, or if someone's up to it, their own explanation. What I'm looking for is a kind of "logic kick-start".
Thanks.► STOP using mysql - migrating to procedural mysqli !!
► How to be a Great Online Community Member
► Member of the Month August 2014
► Free SitePoint book - Thinking Web: Voices Of The Community
► On Our Radar This Week: ---
Big Change Coming Late August What you need to do to prepare for our migration to Discourse