Python Forum
Object Oriented DB Interactions
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Object Oriented DB Interactions
#1
Currently I use xlrd xlwr with psycopg2 to move transaction records in and out of spreadsheets and postgres. That works but I am interested in learning OOP and it seemed like I could incorporate OOP in my current work. My question to the forum is whether or not that really makes sense practically?

My idea is to create a transaction class:

class transaction:
with attributes that map to the column headings for each spreadsheet. So each transaction would have a date transaction.date(), amount transaction.amount(), account transaction.account() and so forth. Further, I could create methods such as selects, inserts and updates which would retrieve, create and modify those transaction records.
Reply


Messages In This Thread
Object Oriented DB Interactions - by datasundae - May-25-2018, 09:28 PM
RE: Object Oriented DB Interactions - by datasundae - May-25-2018, 09:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Lightbulb Object Oriented programming (OOP) problem OmegaRed94 6 2,997 May-31-2021, 07:19 PM
Last Post: OmegaRed94
  proteins interactions Amniote 2 2,104 May-23-2019, 07:07 AM
Last Post: Amniote
  Object Oriented Programming jackbk 8 4,548 Aug-24-2018, 01:13 PM
Last Post: Windspar
  Oriented Object ldthan 1 2,460 Mar-27-2018, 11:26 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020