Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Invoice development software database

 
Ranch Hand
Posts: 43
Notepad Chrome Java
  • Mark post as helpful
  • send pies
  • 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
  • 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
    • Quote
    • Report post to moderator
    Thanks for the suggestions, for the TAX field, that is a typo error.
     
      Bookmark Topic Watch Topic
    • New Topic