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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:53:52+00:00 2026-05-10T23:53:52+00:00

I have a HashMap that I am serializing and deserializing to an Oracle db,

  • 0

I have a HashMap that I am serializing and deserializing to an Oracle db, in a BLOB data type field. I want to perform a query, using this field. Example, the application will make a new HashMap, and have some key-value pairs. I want to query the db to see if a HashMap with this data already exists in the db. I do not know how to do this, it seems strange if i have to go to every record in the db, deserialize it, then compare, Does SQL handle comparing BLOBs, so i could have…select * from PROCESSES where foo = ?….and foo is a BLOB type, and the ? is an instance of the new HashMap? Thanks

  • 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. 2026-05-10T23:53:53+00:00Added an answer on May 10, 2026 at 11:53 pm

    Here’s an article for you to read: Pounding a Nail: Old Shoe or Glass Bottle

    I haven’t heard much about your application’s underlying architecture, but I can tell you immediately that there is never a reason why you should need to use a HashMap in this way. Its a bad technique, plain and simple.

    The answer to your question is not a clever Oracle query, its a redesign of your application’s architecture.

    For a start, you should not serialize a HashMap to a database (more generally, you shouldn’t serialize anything that you need to query against). Its much easier to create a table to represent hashmaps in your application as follows:

     HashMaps -------- MapID (pk int) Key   (pk varchar) Value 

    Once you have the content of your hashmaps in your database, its trivial to query the database to see if the data already exists or produce any other kind of aggregate data:

    SELECT Count(*) FROM HashMaps where MapID = ? AND Key = ? 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a variable of type Hashmap <String,Integer >. In this, the Integer value
I have a HashMap that I'm using in Processing and I'd like to increment
If I have a HashMap that looks like this: HashMap<String, MyObject> where the String
I have a HashMap (although I guess this question applies to other collections) of
I have a Hashmap that, for speed reasons, I would like to not require
I have a hashmap that is 101 keys in size, but I know for
I have a HashMap object that I am getting on a JSP page. HashMap<Integer,Gift_product>
I have a HashMap relating Keys to Strings, and I need to compare some
I have a HashMap with millions of entries. Need to retrieve all entries whose
In my spring application context file, I have something like: <util:map id="someMap" map-class="java.util.HashMap" key-type="java.lang.String"

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.