Questions tagged [database]
A database is any organized collection of data organized to provide efficient retrieval.
544 questions
6
votes
2
answers
157
views
Pydantic model <-> neomodel OGM (neo4j) <-> python dict converter
I've written a converter between pydantic models of arbitrary complexity (thus, with submodels, nulls, lists) and neomodel models (library for ...
4
votes
1
answer
151
views
Replace node type in Drupal
In Drupal 11 or greater, this code is used to change the node type of a node. How would you improve the code if at all?
...
1
vote
1
answer
117
views
Database design using Closure Table for tagging system
I created these database tables with the inspiration in NjDevPro github repository. The design uses Closure Table for implementation of hierarchical tagging system in ...
5
votes
2
answers
102
views
Accessing and editing a database in python using JSON
I am a beginner programmer and have recently started learning python. I wrote this code as a little project to understand dictionaries better and ended up having to learn to use JSON. I am self-taught,...
6
votes
4
answers
2k
views
Program for an employee database using python
In this program I'm defining functions to perform different tasks on a data record book for employees.
Here is a summary of the code:
Intro() to make the presentation of the home page.
create_record()...
5
votes
2
answers
695
views
A schema for awallet system that allows transfers between users
I am currently working on a wallet system that allows transfers of money between users. I tried creating this as a Stack Overflow question, but it was rejected. I'm not sure if this is the right ...
7
votes
3
answers
772
views
Optimal Algorithm to Append and Access Tree Data
I have been studying intermediate or more advanced data structures in Python, one of which I've decided to try out is the Tree Data Structure. I've been studying the theories as well as the ...
3
votes
1
answer
137
views
Faster Query to Track State changes in a Large Table
I have a table that tracks state changes of an entity with timestamps. The schema of the table is as follows:
entityid
userid
originalvalue
newvalue
changetime
255
101
Draft
Submitted
2023-11-28 12:10:...
1
vote
1
answer
48
views
Databases, dependency injection and static methods
I'm working on a Next.js app and looking at the best way to structure database access. With Next.js and web based apps in general, there are lots of different "server actions", aka, API ...
2
votes
1
answer
63
views
Database schema for project management app
As a side project, I'm developing a desktop app for project management, especially for students, self-employed, freelancers, etc. as a general purpose productivity tool, not from any business or ...
2
votes
1
answer
71
views
Delete duplicates from SQL database with Python and reset ID's
I tried to create a peice of code that helps me remove duplicates from my sql database and reset the ID's as well.
I am not sure that it's error proof.
...
7
votes
4
answers
749
views
JSON data format for MCQ data bank
I'm creating a data bank of MCQ (Multi Choice Questions) and their answers so that an app can be built around it. Regarding the actual storage format, I have two ideas:
An array of objects with keys (...
2
votes
0
answers
56
views
Case Study: Database design help for a small app used to coach tennis players
I have a small SQL server database and VBA program that is used to automate tasks related to tennis students, programs, practices, performances, and student testing.
I'm trying to learn db design and ...
12
votes
2
answers
1k
views
Header-only log-structured database
I'm seeking a code review for the ~2000 lines of code.
Makefile and tests are available at https://github.com/torrentg/logdb.
I would appreciate feedback on the following aspects:
Overall code ...
0
votes
1
answer
79
views
Should the SqlConnection Be a Class Field or Should I Pass It In and Out Of Functions As Needed?
I am writing a C# Database connection class and I am trying to adhere to best practices and produce clean code.
In the CreateAndOpenDatabaseConnection function ...