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

  • Home
  • SEARCH
  • 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 7036017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:22:24+00:00 2026-05-28T01:22:24+00:00

I haven’t seen the common sense notion of converting an integer to network order

  • 0

I haven’t seen the common sense notion of converting an integer to network order and to write the resulting bytes into an indexable entity in a string – string database vs. writing the string representation of the number anywhere in the documentation of such databases.

Surely the size overhead of writing a 64-bit int as a string into a database must outweigh the trivial complexity of having to do a ntohl call before writing the bytes back into an integer type.

I am therefore missing something here, what are the downsides to using big-endian bytes vs. strings as indexable entities in string-string databases ?

(C++/C tags as I am talking about writing bytes into the memory location of a programatic type, BDB as that is the database I am using, could be kyotodb as well).

  • 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-28T01:22:25+00:00Added an answer on May 28, 2026 at 1:22 am

    The advantage of big-endian in this case is that the strings would sort correctly in ascending order.

    If the database architecture cannot natively store 64-bit integers, but you need to store them anyway, stringifying them this way is a way to do it.

    Of course if you later upgrade the database to one that can store 64-bit integers natively, you will either be “stuck” with the implementation or have to go through a migration process.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Haven't seen anything about it here but it seems to solve one of the
Haven't seen anything, but I have seen that you can create albums in the
Haven't been able to figure this out yet.. I've seen a few answers around
Haven't found this in my search on Stackoverflow - I know I've seen a
Haven't seen this before so hopefully someone has a easy solve, I have a
I haven't seen this on the Android docs. Is it safe to use this
haven't done much jquery and ran into a problem. I'd like to bind hover
Haven't seen this feature anywhere else. I know that the 32nd bit is used
Haven't seen many Geneva related questions yet, I have posted this question in the

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.