Results 1 to 10 of 10
  1. #1
    sheckay is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    May 2022
    Posts
    85

    Daily Observation Database

    Hello. I've already put up a post up on the premise that I just have to adjust a query to get what I want. But my design was not good. So I have to take a different approach. I'm just trying to create a database that allows users to record their observations while working on a machine. There are multiple machines, multiple users, even multiple shifts. And they will all access the db to record their observations randomly and independent of each other. But there will be one user at one machine at one time. So I thought I would create a table per machine, to prevent records from being overwritten. Each table includes the machine name, current date, notes for shift 1, and notes for shift 2. The problem is that the query that I used to collect that data, and show it is blank if one machine was not used that day (therefore, no record/notes for that machine). So I was advised to create a relational database with tables for each entity.


    Here's what I got:


    Click image for larger version. 

Name:	relationships.png 
Views:	16 
Size:	13.9 KB 
ID:	48234
    Am I on the right track? And, if I am, how can I make a form that allows for data entry if the tables are all separate? Thanks in advance.

  2. #2
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    There is nothing showing. Maybe review 'how to attach files' - see menu at top of forum window.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    xps35's Avatar
    xps35 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jun 2022
    Location
    Schiedam, NL
    Posts
    299
    Your relations are not ok. The userIDFK should be connected to ID in employees. Likewise you need a "machineIDFK" to relate notes and machines.

    I don't understand why you need two note tables. If it is for shifts, shift(IDFK) should be a field in the one and only notes table.

  4. #4
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,180
    How about:
    Click image for larger version. 

Name:	Observations.JPG 
Views:	17 
Size:	61.7 KB 
ID:	48238

  5. #5
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    I dunno, but based on post timing, the most you could have devoted to db normalization topics seems to be about 2 hours. Not enough, really. I agree - notes are an entity so one notes table.

    ID makes for a poor field name...ID of what? Better is something like NotesID_PK and NotesID_FK or NotesIDfk and NotesIDpk - then you can easily tell what the "ID" is and whether or not it is the primary or foreign key.

    PK (primary key = parent values) joins to foreign key (child values) but the two fields must be similar data types. EmpID is likely a number; notes are text. The EmplID is related to the empl data in the notes table as xps35 is pointing out. Same goes for machine to notes.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,180
    Quote Originally Posted by Micron View Post
    seems to be about 2 hours. Not enough, really. I
    lol, not 2 hours but it only took about 15 mins to draw up the schema

  7. #7
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Quote Originally Posted by NoellaG View Post
    lol, not 2 hours but it only took about 15 mins to draw up the schema
    That was directed to OP. I posted the suggestion to research db normalization and provided a link at 8:35-ish. This thread started soon after. Your post wasn't there (there's only a 3 minute gap).
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  8. #8
    sheckay is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    May 2022
    Posts
    85
    I'm guilty of all they said. Partly because I'm multitasking, partly because I'm pressed for time, and partly because I have a hard time reading that info and implementing it. I'm better at getting things going and figuring them out. But I will try to read again. In the meantime, thank you for your model of a solution. It does look promising. I'm going to get a DB going with this structure to see what happens. But, once these tables are set up how would a form that allows for entry into all of these fields be possible?

  9. #9
    sheckay is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    May 2022
    Posts
    85
    Wow! You're incredible! I created what you suggested. With only a twist or two. Then I created the relationships that you suggested. And then I created a query on the tables, and then a form on the query. And it appears to be giving me a data entry form. I just have to tweak it and dress it up. Thank you! But I promise, I'll also read the DB info that was suggested. I want to be able to really understand this. Thanks again!

  10. #10
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    Hi

    Upload a zipped copy of the database when you have the tables sorted.

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

Similar Threads

  1. Contracts Daily Log Database
    By Naja in forum Database Design
    Replies: 7
    Last Post: 11-06-2020, 10:50 AM
  2. Daily Back up Database Question
    By Karaline in forum Access
    Replies: 6
    Last Post: 02-08-2017, 06:10 AM
  3. Daily Task database
    By augcorv@gmail.com in forum Forms
    Replies: 20
    Last Post: 03-13-2014, 09:15 PM
  4. Making daily backup of database
    By JeroenMioch in forum Access
    Replies: 5
    Last Post: 10-30-2013, 04:50 PM
  5. Daily Log Database??
    By brittle in forum Access
    Replies: 2
    Last Post: 08-26-2013, 12:53 PM

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