The ProgrammersTalk Community
Forum Register Search Today's Posts Mark Forums Read
Register

Go Back   The ProgrammersTalk Community > The ProgrammersTalk > General Talk


Welcome to the The ProgrammersTalk Community forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Reply
 
LinkBack Thread Tools    Display Modes   
  #1 (permalink)  
Old 07-10-2007, 01:30 AM
siLenTz's Avatar
siLenTz siLenTz is offline
Jr. Programmer
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 4
Join Date: Jun 2007
Posts: 87
iTrader: (0)
siLenTz will become famous soon enoughsiLenTz will become famous soon enough
Icon1 Options & Binary Optimization

Quote:
Originally Posted by siLenTz View Post
I agree, it is a very great solution. However, It still have there own
disadvantage. For example: I am run my own clothes shop. My shop sell
many shirt with many difference colour. There are Red, Yellow, Black, White
and Blue. Now my customers check my website and search for shirt which
is can be Red, Yellow, Black, and it can be mix with those three colour.
So the possible outcome is: R,Y,B,RY,RB,YB,RYB. In this case you using binary
isn't so effective. Imagine if there are over 20 of difference options can
be select more than one and you want to search with keyword OR instead
of AND and it is going to be insane.
To clearlify my post, I will provide some examples:
Here it is my database:

define that BLACK = 1, BLUE = 2, RED = 4, and WHITE = 8:

Code:
Clothes ID     Clothes Colour
1             1 (black)
2             2 (blue)
3             3 (black and blue)
4             5 (black and red)
5             9 (black and white)
6             7 (black blue and red)
7             11 (black blue and white)
8             13 (black red and white)
9             15 (black blue red and white)
Now I want to search any clothes that have black color(some clothes have
multi-colour which also include black colour). I didn't mean it is impossible
but it is just difficult to search.

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!

Last edited by siLenTz : 07-10-2007 at 07:17 AM.
Reply With Quote
  #2 (permalink)  
Old 07-10-2007, 01:34 AM
TeraTask's Avatar
TeraTask TeraTask is offline
PT Staff*
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 3
Join Date: Jun 2007
Location: Reno, NV
Posts: 428
iTrader: (0)
TeraTask will become famous soon enoughTeraTask will become famous soon enoughTeraTask will become famous soon enoughTeraTask will become famous soon enoughTeraTask will become famous soon enoughTeraTask will become famous soon enough
This thread continued from a divergence on Want to Be a Computer Scientist? Forget Maths

__________________
Jeremy Miller
Content Farmer - Optimized Automated Blog Posting

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #3 (permalink)  
Old 07-10-2007, 07:13 AM
ccoonen ccoonen is offline
PT Staff
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 4
Join Date: Jun 2007
Location: Wisconsin
Posts: 308
iTrader: (0)
ccoonen is on a distinguished roadccoonen is on a distinguished roadccoonen is on a distinguished roadccoonen is on a distinguished road
Seems like you need a mapping table... if this is what your asking?

Table 1: Clothes
Table 2: Color
Table 3: Clothes_Color (Mapping Table)

This way you can have a many - to - many relationship and have infinite combinations of anything
Reply With Quote
  #4 (permalink)  
Old 07-10-2007, 08:26 AM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
Programming Expert
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,111
iTrader: (0)
HelloWorld will become famous soon enoughHelloWorld will become famous soon enoughHelloWorld will become famous soon enough
Can't you just use %black% from mySQL to find it...

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #5 (permalink)  
Old 07-10-2007, 09:09 AM
siLenTz's Avatar
siLenTz siLenTz is offline
Jr. Programmer
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 4
Join Date: Jun 2007
Posts: 87
iTrader: (0)
siLenTz will become famous soon enoughsiLenTz will become famous soon enough
Quote:
Originally Posted by HelloWorld View Post
Can't you just use %black% from mySQL to find it...
Actually what we store are only a binary number, So the black will be replace
with 1. In database that I provided above actually everything between the
(...) are description the actual data are number. This thread are continue from
the Want to Be a Computer Scientist? Forget Maths.

In the previous thread we discuss about complusory of mathematic in program-
ing, as TeraTesk claimed that mathematic is very important for every application.
I agreed tha advanced mathematic is very important but not for every type
of application. there are difference type of application and required difference
level of mathematic uses. Some programs don't require mathematic knowlegde.
TeraTesk disagree with these idea, and try to prove that his opinion was right by
provided an problem with several solutions. I raise one problem back to proving
that his solution is best for some certain points but it still has disadvantages.

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #6 (permalink)  
Old 07-14-2007, 06:53 PM
TeraTask's Avatar
TeraTask TeraTask is offline
PT Staff*
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 3
Join Date: Jun 2007
Location: Reno, NV
Posts: 428
iTrader: (0)
TeraTask will become famous soon enoughTeraTask will become famous soon enoughTeraTask will become famous soon enoughTeraTask will become famous soon enoughTeraTask will become famous soon enoughTeraTask will become famous soon enough
Quote:
Originally Posted by siLenTz View Post
In the previous thread we discuss about complusory of mathematic in program-
ing, as TeraTesk claimed that mathematic is very important for every application.
I agreed tha advanced mathematic is very important but not for every type
of application. there are difference type of application and required difference
level of mathematic uses. Some programs don't require mathematic knowlegde.
TeraTesk disagree with these idea, and try to prove that his opinion was right by
provided an problem with several solutions. I raise one problem back to proving
that his solution is best for some certain points but it still has disadvantages.

Finally coming back to this to do an article illustrating the OR comparison and saw what you posted. I most certainly did not say that advanced math was a necessity unless you're indicating that a first semester in college algebra is advanced. I think you misunderstood some of my points.

OK. Off to write that tutorial now ...

__________________
Jeremy Miller
Content Farmer - Optimized Automated Blog Posting

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #7 (permalink)  
Old 07-14-2007, 08:36 PM
TeraTask's Avatar
TeraTask TeraTask is offline
PT Staff*
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 3
Join Date: Jun 2007
Location: Reno, NV
Posts: 428
iTrader: (0)
TeraTask will become famous soon enoughTeraTask will become famous soon enoughTeraTask will become famous soon enoughTeraTask will become famous soon enoughTeraTask will become famous soon enoughTeraTask will become famous soon enough
OK. Got the code written for the tutorial and will write up the tutorial of it tomorrow. Be sure to check back then.

__________________
Jeremy Miller
Content Farmer - Optimized Automated Blog Posting

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

   Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 01:06 PM. Powered by vBulletin
Copyright © 2000 - 2007, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO © 2007 ProgrammersTalk Sedo - Buy and Sell Domain Names and Websites project info: programmerstalk.net Statistics for project programmerstalk.net etracker® web controlling instead of log file analysis


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50