Dave Hubbard said:
Thanks to all, maybe I should explain further. I have one table with all the
country names, and their ID #'s. I have others tables for each country
coins.
You can do this if you wish, but everything that MS Access might
make easy for you will be thrown away.
This way I can have a seperate table listing the characteristics for
the coins from the seperate countries.
Extended characteristics of a coin, by country, can be further
normalized in separate tables. I would have to know a lot more
about these characteristics, and might have to go with Super Type
and Sub Type table arrangements, but in the end, it is a problem
with known solutions.
Just as a side note, when you type out "tbl COUNTRY ( 10 )", I am
thrown for a complete loop. It appears to be part table name part
Data Definition Language (DDL). Is this really the name of a table?
With spaces and () (both of which should not be used in table
names)?
will just a tabale having the characteristics of
coins from the country having the ID # ( 10 ).
Maybe this clearifies my ideas.
Oh, I believe I understood the first time.
Please, don't do it. There are other solutions.
Unless I can have one table with country names, and one table with just
coins. I want to be able to have ID #'s starting at 1 for each countries
coins.
You mentioned something about this previously. Can you please
explain what difference it will make having ID #'s starting at 1 for
each country's coins? I know only the faintest bits and pieces of
numismatics. Is there some requirement defined by this fascinating
branch of collecting that requires that the coins of each country be
assigned a number starting with 1? Otherwise, from a programming
and db design standpoint, I can't really think of one. Especially
not when every coin will reside in the Coins table I mentioned.
Googling on Database Normalization will provide many good articles.
Most of them are written for other database professionals (the
actual written rules of Database Normalization will throw you for a
loop if you don't know exactly what they are talking about).
Knowledge about Database Normalization also goes hand in hand with
some knowledge of Data Modeling.
Data Modeling is a process of describing the "entities" related to
whatever process or business (or game, personal hobby, etc.) is
under discussion. Usually this involves lots of lines and boxes and
notations on a chart. There are several methods available to "data
model" something, and several of these methods exist to make the
eventual job of designing a relational database easier.
Database Normalization is a proces of decomposition, of breaking
down information until you get down the basic elements that describe
entities, and making sure that the information kept about an entity
(i.e. "table") *really* belongs to it, and not to something else (or
somewhere else).
Good Basics:
About.com
http://databases.about.com/od/specificproducts/a/normalization.htm
Intermediate:
MySQL's website:
http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html
Advanced:
Wikipedia:
http://en.wikipedia.org/wiki/Database_normalization
Very Advanced:
University of Texas:
I quite like this whole site, since it has a handy menu on the right
describing many important aspects of the database world:
http://www.utexas.edu/its/windows/database/datamodeling/rm/rm7.html
---------------------------
In addition to the tables I already mentioned:
Continents
ContinentID AUTOINCREMENT -- PK
ContinenentName TEXT(16)
Countries
CountryID AUTOINCREMENT -- PK
ContinenentID INTEGER -- FK to Continents
CountryName TEXT(128)
Mints
MintID AUTOINCREMENT -- PK
CountryID INTEGER -- FK to Countries
MintName TEXT(128)
Coins
CoinID AUTOINCREMENT -- PK
MintID INTEGER -- FK to Mints
Denomination TEXT(48)
Grading TEXT(36)
HeadsPicture ?
TailsPicture ?
Inscription TEXT(48)
Motto TEXT(48)
Stamping
StampID AUTOINCREMENT -- PK
CoinID INTEGER -- FK to Coins
StampDate DATETIME
You can add:
CoinAttributeTypes
CoinAttributeTypeID AUTOINCREMENT -- PK
AttributeName TEXT(48)
CoinAttributes
CoinAttributeID AUTOINCREMENT -- PK
CoinID INTEGER -- FK to Coins
CoinAttributeTypeID INTEGER -- FK to CoinAttributeTypes
AttributeValue TEXT(48)
These two tables allow you to add an unlimited list of additional
custom attributes for any particular coin. The fixed an unchanging
attributes go in Coins, and the variable custom attributs go in
CoinAttributes. Some work could expand it to provide for templated
lists of custom attributes by country.
Sincerely,
Chris O.