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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:37:39+00:00 2026-05-11T05:37:39+00:00

I have some software that is heavily dependent on MySQL, and is written in

  • 0

I have some software that is heavily dependent on MySQL, and is written in python without any class definitions. For performance reasons, and because the database is really just being used to store and retrieve large amounts of data, I’d like to convert this to an object-oriented python script that does not use the database at all.

So my plan is to export the database tables to a set of files (not many — it’s a pretty simple database; it’s big in that it has a lot of rows, but only a few tables, each of which has just two or three columns).

Then I plan to read the data in, and have a set of functions which provide access to and operations on the data.

My question is this:

is there a preferred way to convert a set of database tables to classes and objects? For example, if I have a table which contains fruit, where each fruit has an id and a name, would I have a ‘CollectionOfFruit’ class which contains a list of ‘Fruit’ objects, or would I just have a ‘CollectionOfFruit’ class which contains a list of tuples? Or would I just have a list of Fruit objects?

I don’t want to add any extra frameworks, because I want this code to be easy to transfer to different machines. So I’m really just looking for general advice on how to represent data that might more naturally be stored in database tables, in objects in Python.

Alternatively, is there a good book I should read that would point me in the right direction on this?

  • 1 1 Answer
  • 1 View
  • 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-11T05:37:39+00:00Added an answer on May 11, 2026 at 5:37 am

    If the data is a natural fit for database tables (‘rectangular data’), why not convert it to sqlite? It’s portable — just one file to move the db around, and sqlite is available anywhere you have python (2.5 and above anyway).

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

Sidebar

Related Questions

I have some software written in VB.NET that performs a lot of calculations, mostly
Hi I have some software written in VB6.0 that uses an SQL Server, but
I have have written some software that produces the draw for a tournament the
I have a bash script that installs some software. I want to fail as
We have just purchased some software that provides an API into our phone system
We have software that have some features that are so sensitive that we want
I am using some software that requires me to have thread safety disabled. I
I have two classes(Book,Software) that inherit from the Product class. these two classes have
I have some trial software that I wish to distribute to clients. I want
I have some (crappy) software that nevertheless works on all the installs I've done

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.