2 Replies Latest reply on Sep 3, 2009 12:53 PM by Miguel

    Key Fields and Foreign Keys



      Key Fields and Foreign Keys




      Noob here trying to develop a database for my department.

      We are a data center that process archive records from all over the world. We get .tif images and our servers create .jpg and .jp2k from this images. The jpgs go to the donor/archivist and the other copy is stored in LTO tapes and hard drives. We store records in hard drives, DVDs, LTO tapes and flash drives. Oonce we get the records, we download them into another hard drive to be processed later.

      I started using the template "inventory" and made several modifications to it. I finally discovered how to have portals showing info from 2 new tables I've created but now I have a problem. We want to create a barcode label to track/identify the hard drives taken from a storage room. I thought that by having a unique number like a barcode, was going to be enough as a primary key.

      So, this is the deal:

      Barcode/k_ID_inventory = MDO-00001000 --->this number is stored in inventory table


      Inventory table = item   description   manufacturer   serial number   technician   date created   date modified  k_ID_inventory

      Project_settings table =  k_ID_Inventoryfk    project name    media number    date created    folders    files    GB

      DVD_settings table =  k_ID_Inventoryfk     project name   missing dvds    Unreadeable dvds    folders  files   gb


      If i change the k_ID_Inventory barcode, all the info in the portal will be gone even if I change the fk in the related table. I understand that key fields should never be touched, but, is there a way to accomplish this in case one of our technicians screw up?

      Should I create a different key field so the records from one table to the other won't dissapear in case I need to change the barcode?

      Thanks for your help!


      I apologize for my English :smileyhappy: