Data Design:: designing for different price, price range

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Data Design:: designing for different price, price range

Post by kendall »

Hello,

I am developing a display catalogue for a promotional item print company.

The information is very complex and sortting it out into tables is a bit intrikit. my major hurdle is the prices of an item

the following factors contribute to the items price
each item has a price range e.g.
10-$10.00, 20-$10.00 etc.
However , the ranges may differ e.g.
another pdouct may have 100-$10.00,200-10.00
and they depend on the product

further to this a product may have a 2 sets of ranges based on a option e.g.
1 colour - 10-$100.00, 20-$200.00
2 colour - 100-$1000.00, 20-$2000.00
and again the option may vary

Now i am thinking of defing a price_list column to help separate the prices and use columned ranges. but i am still pose with the option of having duplicate entries and the different ranges.

my second option would be to make an attribute table and just have them enter an attribute => value as the product catalogue contains varying attributes e.g.
some products have a "print area" attribute other have a suggest colour attribute
this will allow them to specify the aring price ranges in this area.

i having a hard time deciding you advice is greatly appreaciated.

Kendall
the forum profile says i am a professional!!?? Im a professional? I thought i was me...a trinidadian...lol
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

entity-attribute-value idea fits better for describing entites of variable nature, imo. It will leave all logic to be implemented in your application though.
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Post by kendall »

Wierdian., i would have guessed so plus i see it making the data design alot easier. i trying to work out a strategy for php to interpret the data. See the thing is now that the display would need to be formatted in such a way(CSS). They want to have a ordered layout with the information and because the attribute - value theory generalises the information odering it out makes me difficult. i want to implement a guideline for attribute naming but i dont want to song like im limiting them(although i cud force their hand) I see that their cud be a window for error

Kendall
Thanks
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

you could add a column to attributes table... say 'importance' or something. This way more important attributes would be displayed prior to less important ones. Something like this is used in osCommerce, if memory serves.
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Post by kendall »

wierdian, hmmm ok i will take note of it thanks!

Kendall
Post Reply