Results 1 to 4 of 4

Thread: Table design

  1. #1
    Join Date
    Jul 2003

    Unanswered: Table design

    Hi, i am creating a database to keep information about which softwares are installed on several machines in different rooms. I came up with a table named 'image'. this table will consist of an imageID, imageName and the software IDs of the different softwares installed on the system. The software details with softwareID, version no, license info, etc. will be stored in a table named 'software'.

    The problem is that each image will be having around 35 softwares. I have approximately 5 images, so 5 records with 37 fields. first 2 are imageID and image name and rest of 35 fields are softwareID1, softwareID2 .... softwareID35.

    I don't know if this design is correct or good. Please suggest me if i should change it and if possible please tell me the fields of the tables. I tried creating this table but access does not allow me to save the table telling that there are too many indexes in the table. I am new to access, so please help me out.


  2. #2
    Join Date
    Jul 2003
    Amsterdam, Nederland
    Hi there,

    the first 2 are OK (imageID and image name )
    But for the next 35, just use 1 with the name: SoftWareID
    And only store the folowing number of the Software

    so :
    if they have id 9 and 11 and 25

    just store : 091125

    then cut then in pices

    or use binary number storege

    SoftwareID1 =1
    SoftwareID2 =2
    SoftwareID3 =4
    SoftwareID4 =8
    SoftwareID5 =16
    SoftwareID6 =32
    SoftwareID7 =64

    just store the number 10 and then you know that they have
    SoftwareID2 and SoftwareID4
    or store 28 and you know they have
    SoftwareID5 and SoftwareID8 and SoftwareID3

    This is the best way to save space and time

  3. #3
    Join Date
    Dec 2002
    Préverenges, Switzerland
    your bitwise scheme is perfectly correct and it's certainly fun!

    i used to do that sort of stuff in machine code on an ICL mini in 1972, then on a Wang desktop in 1974, then a Sharp Z80 (8MHz CPU - wow!) in the early 80's, but back in those days a 180kB floppy drive was one months salary and the expression "hard disk" was just 2 four-letter words unless you were something big in "corporate".

    nowadays it's excentric to have less than 10GB empty on a machine before it becomes obsolete, so personally i would forgo the joys of bitwise stuff, and look for simplicity & flexibility.

    an alternative table structure that might be worth considering is:

    machineID, autonumber, primary key
    etc everything that identifies the machine

    softID, autonumber, primary key
    etc everything that identifies a software package

    lookup to machineID
    lookup to softID

    there is some space-saving (pace marvels), and it's so much simpler to add new software or delete software that is no longer used(no table mods needed, unlike nisarh's first pass).

    Last edited by izyrider; 07-22-03 at 14:12.

  4. #4
    Join Date
    Jul 2003
    Thank you very much to both of you. I appreciate your response. I will let you know the solution that i am now trying to apply in my database design. I have kept the table image with imageID and imageName as it is and added only one more field softwareID.

    The other tables, software table included, are the same as before. I have created a new table named Image_Software which is basically a relation entity between image and software tables. This table consists of only two fields, 'imageID' and 'softwareID' and both together form the primary key.

    This design is working for now in the planning stage. Let me know if i am on the right track.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts