dibblermail
Member
- Local time
- Today, 10:07
- Joined
- Jan 10, 2025
- Messages
- 64
The development of database using the relational paradigm requires the application of normalisation techniques to minimize data duplication - redundancy, ensure the data is logically consistent, and data integrity is maintained through the established relationship / rules between the tables in which the data is stored. That does require a detailed understanding of the data needed to perform the business functions (the scope) your project will fulfill. That detail lies with you, However it is apparent that the proposed layout in the above post #41 was some problems from a design perspective. Limiting to what appears to be the intention of the proposed layout, the relationship rules could/should be:
Your Main Table (probably an appropriate name is the JOB table). A JOB is carried out at ONE site.
A (client) COMPANY may request any number of quotes for different JOBs that may be accepted and become orders.
A (client) COMPANY will have one or more CONTACTS (like Company Directors)
For A JOB one or more INVOICES may be raised to a (client) COMPANY
For a JOB there are one or more SITE_ROLES.
A SITE_ROLE TYPE describes the SITE ROLE undertaken by a CONTACT.
A SITE_ROLE TYPE includes Architect, structural engineers, consultant engineer, project manager, site contact, etc as needed
A CONTACT will hold the contact details of a person: that person may be a company director, an architect, or a .... as specified by SiteRole when engaged in a JOB
You will notice that there is no reference to Arch for Job, Struc For Job ... they have been merged and generalised into the SITE ROLE table.
COMPANY INVOICE INFO is merged into the COMPANY table unless you can rationalise why you might need to retain more than one record for the same Company where an invoice may need to be sent at any one time.
Perhaps then you might adopt/ adapt your layout to a model more like:
View attachment 118830
Thanks for going through that in so much detail. I think you’ve more or less nailed it.
As a work flow in the Excel version...
Client asks us to quote on a job, so initially we have basic info:
- Job Number
- It gets the next available number & it’s unique
- It’s maintained throughout the jobs life, including if it moves beyond a quote
- Some sites get multiple Job Numbers for different jobs, but they’re run as individual jobs
- Status
- Quote, Current, Closed, etc
- Client
- Site Name
- Site address
- Job Type
- We are metal fabricators, so Structural Steel, Bespoke Cladding, Staircase, etc
- Date Required
- Client’s contact
- Some Clients have several contacts & sometimes more than 1 on a single job
- Current Action
- Tracks where the job is in our system, Being Drawn, Awaiting approval, etc
- Architect info
- Structural Eng info
We invoice most jobs several times. This could be to break out elements of the job or it could be the job is phased. That’s why for a single job number there are invoice 1-25 in the old system. I realise that with access I don’t need to pre-allocate 1-25 in 1 table & I can just add a new line with the next number as required.
When starting a new job it could be for a known client, at a known site, with known contacts; Or it could be a known client at a new site but with existing contacts. So the system has to find that info & offer relevant suggestions to the user when creating the job to avoid typing info into the system multiple times (my excel code currently does this as a cascade starting with Client).
Would Site Role cause issues finding the right person on a different job. I may need an architect I’ve used before, but with a different client on a different site. That was why I had them split off in the old system. If its easy to overcome then that would make a lot of sense to go your suggested way.