Blog Article: On Coins, Sites, Relational Databases and Why It Matters

On Coins, Sites, Relational Databases and Why It Matters

Some thoughts on what lead me to build this site and why things are not as trivial as they seem (and why not always simple is better).

I have considered myself a "coin collector" since I was a kid. I remember friends and relatives giving me coins because "you collect this stuff, here is a present". I diligently put them in a box, then in a number of albums, and even kept a notebook with records of what I have. This even came with a nice little hand-drawn graph representing how many coins I have from each country or from each year... (in retrospect, I can see the birth of this site there).

But... last year I read an article by a coin collector which made me realise that I was not a collector at all. I was a "hoarder" - somebody who just piles stuff with no idea what it is, no thought about a system, research or anything.

So I decided to start researching and become a proper collector. This involved building a database where I can record my stuff. Being a web programmer, it was easiest for me to build a web-based database. So I started looking for sources of information, offline and online and after some time it dawned on me that a site like Online Coin Club is more than needed.


Because of inherent problems with all the existing sources of information. These being:

- first, offline resources.
Books and catalogues. On paper. Apart from taking much space (two bookshelves in my living room now, to the annoyance of my wife), they are a) not easy to consult and find things in, b) inherently static (not update-able) and c) with a "flat" structure which does not encourage in-depth research.

What do I mean by this last? As an example - I am holding a coin, after much guesswork as to where it is located in the catalogue I manage to find it and all there is about it there is one row of dry data. To the effect of "coin X, mintage Y, mint Z". There may be some further elaboration about the rule of such and such king, and maybe composition ("0.500 silver") and size.

Now, being an inquisitive type, I would sometimes like to inquire further. Who is this king, how long did he rule, who came before or after him? Why are there some artist's initials below the effigy? Who is this artist? What else did he create? And what about the mint? Is it still there? What else did it produce?

Impossible to follow.

- second, online resources.
From these, I would have expected much more. Being from this generation which lived while dinosaurs roamed the Earth, long before there was the World Wide Web, I do not take the web for granted. I enjoy it, I appreciate it, I build it... And most of all I appreciate what makes it a "web" - the interlinking of resources. The fact that you can click on somebody's name in an article and go open a page about him/her and read in-depth information. Then, from that, click another link and research something else. Click, click, click...

I want to do it on coin sites. If I just got a one cent coin in the mail featuring the effigy of a gentleman of apparent British name and extraction styled as "Rajah of Sarawak" - I want to learn the story of this. How is he a Rajah? What is Sarawak when you come right down to it? I have to admit it was not in our geography textbooks at school. I would be fascinated to know. Except, on most coin-related sites you can't. They do not have that in-depth information. They seem to be online versions of the paper catalogues.

Well, forward comes the web programmer in me... I started building a site where the sole rule was that it should, in the end, be good enough that even I would approve. Which turned out to be a major hassle.

Why? You need to know about databases to understand (and databases are what makes the web have all that information it has).

Databases come in many shapes, but in general you may think of them as "flat" (storing some blobs with no apparent or easy way to follow links between them, if any) and "relational" - where you have relations between things. To make a long story short, this applies in a big way to our coin database. If I want to enter data about a coin properly (i.e. in a way which will enable me to do this click-click-clicking I enjoy so much), I need to "relate" entities to it, like people, places, mints, sources of information etc.

The catch here is that these entities are related to other entities and the whole business, to use database terminology, "cascades" - sometimes to ridiculous proportions.

Let's give an example. Say, I have a Bulgarian 1 Lev coin from 1912. It is of the "silver one Lev" type (there being copper-nickel, aluminium and even iron types later, as the economy deteriorates). This type (plus the others) needs to be entered into the "types" part of the database (a "table", in database terms). Each of them though is linked to a currency - after all, one silver Lev is not at all like a one silver Ottoman Lira. So you enter the currency, but currencies tend to change - there is the "Lev" of the Principality and Kingdom, then the quite different Lev of the People's Republic (which was devalued at some point so there's two of them) and then the modern Lev of the (plain) Republic. And the currency, of course, supposes you already have the listing for Bulgaria in the "countries" table, complete with all the trappings (text, dates etc.).

Then comes the king. Ferdinand the First. Of Bulgaria - quite distinct from Ferdinand the First of Romania, who ruled at the same time and was his cousin (which did not prevent a couple of wars between their countries). And, if you have a king in your database - it's only proper to also enter those before and after (otherwise, how do you follow the successions of their reigns?); which then leads you to the 125 Emperors of Japan...

And, worse, to what we call the "edge cases" in programming - stuff that should not normally happen but invariably does happen; where 1% of cases account for 99% of the complexity of your code and data structures.

Namely, you would think that the relationship between "person" (in a "persons" table) and "country" (in a "countries" table) would be a straightforward "reign" (in the "reigns" table) - King X ruled country Y from year such and such of Our Lord to year such and such... (and, I have not even touched the complexity of different dating systems yet, or the inconsistencies within one dating system - such as "old style" and "new style" AD dates - used at different times in different countries, and even for different purposes within the same country; nor the fact that sometimes exact dates are not known - and how do you explain to a computer that when sorting by age, person A comes before person B even though the dates for both are exactly the same - "unknown"?) And you think then that it would be easy to link a coin to a reign when it was issued.

No such luck in the real world though. Consider the case of our own Queen who currently reigns over 17 separate sovereign countries, and in the past reigned over an assortment of at least 19 other countries, dominions, colonies and dependencies (that's how many I have in the database now) - one of them "not recognised" - by herself! (in other words, the natives considered her Queen but she did not; which did not prevent them from minting coins with her effigy). Consider the case of King James who was King of England and (separately) King of Ireland as James II and King of Scotland as James VII. Consider the case of William and Mary who reigned at the same time, each in his/her own right, as co-rulers. Consider Sultan Murad II who abdicated in favour of his son but then returned to the throne in a new reign. After which reign his son Sultan Mehmed II took the throne again... Consider the many cases where a pretender issued money as if he was the rightful ruler. Consider then the case where some future historians decide that, in fact, yes - he was the real ruler so the hitherto "legitimate" ruler is re-classified as pretender. Consider the case where a "principality" (i.e. in theory a totally dependent territory like Bulgaria before 1908) issues its own money - featuring said Ferdinand even though it should not - it should have had the Sultan on its coins and not the future King who was still only a prince; then consider Egypt which did have the Ottoman Sultan's toughra at that time - even though the country had been virtually independent from the Ottoman Empire for a century. Consider the case of the Second Kingdom of Poland which never had a monarch but had to put somebody's effigy on its coins; so they put the effigy of a much earlier queen (of the First Kingdom) - with the small catch that nobody knows what she looked like, so the effigy was an "artist's impression" (in other words, pure fantasy). And last, consider the case of Fiji which became a republic in 1987 but continued to feature Her Majesty on its coins for almost 30 years later...

And then... well, then comes the king's effigy (some had many). And the legend. And the artist. And the mint. Which in this case was Kremnitz, in Austria-Hungary. Which mint is now Kremnica in Slovakia - but you cannot list that with the coin, because the mint was not called Kremnica in 1912 and Slovakia did not exist yet. And let's not even get into the question of mint marks... Then there is the reference sources (and which edition of a source said what... since, as it happens, sometimes one edition of a book or catalogue does not agree with another). And how do you reconcile these, when for Australian pre-decimal coins you get as many as four different mintages listed for the same coin in different catalogues?

Got a headache yet? I do, so I'll wrap up.

The plus side of all of the above though is that once it is done properly, you can then have the benefit of "reverse lookups". Namely, you can now see not only "which mint did this coin come from" but also see a list of every coin this mint produced; a list of every coin issued during a monarch's reign, or carrying a particular effigy or legend, or any combination of the above. If you are interested, you can even do simple math like "how many coins of debased silver carrying effigy X and mint mark Y did mint Z produce between these years", and even "what is their combined catalogue value as of now". Not that I am going to do such a thing but hey - who knows? Curiosity is a great driving force.

Plus, this now provides a platform for research-minded folk to do their stuff here, at this site, instead of wasting weeks digging up bits and pieces of information from various sources.

Buy American Gold Eagle Coins
Buy American Gold Eagle Coins
Article Details
AuthorPavel Kalinov
DateApril 13, 2016