Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2004
    Posts
    1

    Wink Help: Simple Checkout Database - Need Direction

    I am designing a simple resource checkout system for laptops and projectors for our department. Ideally, I would like users to go online, be able to checkout the resource if available, checkin the resource when it is no longer being used, ability to report who has the resources, and ability to add/delete/modify resources from the check out list. What I really need help with is the technical aspects of this. I want to write my code in JSP and SQL if possible, and with an ACCESS database. I have done this in the past no problem when there is only one table and no relationships to deal with. I know a good amount about table relationships, and have modelled out the simplistic version of what I want to do so I can start small.

    My question is, how from JSP and SQL once I create the relationships in Access do I actually go about inserting/updating the data. I know how to perform SQL Joins, to view the data once it is in there, so that for example I can figure out if a resource is checked out, and if so, display the information. That I don't think is a problem. But how do I do this, so that for example, if a user goes into checkout a resource, it will insert for example the information (userID) not only in the userTable, but also in the checkoutTable?

    -itemTable-
    itemSerial (pk)
    itemName
    itemDesc

    -checkoutTable-
    checkoutID
    checkoutDate
    checkinDate
    itemSerial (fk - itemTable.itemSerial)
    userID (fk - userTable.userID)

    -userTable-
    userID (pk)
    userName
    userLocation
    userPhone
    userEmail


    Thank so much!!!!!

  2. #2
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    710
    The fact to remember is that it does not all happen at once.

    You build items first. Then you build users.

    Then you insert select from the user table for the userid you want and from the item table the itemid you want to create a checkout record.

    1-2-3.
    Last edited by certus; 06-04-04 at 21:42.

Posting Permissions

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