Sample data: O
|Top Previous Next|
Customer orders with several order lines are a typical case for databases. The example can be expanded to "shopping cart with several items" and many other types of data. Below is a way to generate data for such a case. The sample project can teach you how.
Generating these is a two-step process:
Generate fixed number or random numbers of rows, eg: 100000.
ORDERS table example
Order Lines table
Generate between 1 and 5 rows "for each in" the orders table. Select the ORDERLINES table and for Rows, select For each in... - then select the "master item" from the list: ORDERS. Enter values for "between 1 and 5" rows.
When generating data for the ORDERLINES table, you can select values from the "master" item, if required.
ORDERLINES table example