The Orders Table
What are orders?
How about manna for the soul? It’s the juice which keeps me going and now lets just get on with the orders table...
Orders Table
The Orders table stores customer orders. ding! ding! ding!
Three columns of information per order.
Why only three columns? Good question! Well, most of the gory details are in the order items table, coming up next. [oh no! more tables?? Just one more, and we are done!)
We uniquely number each order (the order_num column).
Order_num - Unique order number. It’s the primary key for this table.
Orders are linked to customers by the cust_id column. [y’know... which customer placed which order...]
cust_id - common shared column with the customer’s table. Technically, it’s called as a foreign key column. Like I said, don’t fret about it.