Database field design assistance needed

Posted on 2011-05-11
Last Modified: 2012-06-27
Hi all,
I am trying to get a database together but it's getting a bit confusing.

Normally you have: Fieldname and Field type bit I need to get into a database table something like this:

  ---- Boolean, text1, text2, text3

What do I do when a field must contain different values (and more than one).

Hope someone can help.


Question by:error77
    LVL 12

    Expert Comment

    What do you mean, the field contains a Boolean and Text?

    What is the purpose of your field?

    LVL 56

    Expert Comment

    by:Jim Dettman (Microsoft MVP/ EE MVE)
    <<What do I do when a field must contain different values (and more than one).>>

      You don't.  In a proper relational design, every field is "atomic"; that it is contains only one value.

      Second thing is that every field in a table belongs to whatever the table represents.  For example, a customer name should not be in an order table.  It's an attrbiute of a customer and belongs in the customer table.

      Last, don't store fields that depend on other fields.  For example, and extended cost field, which is Qty * Price.  You store qty and price and then calculate extended cost when needed.

      Describe more of what it is your trying to do and we'll help you out.

    LVL 74

    Expert Comment

    by:Jeffrey Coachman
    <Describe more of what it is your trying to do and we'll help you out.>

    Yes, please provide a specific example using real field names and values...

    Author Comment

    OK, I'll be more specific.

    I have a form that contains this:

    Car   |  Y / N  |  Description | Colour |   Comments
    Door |    N      |   4 door       |   Red  |  some comment  
    Tyre !    Y      !   sports       |  Black |   some other coment

    Anyway, you can see what I'm trying to do here....

    How do I get this on a DB table ?

    LVL 74

    Accepted Solution

    Create a table

    In design view create your 5 fields.
    Set the appropriate Datatypes and properties of each filed.

    But then what you are really asking is how to create a table...

    If you are this new to MS Access, I suggest that you obtain a good reference book on MS Access basics:



    Expert Comment

    those are 5 individual fields in the table. So 5 different field types...
    LVL 74

    Expert Comment

    by:Jeffrey Coachman
    ...Also note that you can press the F1 function key at any time to get help on the specific section your are in...



    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Suggested Solutions

    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
    Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now