Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Bigdecimal, postrgesql

Posted on 2012-09-18
3
Medium Priority
?
476 Views
Last Modified: 2012-10-05
Hi,

I'm currently developing a JAVA application that needs to calculate financial data, so I'm using BigDecimals to avoid inaccurate calculations.

How should I store these Bigdecimals in a postgresql db? which datatype should I use?

Regards Kristof
0
Comment
Question by:kristof1104
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 1500 total points
ID: 38409060
The easiest way would probably be to use BigDecimal's own natural mapping to String and store it as a character type
0
 
LVL 2

Author Closing Comment

by:kristof1104
ID: 38465987
Thanks, I went with postgres's Number field, that way you can still use the field as a number in query's
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 38466568
:)
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses
Course of the Month15 days, 12 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question