Results 1 to 10 of 10
  1. #1
    chrscote is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jan 2015
    Posts
    5

    Working on a database design for computer repair class


    I am trying to create a database for a computer repair class. I have gotten the database designed for when a single student works on a computer issue to the end. However, there are cases where 2 or 3 students can team up on a single issue or where one student can pass the issue on to another student. These cases are befuddling me in the database design. Below, I have my current database design. Can someone please help me determine what I need to do to accommodate the times when multiple people work on the same computer issue?


    Click image for larger version. 

Name:	rlDatabase.gif 
Views:	25 
Size:	20.1 KB 
ID:	19410

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    Delete the field 'CustomerID' from the Issues table (and of course its relationship). but that's not really your question ....

    For multiple techs working on 1 computer - you implement that by placing a sub form for Techs inside the main form for Issues
    or perhaps you implement it up at the computer main form and have a subform for multiple issues - - or potentially both.....

    right now you have techs linked to an issue, and then the issue linked to the PC - - - which is ok if you are that structured.... you could link techs to the PC and issues also link to the PC and then they are both there but less structured....

    but one only gets so far in table relationships - it is the implementation at the form level with the sub forms that gives you the displays that you need.....

  3. #3
    chrscote is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jan 2015
    Posts
    5
    I understand removing the CustomerID field. I can easily get the customer's name using joins between the computer and customer tables. However, my main issue is when 2 technicians work on the same issue, either together (as a team) or separately (where one tech passes it off to another). What's the best way to store these cases in the database? Should I add another field to the Assignments table or perhaps use a string value for TechID in that table where I use a comma-separated list of techIDs who are working on the issue at a single time.


    Chris

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You will probably have problems or major headaches because every table except "Status" has the same name for the primary key field.
    Better names would be to add the table name to "ID"- examplles: "IssueID", "CustomerID", "ComputerID",...

    I use "CustomerID_PK" and "CustomerID_FK". Much easier to determine the PK and FK fields.

    cases where 2 or 3 students can team up on a single issue
    Consider a junction table between "Techs" and "Assignments"....
    Table "Assign_Techs"
    Fields:
    Assign_Tech_PK Autonumber
    AssignmentID_FK Long
    TechID_FK Long

  5. #5
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    notice the advice on field naming...

    but your reply involves simply the issue of 1:Many - and the answer depends on your business do you want 'many' techs related to the 'issue' or related to the 'PC' ? I would think just the PC but....you have that table Assignments - and not sure that is really needed....

    so I would say that Customer:Computers is 1:Many and then Computers:Issues is 1:Many and Computers:Techs is 1:Many - - - but you could do Issues:Techs instead for a more precise alignment of the tech to the specific issue... if Issues get broken into sub Issues then the Assignments table could make sense.....

  6. #6
    chrscote is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jan 2015
    Posts
    5
    Quote Originally Posted by ssanfu View Post
    You will probably have problems or major headaches because every table except "Status" has the same name for the primary key field.
    Better names would be to add the table name to "ID"- examplles: "IssueID", "CustomerID", "ComputerID",...

    I use "CustomerID_PK" and "CustomerID_FK". Much easier to determine the PK and FK fields.


    Consider a junction table between "Techs" and "Assignments"....
    Table "Assign_Techs"
    Fields:
    Assign_Tech_PK Autonumber
    AssignmentID_FK Long
    TechID_FK Long
    I had been doing the naming in the queries using "AS", but I can see how this would be more helpful. I'm just confused about the junction table and how that would help with the multiple techs per issue/computer.

    Chris

  7. #7
    chrscote is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jan 2015
    Posts
    5
    Quote Originally Posted by NTC View Post
    notice the advice on field naming...

    but your reply involves simply the issue of 1:Many - and the answer depends on your business do you want 'many' techs related to the 'issue' or related to the 'PC' ? I would think just the PC but....you have that table Assignments - and not sure that is really needed....

    so I would say that Customer:Computers is 1:Many and then Computers:Issues is 1:Many and Computers:Techs is 1:Many - - - but you could do Issues:Techs instead for a more precise alignment of the tech to the specific issue... if Issues get broken into sub Issues then the Assignments table could make sense.....
    I really want the 'many' techs related to the issue simply because the customer could bring the computer in while a different class is in session.

    Chris

  8. #8
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Yep, I misunderstood ... But isn't the table "Assignments" the junction table between "Issues" and "Techs"?


    I would consider moving the field "ActionsTaken" from "Assignments" to a new table. Maybe also have fields for "Tech" and "ActionDate" in the new table.

  9. #9
    chrscote is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jan 2015
    Posts
    5
    Quote Originally Posted by ssanfu View Post
    Yep, I misunderstood ... But isn't the table "Assignments" the junction table between "Issues" and "Techs"?


    I would consider moving the field "ActionsTaken" from "Assignments" to a new table. Maybe also have fields for "Tech" and "ActionDate" in the new table.
    In answer to your question, yes, the Assignments table is a junction between Issues and Techs.
    I had forgotten the requirement of allowing for multiple techs working on the same issue either as a team or separately. I think your suggestion for moving the ActionsTaken and Tech fields and adding an ActionDate in a new table makes sense. Am I correct that this would then move the Tech's ID relationship to this new table?

    Chris

  10. #10
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    My reasoning is that "ActionsTaken" applies to "Issues" not to "Assignments". And usually a date is a good idea.

    Wouldn't MOVE the Tech ID (PK) from "Assignments" - that tells what Techs worked which Issue. ADD the Tech ID (PK) to the "ActionsTaken" table.


    Table "ActionsTaken"
    -------------------------
    ActionID_PK (Autonumber)
    TechID_FK (Long) (foreign key to Techs)
    IssueID_FK (Long) (foreign key to Issues)
    ActionTaken (Text or Memo)
    ActionDate (Date/time)

    A specific Tech records actions for a specific Issue taken on a specific date.


    Notice the table name - "ActionsTaken" - "Actions" is plural because there are lots of actions.
    The PK field name (ActionID_PK) is singular because it is for one action.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Custom class not working on Enter key
    By Ruegen in forum Programming
    Replies: 1
    Last Post: 10-29-2014, 10:44 PM
  2. Replies: 1
    Last Post: 05-25-2013, 11:19 AM
  3. Replies: 4
    Last Post: 09-18-2012, 08:49 AM
  4. Replies: 3
    Last Post: 12-15-2011, 09:26 PM
  5. In over my head with a database class
    By fixittech in forum Database Design
    Replies: 3
    Last Post: 01-22-2010, 07:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums