:: krowemoh

Friday | 27 JUN 2025
Posts Links Other About Now

previous
next

Project Outline for TPC-H

2025-06-17
tpch

Step 1 - Create the Tables

The first step is to use page 13 of the specification document to create the Pick version of the test database.

image

This page has the schema map and I need to create a BASIC program that will create all the attributes.

The following are all the files I need:

   1. INVENTORY-FILE
   2. SUPPLIER-FILE
   3. CUSTOMER-FILE
   4. ORDER-FILE
   5. COUNTRY-TABLE
   6. REGION-TABLE

I am going to translate the test to fit better into the way I write Pick at work as I think that we have a pretty good style.

The program to create the tables is in another castle:

https://krowemoh.com/devlog/tpc-h-schema.html

Step 2 - Generate the Data

The second step is to generate the data. This involves getting dbgen to work as the code is outdated and seems to have stopped working.

I wrote a post on how to get the dbgen tool working:

https://krowemoh.com/devlog/tpc-h-dbgen.html

Step 3 - Import the Data

The third step is to import the data into pick. This will involve writing a BASIC program to do the import and will likely need some logic to get the data set up properly as multivalue.

For example, orders have line items and in a relational database, these would be seperate tables. In multivalue however the line items will be contained inside the order.

Step 4 - Writing Query 1

The fourth step is to write the first query in BASIC. This is because SQL has a powerful query language but Pick expects you to use BASIC.

This is an interesting idea as it is up to the programmer to be performant. SQL can change the underlying programming as much as it wants because all SQL asks is the question, it doesn't dictate how the answer is reached. This is in contrast to Pick which makes you go looking for the answer.