I have a database design for an E-commerce website. Need to know how to display related product for each specific product For example: A customer is viewing a product on the website, say a laptop.
There's a section on the left where i need to display products from the database that are associated with this particular product. This might be a charger or an external hard disk, etc. but only one which WILL go with this specific laptop (Meaning the charger HAS to be compatible with the laptop) I don't understand how to relate the products. Thanks in advance!
You should create a table to hold the used-by relation between the, in this case, laptop and loader:

create table usedby (
parentid number not null,
childid  number not null);