I want to keep customers' order history.
I am thinking of keeping names of product, number of product ordered, price of product, date of order, name, address etc
Table can be order_history and there will be field for id, date, cutomer_id,..
Then a question regarding names and number of products came in my mind.
How should I keep them in the database?
A customer may order more than one product with different numbers.
Should I keep it in one field in array, like {product1, 2, product2, 1, product3,2 etc}
Or should I keep name and number separately?
Or any other way?
What is the common practice?
Can you suggest an appropriate database structure, please?