The data
This archive started as a database course project at TalTech: 21 tables designed in Oracle to document wearable art from first sketch to sale. Here it runs on PostgreSQL, with the schema cleaned up and the search built in.
Entity–relationship diagram
The original design from the course project.

From Estonian to English
| Course project (Oracle) | This archive (PostgreSQL) | Holds |
|---|---|---|
KUNSTNIK | artist | Artists and studios |
TEOS | artwork | The wearable pieces |
TEOSE_TYYP | artwork_type | Standard types (dress, brooch…) |
UUS_TEOSE_TYYP | custom_artwork_type | Types added by artists |
MATERJAL | material | Materials, origin, sustainability |
TEHNIKA | technique | Techniques |
TEOSE_MATERJAL | artwork_material | Which materials, how much |
TEOSE_TEHNIKA | artwork_technique | Which techniques, in what order |
LOOMISE_ETAPP | creation_stage | Making stages and hours |
MEEDIA | media | Photos and their credits |
SUNDMUS | event | Exhibitions, galleries, runway shows |
TEOSE_SUNDMUS | artwork_event | Where a piece was shown |
KOLLEKTSIONAAR | collector | Buyers and collectors |
TELLIMUS | commission | Commission requests |
PAKKUMINE | offer | The artist's offers |
TEHING | transaction | Payments; traces ownership |
TEHINGU_TYYP | transaction_type | Deposit, sale, fee |
KINNITUS | endorsement | Professional endorsements |
KINNITUSE_TYYP | endorsement_type | Education, exhibition, curator |
HINNANG | review | Community reviews |
USALDUSSKOOR | trust_score | Trust score over time |
What changed in the port
- Every foreign key and NOT NULL rule now holds: the original inserts referenced columns that didn't exist and put NULL into required keys.
- A review is about an artist or an artwork, enforced with a CHECK, instead of requiring both.
- Join tables use the (artwork, material) pair as the key instead of a surrogate id plus a composite key.
- Countries are ISO codes, statuses and event types are checked against fixed lists, dates can't end before they start.
- Ownership history is traced through commissions and transactions, as the final version of the course project decided, so the earlier OMANDILUGU table is gone.
The course queries, running live
Exclusive, labour-intensive pieces
“Show me only pieces that took real time to make”: more than 100 hours of handwork.
SELECT a.title, sum(cs.hours) AS total_hours FROM creation_stage cs JOIN artwork a ON a.id = cs.artwork_id GROUP BY a.id HAVING sum(cs.hours) > 100;
- Emerald cascade choker 162 h
- Nocturne gown 159 h
- Ink rib gown 110 h
One artist's work
“I like Halcyon Knit Lab's work. Show me all their pieces.”
SELECT ar.name, a.title, t.name AS type, a.description FROM artist ar JOIN artwork a ON a.artist_id = ar.id JOIN artwork_type t ON t.id = a.artwork_type_id WHERE ar.name = 'Halcyon Knit Lab';
- Cloud rib sweater Jacket
- Oxblood cable pullover Jacket
- Moss lace cardigan (in progress) Jacket
Luxury materials
“Which pieces use silk, cashmere or merino, and how much?”
SELECT a.title, ar.name AS artist, m.name AS material, am.quantity
FROM artwork a
JOIN artwork_material am ON am.artwork_id = a.id
JOIN material m ON m.id = am.material_id
JOIN artist ar ON ar.id = a.artist_id
WHERE m.name IN ('Silk', 'Cashmere', 'Merino wool');- Baroque pearl rope, Brandt & MirelleSilk · knotting thread
- Cloud rib sweater, Halcyon Knit LabMerino wool · 900 g, undyed
- Folded paper bustier, Atelier VantreurSilk · 2 m organza
- Ink rib gown, Atelier VantreurSilk · taffeta, 5 m
- Nocturne gown, Atelier VantreurSilk · lining, 4 m
- Afternoon jacket, House of WorthSilk
- Ball gown, House of WorthSilk
- Bonnet, Balch, Price & CompanySilk
- Bonnet, H. O. HanlonSilk
- Brooch, DumoretSilk
- Coat, Iida & Co./TakashimayaSilk
- Couture gown, Guo PeiSilk
- Dinner dress, House of WorthSilk
- Dolman, Emile PingatSilk
- Dress, L.P. Hollander & Co.Silk
- Dress, House of WorthSilk
- Dress, M. A. ConnellySilk
- Ensemble, Mrs. Samuel ShimnSilk
- Ensemble, S. GluckSilk
- Evening cape, Maison PingatSilk
- Evening cloak, Maison PingatSilk
- Evening coat, House of WorthSilk
- Evening coat, House of WorthSilk
- Evening dress, RouffSilk
- Evening dress, House of WorthSilk
- Evening dress, Lord & TaylorSilk
- Evening dress after Elizabeth I, Vivienne WestwoodSilk
- Evening ensemble, Charles Frederick WorthSilk
- Evening jacket, House of WorthSilk
- Gold couture gown (detail), Guo PeiSilk
- Hat, Mme. MantelSilk
- Jacket and skirt, Yohji YamamotoSilk
- Newspaper dress for Christian Dior, John GallianoSilk
- Parachute cape, Alexander McQueenSilk
- Shoes, Hattat FrèresSilk
- Shoes, Thomas RidoutSilk
- Slippers, E.D. Burt & Co. Fine ShoesSilk
- Two dresses, Angels and Demons, Alexander McQueenSilk
- Walking suit, House of WorthSilk
How search works
A materialized view joins each piece with its maker, type, materials and techniques into one weighted full-text document (title and maker count most, descriptions least). A query matches by full-text search in both a plain and an English dictionary, so “dresses” finds “dress”, and falls back to trigram similarity on accent-free text, so a typo like “embroidry” still finds embroidery. Both are backed by GIN indexes.