Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Why not use mySQL in a relational format?


Guest

Recommended Posts

Posted

I am wondering why osCommerce does not take advantage of mySQLs relational backend?

 

Instead all the relations are defined in the PHP code...

 

I dont mean this to be a stupid question...

 

I am currently working on a project and one of my colleagues is insisting that the SQL DB is setup relationaly with the InnoDB format.

 

Can anyone clarify for me why all the PHP projects I see around dont use the relational features of mySQL??

Posted

All mySQL databases are relational, it is therefore called a relational database management system. In order to create the relationships you do it through code. In the case of OSC and the other PHP projects the relationships are established through the PHP code.

 

For example:

 

You have two tables(customers, orders). You have a a bunch of fields in each table, but in the customer table each customer has a customer-id field this field is unique for each customer. Then in the orders you have a customer-id field also. The tables are "related" by that field. You would then write a sql query to relate the two and pull all orders related to a particular customer. In the case of OSC this query is written in the PHP code.

 

InnoDB simply refers to how the data is stored and handled. For more information on this see: InnoDB.

 

 

Hope this helps you.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...