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 6616403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:34:42+00:00 2026-05-25T20:34:42+00:00

After going through the previous develop’s trainwreck of code I realized I need to

  • 0

After going through the previous develop’s trainwreck of code I realized I need to move all of the money based columns to not use floating point math. On the Java side this means using BigDecimal but when using Hibernate/JPA and MySQL 5 what would be the appropriate MySQL data type to make that column?

  • 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-25T20:34:43+00:00Added an answer on May 25, 2026 at 8:34 pm

    DECIMAL and NUMERIC.

    The recommended Java mapping for the DECIMAL and NUMERIC types is
    java.math.BigDecimal. The java.math.BigDecimal type provides math
    operations to allow BigDecimal types to be added, subtracted,
    multiplied, and divided with other BigDecimal types, with integer
    types, and with floating point types.

    The method recommended for retrieving DECIMAL and NUMERIC values is
    ResultSet.getBigDecimal. JDBC also allows access to these SQL types
    as simple Strings or arrays of char. Thus, Java programmers can use
    getString to receive a DECIMAL or NUMERIC result. However, this makes
    the common case where DECIMAL or NUMERIC are used for currency values rather awkward since it means that application writers have to
    perform math on strings. It is also possible to retrieve these SQL
    types as any of the Java numeric types.

    Have a look here for further details.

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

Sidebar

Related Questions

After going through Marshall code snippet Got the Idea that marshalling is used to
After going through the Appendix A, C# Coding Style Conventions of the great book
Something is puzzling me, after going through my app with instruments, it is a
After searching online and going through past stackoverflow posts for a suitable implementation for
Is there any way to debug what is going on after my .NET code
After going through MSDN Shell Extensions I am not quite sure if I can
After going through some examples on the web I realize that there is a
After going through the discussion here I have one more question now. Lets assume,
first time i am going to develop a e-commerce based website with jquery and
Like seriously after going through this... Easy way to dismiss keyboard? ... I have

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.