I wrote a routine to set up the sample database AdventureWorks in Pick. This was a bit of a distraction as the real goal is to create a demo site using SERAPHIM and so I needed some sample data.
I like the AdventureWorks database because it is similar to what I do for work which is a lot of inventory management and order entry. AdventureWorks seems to be a bicycle parts manufacturer and they have a small amount of orders, customers and inventory.
The routine was a bit involved as translating a SQL system where everything is in first normal form to something that is multivalue friendly isn't super straightforward. I could have kept the normal form but I wanted to try and make the data as Pick like as possible.
One example is that the order had pointers to an address table. I read the pointer and brought the address directly into the order. This also makes sense as the address could change at the pointer but the order should have a copy of the address anyway. I wonder how this works in a real system.
I also made the address a multivalue field which was great.
I also brought the order lines directly into the order. This means that when you look at an order, you see everything about it directly. This is quite handy.
The inventory is still spread out with a main table and some extra tables. These made sense as having a CATEGORY-TABLE and MODEL-TABLE will be helpful when creating filters for my demo site.
The customer also had pointers to to multiple addresses which I combined and multivalued on a field called ADDRESS.TYPE.
I wish there was more data but I think this is a good enough base to get the demo site working. This should let me set up a website where you can browse for parts, add them to a cart and ultimately checkout.
I also made this into a git repo so that others can use it. I think this could be a good sample database to learn Pick with.