Results 1 to 5 of 5
  1. #1
    toddaxsom is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2016
    Posts
    2

    Normalization - Avoiding Null Values

    I need help understanding the best solution in normalizing a database that records both purebreed and hybrid dog information without using null values. Both types will have info that relates to all dog breeds, which works great for a "breeds" table. However, hybrids have unique attributes, as do purebreeds.



    Would it be better to have a "hybrid" table and a "purebreeds" table, rather than a "breeds" table? If, they are split tables, how do I filter them into an "all breeds" table without having duplicate primary keys that are auto numbering?

    I do already have junction tables for several attributes. But, every option I have tried, ends up having to allow for null values, which I'm trying hard to avoid.

    If this sounds confusing, I totally understand! Any help is appreciated.

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    An auto number field will never create a duplicate value and a primary key field will not allow one.

    Whether or not pure and hybrid should be separate tables or all in the same table I can't say because I really don't know the topic - - but if I were to draw an analogy to autos and trucks - - I would tend to say put them all into one table: vehicles.

    If you make them 2 separate tables there is no simple method to merge them into 1 record set (table) - one would need to append them into a common temp table. If this is a need then it is more likely you are better off having all the data in 1 table.

  3. #3
    toddaxsom is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2016
    Posts
    2
    If I have a single table called "breeds" with an id of "breed ID", how do I show that hybrids are a mix of breed 1, breed 2, breed 3?

    The primary keys for all the breeds are already listed in the "breeds" table.

  4. #4
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,741
    How about a Breeds table and an Attributes table? All dogs go in Breeds, both purebred and hybrid.
    The Attributes table could contain things like 'Hound' or even 'German Shorthair Pointer' so that you could include any number of attributes including purebred attributes for a given entry in the Breeds table.
    UpRider

  5. #5
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    again - what makes sense, as the best design - requires some more knowledge of your topic than I have.

    A reasonable single table approach could have Mix1, Mix2, etc fields to enter those pure breed IDs. And within maybe a limit of ~5 or so pure breed fields this typically is very do-able.

    If however hybrids can have a mix of lots of breeds - dozens or more then the design is better of being a table for Breeds and a Master Table for Hybrids (of the hybrid's common data - 1 record per hybrid) and a Sub Table for Hybrid breeds that links to the Hybrid table. This allows a flexible and unlimited number of pure breeds to be assigned to any single Hybrid.

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

Similar Threads

  1. Null and 0 values
    By MoeIndustries in forum Reports
    Replies: 2
    Last Post: 12-04-2015, 06:39 AM
  2. Replies: 7
    Last Post: 12-04-2013, 01:55 PM
  3. Avoiding entering duplicate values
    By djclntn in forum Forms
    Replies: 1
    Last Post: 01-25-2013, 11:51 AM
  4. Finding the Max Date and Null Values if Null
    By SpdRacerX in forum Queries
    Replies: 1
    Last Post: 02-03-2012, 06:29 AM
  5. null values
    By ippy in forum Queries
    Replies: 3
    Last Post: 12-20-2010, 10:39 AM

Tags for this Thread

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