Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: open
one database with 4 table:
1. categories table.
2. product table.
3. order table.
4. orderdetails table.
very basic relation database. The categories table is for one-to-many, and the product table is for many-to-many with the category entity.
All table will start of with the top field reserver for the ID(primary key) for internal identification.
My question is.
Since I already have an ID field. Do I need a parent_id field in the categories table for it to work(query) with the product table. Or can I just create the categores table with something lookin like this.
ID Int null Primary Key
and so forth.
(categoryId) if a product can only be in 1 category otherwise:
not sure why you need an orderDetails table as well, but maybe you do.
inventoryStatus (out of stock, backordered,etc)
discountAmount (coupons, discounts, etc)
Just my .02.