Frames Modems Help Home Page Chipsets Search No Frames
Diary Entries See also Site Info & Diary.
25 September 2001 Continuing building the Tables...

(from now on the starting & ending lines on previous diary entries are ommitted.)

  "Normalising" a database is the process of making sure that it's structure is as effective & efficient as possible. I've tried to do that on the list of manufacturers above. Each Field (individual lines between the brackets) will contain just one entry for each mfc - the only exception (used to be) the Name, but somehow it didn't seem right not to include a name within each record (a Record is a set of all the Fields within a table - an individual database is then the set of all the records stored, and a relational database is the set of all databases plus the relations between them).

What's needed now is lots of little databases containing things which can appear more than once with each manufacturer. They will be related to the mfc database via a MID field, which will contain the mfc.MID value from their manufacturer. That's the theory at least.

 
  1. the Name of the manufacturer:
      CREATE TABLE names (
        NID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
        Name TINYTEXT NOT NULL,
        YID TINYINT UNSIGNED NOT NULL REFERENCES nameTypes,
        MID INT UNSIGNED NOT NULL REFERENCES /mfc/,
        Dead TINYINT UNSIGNED, /* boolean for the deceased */
        KEY(Name(20)),
        KEY(MID)
        );
    (Updated 01 Nov - made generic & a lookup table added)
    (Updated 19 Nov - removed the lookup table & added it's functionality here; the REFERENCES doesn't actually do anything in MySQL [the JOIN syntax does it instead], but is helpful in reminding me what they point to)
    (Updated 09 Dec - re-added NID [very useful for updates])
    (Updated 10 Dec - added Dead - a mfc can be active but one of the names dead)
    (14 Jan - all tables continued now at 14 Jan)
  2. Types of Manufacturer, etc.:
      CREATE TABLE nameTypes (
        YID TINYINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
        Name TINYTEXT NOT NULL
        );
    (added 27 Oct - forgot to add it originally)
    (updated 14 Dec - changed name from mfcTypes to nameTypes + removed table tms [trade-marked names] & added it as an option here.)
    (updated 17 Dec - removed table others [catch-all model] & added it as an option here.)
  3. Web-Links to other websites (this is going to be very generic):
      CREATE TABLE links (
        LID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
        Link TINYTEXT NOT NULL
        Updated TIMESTAMP NOT NULL,
        );
    (updated 09 Jan - made Primary Key Auto_Increment [forgot it originally].)
    (updated 12 Jan - changed ‘Created DATE’ to ‘Updated TIMESTAMP’.)
  4. Types of Links (this helps to standardise them also):
      CREATE TABLE linkTypes (
        TID TINYINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
        Name TINYTEXT NOT NULL
        );
  5. Links Look-up - this is how the links for a name are found:
      CREATE TABLE linkNLU (
        NID INT UNSIGNED NOT NULL REFERENCES names,
        LID INT UNSIGNED NOT NULL REFERENCES links,
        TID TINYINT UNSIGNED NOT NULL REFERENCES linkTypes,
        Description TEXT,
        PRIMARY KEY(NID, LID, TID)
        );
    (Updated 02 Oct - links above was made totally generic & this lookup table added)
    (updated 09 Jan - changed MID [/mfc/] to NID)
  6. Logos:
      CREATE TABLE logos (
        GID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
        NID INT UNSIGNED NOT NULL REFERENCES names,
        Name TINYTEXT NOT NULL,
        Alt TINYTEXT,
        Title TINYTEXT,
        LID INT UNSIGNED REFERENCES links,
        KEY(NID)
        );
    (Updated 01 Jan - GID added for easy update plus NID as foreign key)
    (Updated 09 Jan - Width & Height removed since PHP can find this automatically [using GetImageSize() - see XXXVI. Image functions]; also added LID [forgot it initially])
  7. Credits (for people that help + info):
      CREATE TABLE credits (
        MID INT UNSIGNED NOT NULL,
        Updated DATE,
        Info TEXT,
        KEY(MID)
        );
  The main thing that's missing now is the actual modems (!), but this will need the Chipset mfc pages to be constructed first, then the modems. Then the Help pages. Then Forms to fill the databases. Then PHP scripts to display the Website pages. Then changing half the organisation above as I discover new things. Oh, mama!

One other thing - I did download MySQLGUI from the MySQL download page (mysqlgui-win32-static-1.7.5-2.zip 668 KB) on the 21 Sep and it has finally proved useful in allowing me to copy the Create Table commands above - these are actually SQL Commands - from an IE HTML window & pasting them into the MySQLGUI window then executing them. Much quicker (once created) than typing them out all over again, and far easier when little mistakes are made to correct & re-issue.

Postscript - just so that you know what it is like at my end... 40 emails (6.5 MB) in one day waiting for me when I connected to my ISP - 1 from my website & 39 others, mostly viruses, some spam. These days I use POP3 Scan Mailbox to delete all the virus emails from the Server's mailbox. Don't ever send me attachments - your email will simply be deleted unread.