Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2017
    Posts
    12

    Wink Redesigning a very old, very inefficient database

    Hi


    I don't even know where to start with this...


    I'm looking to make a new efficient database at work. The one we have was created pre-2003 and still in .mdb format. It has been maintained by people with no prior database experience. Any issues in the past have been outsourced. It runs on Access 2007 but the one I'm creating will be on 2016.


    The below picture is the form in which all project data is entered minus a few subforms at the bottom.
    Click image for larger version. 

Name:	database form.png 
Views:	19 
Size:	31.2 KB 
ID:	27888
    All fields on this form (bar the subform) populate one table which allows for duplicated information. There are nearly 4000 records to date.


    This is my first database. So I'm looking for advice on the following:
    Splitting the table
    I'm going to make separate tables for clients info and employees. These will take the fields that duplicate the most information.
    Should I be splitting further?




    Data input
    What is the best way to remove duplicates? I'm hoping to be able to create a clients table whilst re-typing as little as possible. My issue would be assigning the clients to the correct projects once I've separated them. Would I really have to look up and link for every one?


    Organisation
    What is the best way organise the client information? We deal with various organisations, many have several offices and we'll have several contacts for each. Could I do a record per organisation with the ability to choose between addresses or should I do one per address? Or one per employee?


    OK I'm moidering a little now. Thanks in advance for any help

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,424
    cross posted here

    https://www.access-programmers.co.uk...=1#post1525541

    please see this link http://www.excelguru.ca/content.php?184

    It is not a problem to post in more than one forum, but please make responders aware by posting a link. They give their time for free and don't like it being wasted suggesting solutions that have been suggested elsewhere.

    With regards your question I think you need more than two tables - clients, invoices, contacts, projects etc. But to answer it properly you will need to describe what your business does and how it does it. A single form is not sufficient to provide more than a general answer.

  3. #3
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Splitting the table(s): I can't tell from a screenshot where your subform(s) start and end unless it's by the border around each section but in terms of a data structure, you don't need a separate table for people you can contain them all in a single table with a simple indicator field for employee or customer contact, then use criteria in your combo boxes to appropriately show the group of people you want.

    Similarly, it looks like you have four subforms (if I go by the borders) for stage 1, 2, 3 and Other. If these are all on separate tables you can use the same method. Put all the 'stages' in the same table, just put a stage number in the table. If you then intend to keep this data entry format you can divide the subforms by the 'stage' number.

    Data Input: Removing duplicates is a tricky thing. First, you have to identify which fields will constitute a 'duplicate', is it one field, is it two more? Second, you have to have a way to select which value, when a duplicate is detected, is the 'correct' one before deleting anything. You specifically mention the project number being a problem so I am going to guess that your project is being stored as a text description rather than the foreign key to the project table which is a huge no-no (look at normalization articles), theoretically if your data is clean (the descriptions have not been manually altered, nor has any project been deleted) you could match the text value to the project table and substitute in the project ID primary key

    for instance
    Code:
    tblProject
    Proj_ID  Proj_Name
    1        Project A
    2        Project B
    
    tblProjectDetails
    PD_ID  Proj_Name  Stage
    1      Project A  1
    2      Project A  2
    3      Project A  3
    In this example you could create another field in tblProjectDetails named Proj_ID then run an update query by looking up the project ID from tblProject by linking the project_name field in tblprojectdetails to the proj_name field in tblproject. Once you've verified the results then you can consider deleting the proj_name field or just leaving it there for posterity

    Organization:
    Depends on your goals
    If you do business with many organizations and each organization has many locations, and each location has many employees, and employees can work at many locations this would be the most complex to organize but it would typically be with something like

    Code:
    tblPeopleType
    PT_ID  PT_Description
    1      Employee
    2      Contact
    
    tblPeople
    P_ID  PT_ID  P_FirstName  P_LastName  ---> other person related fields
    1     2      Mickey       Mouse
    
    tblOrganization
    O_ID  O_Name ----> other organization related fields
    1     Company A
    2     Company B
    
    tblOrganizationLocation
    OL_ID  O_ID  OL_Address  OL_PostalCode ----> other organization location related fields
    1      1     1 First St
    2      1     2 Second St
    3      1     4 Thrid St
    
    tblOrganizationLocationPeople
    OLP_ID  OL_ID  P_ID ---> other oganization/person related fields
    1       1      1

  4. #4
    Join Date
    Mar 2017
    Posts
    12
    Quote Originally Posted by Ajax View Post
    It is not a problem to post in more than one forum, but please make responders aware by posting a link. They give their time for free and don't like it being wasted suggesting solutions that have been suggested elsewhere.
    Apologies. This is my first time and I hadn't thought it through. The other forum was a little less polite so I just deleted the thread, this is now the only version of this post. I will edit if I expand.

    The only subform is the contacts section. This goes to a table with thousands of records as duplication is allowed and each project can hold several. This is in no way linked to the Client Information or Invoice Information which appear on the giant Project Data table. Each Stage is where we write the work we will be doing and every field appears on one giant table. As we don't hold any more information than dates of issue/completion etc I figured this was best to keep with project data.

    Invoicing does have its own table and appear as a subform which is omitted from the bottom. I intended on populating the invoice field on here from the client table.

    rpeare, that's brilliant, thank you. I think I can get away with slightly less complicated but the client tables look spot on. Suddenly very aware that I was using the wrong query on the duplicates (again, first go at this and pretty fresh off the course)

    And yeah, there are no keys. The projects each have an ID which doesn't quite match up to the project numbers as primary key. I was going to remove this and use project number instead

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

Similar Threads

  1. Replies: 2
    Last Post: 04-27-2016, 06:20 AM
  2. Replies: 1
    Last Post: 03-21-2015, 11:55 AM
  3. Replies: 8
    Last Post: 03-26-2014, 10:38 AM
  4. Really Really Inefficient Query
    By maxmaggot in forum Queries
    Replies: 3
    Last Post: 11-19-2013, 07:28 PM
  5. Redesigning an access database
    By frankl in forum Database Design
    Replies: 0
    Last Post: 08-17-2007, 10:52 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