Jump to content

actually, some help with a db layout...


glennn.php

Recommended Posts

i'd love some help with a complex (for me) db layout

 

for each registered client, i have 17 forms - Categories, each with as many as 24 values - Items, to be stored.

 

i was advised to create a Cats table, with cat_id and cat_name, and an items table, with cat_id, item_id, and item_name, and an amounts table, with client_id, cat_id, item_id, amount ... but this seems a bit obtuse.

 

could someone tell me if there's a simpler way to store such data? i've become a bit confused now...

 

:o)

 

thanks much

 

GN

Link to comment
https://forums.phpfreaks.com/topic/206563-actually-some-help-with-a-db-layout/
Share on other sites

Hi,

 

it depends what you actually need to store, i mean...

i was advised to create a Cats table, with cat_id and cat_name, and an items table, with cat_id, item_id, and item_name, and an amounts table, with client_id, cat_id, item_id, amount ... but this seems a bit obtuse.

...if you dont need them, dont have them? why so many tables? is there a way to "merge" columns from tables to make just a couple of tables? Without knowing exactly whats on your forms and how they are used i can only speculate but what about:

 

1 form for all your users (name, email, address etc etc)

1 form for all your users items (made_by, item_name, item_price etc etc)

and whatever else (like i said not sure what else you have there)

 

but like rather than having a seperate table for each cat (assuming thats category) just have the one table but define which cat it belongs to maybe in the second column (the first being a item_id of somesort for easy referencing)

 

hope that is somwhat helpful

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.