Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    237

    normalization and principles of tables and querys regarding redundant data

    Hi people, attached is a photo of tblOrders and qryPurchaseOrders, every where I read and have been told to minimalise redundant data which makes sense and ive tried to do.... my question is would you call any of the data in my table or query redundant data.... the fields repeats themselves multiple times? and im wondering if that will cause issues later...



    also does it matter if I have 2 querys of nearly the same fields so some data will be doubled up in the querys only not tables is this an issue or only an issue with tables repeating themselves?

    thanks.

  2. #2
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,002
    It appears there is no picture?
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    237
    Click image for larger version. 

Name:	Untitled8.jpg 
Views:	28 
Size:	161.0 KB 
ID:	32350Click image for larger version. 

Name:	Untitled9.jpg 
Views:	28 
Size:	167.2 KB 
ID:	32351

  4. #4
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    237
    sorted lol

  5. #5
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,002
    A query is not stored data. It is a combination of data from related tables.
    You can make as many queries as you deem necessary to achieve your end goals.

    Sometimes you can get economical with temporary or dynamic query creation in code if you need to vary how your data is being pulled.

    I'm not a great believer in Yes No fields for certain types of data.
    I would probably have a OrderCompletedDate rather than a check box for instance. You could then report on the time taken from order creation.
    Possibly the same for cancellations?
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  6. #6
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    237
    Quote Originally Posted by Minty View Post
    A query is not stored data. It is a combination of data from related tables.
    You can make as many queries as you deem necessary to achieve your end goals.

    Sometimes you can get economical with temporary or dynamic query creation in code if you need to vary how your data is being pulled.

    I'm not a great believer in Yes No fields for certain types of data.
    I would probably have a OrderCompletedDate rather than a check box for instance. You could then report on the time taken from order creation.
    Possibly the same for cancellations?

    that's great to know about the querys probably a question I should of ask before building..... what about the tables I cant see another way to separate it?

    that check box is on my received goods entry form which has 4 controls on it, 2 of them are automatically inserted - date and current user name, after they adjust the amount of goods that come in box is ticked and that locks the controls from being accessed.

  7. #7
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,002
    Not sure what you mean about separating tables?

    Re the check box - You can easily do the same based on a date being filled out or not.
    Me.YourControl.Locked = Not IsNull(Me.CompletedDate)
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  8. #8
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    237
    Separating the fields is what I should of said...

    yeah very true... the check box works well at the moment but still fine tuning it all... I don't have anything for goods on backorder yet.

  9. #9
    Join Date
    Apr 2017
    Posts
    1,679
    In query from purchase order and order details having order detail row info is OK;
    The same in purchase orders table is not OK. In purchase orders table you'll have a single row of data per order, i.e. there are data which are valid for all order detail rows for given order.

    In tblOrderDetails, I'd prefer an autonumeric primary ID OrderDetailID_PK (Maybe you have - in your added picture it is not visible the end of name OrderDetail...). One order can have one or many order detail rows.

  10. #10
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    237
    Quote Originally Posted by ArviLaanemets View Post
    In query from purchase order and order details having order detail row info is OK;
    The same in purchase orders table is not OK. In purchase orders table you'll have a single row of data per order, i.e. there are data which are valid for all order detail rows for given order.

    In tblOrderDetails, I'd prefer an autonumeric primary ID OrderDetailID_PK (Maybe you have - in your added picture it is not visible the end of name OrderDetail...). One order can have one or many order detail rows.
    yeah that's fine I have a separate orders table with Ordernumber, supplier and Orderedby and then have an OrderDetails table with the details of the order and yes correct it is a primary key OrderDetailsID_PK

  11. #11
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    237
    Quote Originally Posted by Minty View Post
    Not sure what you mean about separating tables?

    Re the check box - You can easily do the same based on a date being filled out or not.
    Me.YourControl.Locked = Not IsNull(Me.CompletedDate)
    Hi Minty ive tried getting the above code to work in lieu of check box but im getting a compile error

  12. #12
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Shaun,

    This link points to information in various formats related to Database Planning and Design.
    If you work through 1 or 2 of the tutorials from RogersAccessLibrary you will learn/experience a procedure that you can use with any database.
    There are videos and articles on Normalization, analysis techniques and data modelling.

  13. #13
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    237
    Quote Originally Posted by orange View Post
    Shaun,

    This link points to information in various formats related to Database Planning and Design.
    If you work through 1 or 2 of the tutorials from RogersAccessLibrary you will learn/experience a procedure that you can use with any database.
    There are videos and articles on Normalization, analysis techniques and data modelling.
    Thanks for that Orange, I have read and done some tutorials from RogersAccessLibrary already but always open to more

  14. #14
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,784
    does it matter if I have 2 querys of nearly the same fields so some data will be doubled up in the querys only
    Provided the more extensive query isn't a resource hog or something, there's nothing wrong with using the more extensive one and only using the fields you need for any given form. While I probably wouldn't use a 24 field query as a source for a 3 field form (for example) you make it seem like they're quite similar, so that's where I'm coming from.

    Some don't seem to like queries with parameters (to each their own but I have no such issue) but that is another option. A third is to use vba based sql, which can be harder to conceptualize. The upside is that unlike a compiled Access db where query sql is still visible, no code, thus no query sql, can be viewed when it's all in vba. It tends to make the db smaller to start with.

  15. #15
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    237
    Quote Originally Posted by Micron View Post
    Provided the more extensive query isn't a resource hog or something, there's nothing wrong with using the more extensive one and only using the fields you need for any given form. While I probably wouldn't use a 24 field query as a source for a 3 field form (for example) you make it seem like they're quite similar, so that's where I'm coming from.

    Some don't seem to like queries with parameters (to each their own but I have no such issue) but that is another option. A third is to use vba based sql, which can be harder to conceptualize. The upside is that unlike a compiled Access db where query sql is still visible, no code, thus no query sql, can be viewed when it's all in vba. It tends to make the db smaller to start with.
    you could be on to something when you said provided one isn't a hog, I'm having issues as we speak with the query's..... it was working fine until about 2 hours ago until I tried adding another query to add jobs in to the tables.

    I gotta do some more research on query's get my head around it and then reconfigure them to suit I think.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. best practice for handling redundant data?
    By merlin777 in forum Database Design
    Replies: 3
    Last Post: 09-21-2015, 08:32 AM
  2. Redundant use of same set of data in joined queries
    By d2ward in forum Database Design
    Replies: 1
    Last Post: 05-20-2014, 11:32 AM
  3. Help making a form with tables and querys
    By mentose457 in forum Forms
    Replies: 2
    Last Post: 12-06-2010, 06:00 PM
  4. Redundant data entry question
    By mathonix in forum Forms
    Replies: 3
    Last Post: 01-29-2010, 08:54 AM
  5. Using Redundant Tables
    By rand605 in forum Database Design
    Replies: 3
    Last Post: 12-03-2009, 09:38 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