Not sure why you have VARCHARs for primary keys, why not use the conventional 
auto-increment int so you can dispense with
the LastGeneratedArtifactID table.

CREATE TABLE Manual_Artifact
(
        ArtifactID INT(11) NOT NULL AUTO_INCREMENT,
        . . . other fields . . .
        CONSTRAINT ArtifactID_pk PRIMARY KEY (ArtifactID)
)

You'll also need similar type primary keys on your other tables, and also set 
up the foreign key constraints for your db integrity if you really want to go
that far for this project. Some of those tables could be coalesced to simplify 
the thing - as per the inane comment from the guy in Holland (or wherever)
for instance the Location and Manual_Type tables.

Another thing, although MySQL is fine but for this I think SQLite might be a 
better choice of db. Its access methods are all in-process ie. no external
dbms service to bother with, just a library to link in and the physical 
database is a disk file (.s3db extension). It has a much 'lighter' db footprint.

Steve.

---------------------------- Original Message ----------------------------
Subject: Re: Thoughts on manual database design?
From:    "Jay Jaeger" <cu...@charter.net>
Date:    Thu, September 24, 2015 6:52 am
To:      cct...@classiccmp.org
--------------------------------------------------------------------------

> If anyone cares a draft data model is visible at:
>
> http://webpages.charter.net/thecomputercollection/misc/manualmodel.pdf
>
> (It may change as I work on the design).
>
> Biggest change from earlier discussions: I found no reason not to merge
> the manuals/artifacts relationship table into the artifact table, and I
> reduced the primary key columns down to only those absolutely necessary
> to guarantee uniqueness.
>
> JRJ
>
>


Reply via email to