Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 600723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:38:12+00:00 2026-05-13T16:38:12+00:00

I’m working on a program that deals with invoices for services done. I’m wondering

  • 0

I’m working on a program that deals with invoices for services done. I’m wondering what is the best way to layout a table of invoices which can have one or more tasks for each invoice. So far the invoice consists of:

Invoice Table
| InvoiceNumber | Department | DateOfBilling |

Now, I need to somehow store the jobs associated with that invoice. Each job has the the following variables:

Job
| Date | ServiceDescription | Hours | Cost |

(Hours and cost are not always a straight multiply requiring both variables)

I’m new to working with SQLite and databases in general, but these are the ideas I’ve come
up with. One solution would be to add a column after Date of Billing that contained a TEXT or BLOB entry that was a formated string that would need tokenizing when pulled from the DB. For example:

| DateofBilling | Date;ServiceDescription;Hours;Cost!Date;...

I can see this as adding a lot of other work when needing to access specific information about the tasks of an invoice, but not being too much work.

Another idea was to add a column after Date of Billing that simply held a JobID. Then have a new Job Table that stored all the jobs and a matching JobID. Example:

Invoice Table
| DateOfBilling | JobID

Job Table
| JobID | Date | ServiceDescription | Hours | Cost |

This seems cleaner but I’m not experienced enough to know what kind of hit this would be on performance if every time the job list is needed for an invoice I have to query a table of every job over a span of time for 1-5 or so entries.

Thanks ahead for any help you can provide.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:38:12+00:00Added an answer on May 13, 2026 at 4:38 pm

    Assuming you also have a fixed list of possible Job descriptions, you might go with:

    A Jobs reference table:
    JobId, Description, BaseTimeEstimate ...
    
    Invoice table:
    InvoiceId, DepartmentId, DateOfBilling ...
    
    Then an InvoiceDetail table:
    InvoiceId, JobId, ActualHours, Cost ...
    

    something like that.

    For Jobs that could be custom entries, a simpler structure works:

    Invoice table:
    InvoiceId, DepartmentId, DateOfBilling ...
    
    Then an InvoiceDetail table:
    InvoiceId, JobId, JobDescription, ActualHours, Cost ...
    

    like that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.