What @martinbean is saying is that since all items in different sizes and colours are unique (with their own stock values), what you are doing is more like filtering the items. You ought to be able to get all the products of the same family and then gradually reduce the list as more constraints are added.
So, user selects product 609. You fetch all 609s that are in stock. Then select all Distinct values of colour and all distinct values of size.
User sees two dropdowns, colour (black, raspberry, mustard, Yellow), and another dropdown with Onesize, 12-14 and 18-20
As soon as one of the dropdowns is selected, you now filter the product by that criteria. If they chose black then the size box shows the only option 'One size'. If they choose yellow then the size dropdown shows two choices.
If, on the otherhand, they first select One Size, then the colour box changes to black, raspberry, mustard, removing the yellow.
(here I am assuming all variations in stock)
You could do this client side if the number of items is small (say, 200), or do an ajax call on each change of filters.
The benefit of ajax calls is that if another shopper is closing a transaction you can remove items that are no longer in stock.