• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Invoice development software database

 
Ranch Hand
Posts: 43
Notepad Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Community

I am designing an Invoice generator software for personal use. I am having trouble designing database structure. Here is what software says:
1. Invoice generator includes details fields such as "Invoice number" (automatically generated) ,"order number", "customer name","customer address","Phone No.'', "date","COD (yes or no)".
2. Table for order details such as Product name, quantity, price, tax type(cst or vat), tax amount, cod (yes or no, if yes cod charges extra) at the end total price and total tax is to be calculated and then total tax and the total price and cod charges(if any) is to be sum up for total billing amount.
3. Other than this I want that individual tax for each invoice is saved along with total value of invoice so that , i can have reports at the end of the month about total payble tax and all.


Here is my confusion for database :
I have created a ER diagram where I am created 3 table namely:
1)Order (details mentioned in point 1 above)
2)Order Details (includes item ordered and all details such as tax, price ,etc.
3)Reports ( to store total tax at end of month and total amount earned)

Images for my concept demonstration: ER and example data.

Please tell me is this a suggested way for making database (speed and efficiency) , if not please recommed me a alternative way. Thank you
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

tushar attar wrote:Please tell me is this a suggested way for making database (speed and efficiency) , if not please recommed me a alternative way.


Tha's already a good start! But there is room for a few improvements:
  • order table should only contain order related information => you need a customer table to keep all customer related information
  • you need an invoice table to store all invoice related information (e.g. date of order is not always the date of invoice)
  • you can have different deliver and invoice addresses => you need an address table to store all address related information
  • i don't understand the tax field in order details table, because in the screenshot it says "yes" (and that makes no sense at all)


  • Hope it helps!
    Kind regards,
    Roel
     
    tushar attar
    Ranch Hand
    Posts: 43
    Notepad Chrome Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks for the suggestions, for the TAX field, that is a typo error.
     
    When I was younger I felt like a man trapped inside a woman’s body. Then I was born. My twin is a tiny ad:
    a bit of art, as a gift, the permaculture playing cards
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic