MySQL Forums
Forum List  »  InnoDB

Getting Data From Multiple Tables
Posted by: Burhan Khan
Date: August 19, 2008 03:43PM

Hi:

I want to get data from multiple tables.
I have designed a design of my database in MS Access.
You can view it from here:

http://img391.imageshack.us/my.php?image=dbnf5.gif

Actually there are 4 tables.
one is PRODUCTS (i want to get products from that table)
2nd is COUNTRIES (products can be deliver to multiple countries)
3rd is OPTIONS (each product will have some DEFINED options)
and 4rd is MIDDLE-TABLE, i have created it as middle table.

Actually each PRODUCT can have multiple COUNTRIES and multiple OPTIONS.


My questions are:
how to fetch all products in USA?
or all products that have OPTION # 3 ?


I know middle-table is not a good idea, because it contains tables names and their IDs, like country_id or option_id.....

But i am not understanding how to do this?
Can anyone suggest me with a sample query?

Regards,
Burhan Khan

Options: ReplyQuote


Subject
Views
Written By
Posted
Getting Data From Multiple Tables
5371
August 19, 2008 03:43PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.