Results 1 to 4 of 4

Thread: [2005] I need advices about Access Database

  1. #1

    Thread Starter
    Addicted Member Genom's Avatar
    Join Date
    May 2006
    Posts
    186

    [2005] I need advices about Access Database

    I am making a stock software which stores informations about wares.
    I have a main table which has the stock information (wares, numbers, prices, company etc...)
    But software will print a bill if user sells some wares. And software shall save the information form the bill to DB so that user can get informaitons about bill back if needed.
    I have 3 ideas:
    1) 1 table for all bills: Columns are:
    SellNumber / BillNumber / WareType / Price etc...
    Each ware which has been sold in the same bill will have same BillNumber but other SellNumbers. So that software can get infos about a specific bill number back.

    2) 1 Table for registration of billnumbers and bill infos. And each bill has own table for sold wares list.

    3) third idea is like first but different. I want to store data like this
    WareType= Pen|Eraser|Notebook|Book and Price= 0.5|0.5|2|5
    And if user want to get infos back I can use split function.

    I want to ask which one is the best for my access db. There will be a lot of informaitons and I dont want that my db slow down?
    Dim Me As Coder

  2. #2
    Hyperactive Member ProphetBeal's Avatar
    Join Date
    Aug 2006
    Location
    New York
    Posts
    424

    Re: [2005] I need advices about Access Database

    I like option 1. Just a side note that if you choose option 3, using the split function can cause proformace problems such as slow downs.

    Helpful Links:
    VB 6 - How to get the "Key" Value in a collection
    VB.NET - File Search Utility || VB.NET - How to compare 2 directories || VB.NET - How to trust a network share
    VB.NET - Create Excel Spreadsheet From Array || VB.NET - Example Code & Hints you may not know
    VB.NET - Save JPEG with a certain quality (image compression) || VB.NET - DragDrop Files, Emails, and Email Attachments

    Please post some of the code you need help with (it makes it easier to help you)
    If your problem has been solved then please mark the thread [RESOLVED].
    Don't forget to Rate this post

    "Pinky, you give a whole new meaning to the phrase, 'counter-intelligence'."-The Brain-

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] I need advices about Access Database

    The third option is a very bad option. In this day and age there's no reason to ever store composite values in text fields like that. They are a hindrance, not a help. Database tables are like classes: you should have one for each distinct physical or abstract type of object. You would have one table for transactions and another for entries in that transaction, where the second table has a foreign key from the first. The first option you listed is the only good design of the three.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4
    Frenzied Member
    Join Date
    Aug 2005
    Posts
    1,042

    Re: [2005] I need advices about Access Database

    As just a suggestion, why don't you study the Northwinds database that comes with most MS stuff. It may not be the very best design, but it has stood the test of time and from your description, it sounds like you could follow that same structure quite easily.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width