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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:56:49+00:00 2026-05-23T22:56:49+00:00

Fairly new to relational database and to sqlite. But I’m curious what’s the best

  • 0

Fairly new to relational database and to sqlite. But I’m curious what’s the best way to represent list of reals, per item/row, in SQLite.

I have several items X; contains 100s-100,000s items. Each item x in X has one core attribute, which is a list of float pairs (e.g. {{100,1.2}, {101.1, 234.3}, … , {20000, 90}}; usually contains 10s-1000s pair of floats).

My first idea is to use blob. But it makes is difficult to read these pairs of floats (using some generic sqlite viewer, which I’m not aware of yet). I’d also like to query by the values of these float pairs. Is there a way to parse blobs and use them during a query? I also suspect there will be issues with big/little-endian binary encoding with blobs.
x = [prim_key, blob]

Second idea is to represent them as a string. This makes it easier to read, but probably less compact.
x = [prim_key, “100, 1.2, 101.1, 234.3, … “]

A third is to “normalize” and represent these floats in a separate table, with reference to the primary key. This seems awkward, slower at gathering these floats for a particular x, and space wasteful as each float pair must be associated with the referencing primary key values. But this will allow me to make queries using the float pairs.

x_float_pairs = [prim_key_ref, 100, 1.2; prim_key_ref, 101.1, 234.3; …]

A fourth is to create a table to contain the pair of floats per item x; probably the worst idea right?

Any suggestions? Thank you in advance.

  • 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-23T22:56:50+00:00Added an answer on May 23, 2026 at 10:56 pm

    If you’re committed to using SQLLite I would tend to go with the normalized approach. It is very quick to look up rows when you have an index. That is the paradigm which is supported by SQL databases.

    If you have a bit more flexibility then you might think about using blob storage which would allow you to retrieve the rows as one set. Without knowing more about how you’re planning on accessing the data it is difficult to recommend a strategy which will work well in all cases.

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

Sidebar

Related Questions

I'm fairly new to working with relational databases, but have read a few books
I'm fairly new to database design, but I understand the fundamentals. I'm creating a
Fairly new to database schema (plan to use SQLite). Having said that, I'm thinking
I am fairly new to php and mysql but I have created a small
I'm fairly new to Rational Functional Tester (Java) but I have one large blank.
Fairly new to socket programming, but I've been assigned with a whopper of project.
Fairly new to sqlite (and sql). For each row in a table, I'd like
I'm fairly new to Django and having read the documentation on its relational models
Fairly new to Jquery here.... but one thing I have been told and being
Fairly new to jquery so I might be making a simple mistake but I

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.