Some basics: I am using a user authenticated login to an admin system that allows users to add customers, and an array of info about customers, including geo-location information for use with GMap API. My goal is to allow users to add each other for networking purposes in regards to their customer clientele. I am wondering what the best approach at building the database/table structure should be.
At the moment, I have a database called pbud1
with a users
table and a customers
table. For networking, my idea is to use the users
unique id-> uid
as an identifier for their network. Then add a table when a network is instantiated by the user, naming the table network_
+the id from their 'users' table
, ex: network_uid
where pbud1
.network_uid
= pbud1
.users
.uid
. So if the user has an id of 6 it would be network_6
. Then within the new table "network_6"
, place relevant information on each row about each user that is added to that users network, ie; nid(key/ai) net_user_id(uid), geo_location, business, name, etc...
Goal: Allow each user within their parent network to access that specific user.parent customers information. Suggest users to user.parent due to geo_location of customer base between related users.
Honestly the semantics are not so important here as the structure and build of the DB table relationship in regards to the ability for networked users to access each others customers
information.
Any assistance on approach would be greatly appreciated!