Questions tagged [database]
A database is any organized collection of data organized to provide efficient retrieval.
545 questions
6
votes
2
answers
146
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
144
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
110
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 ...
4
votes
2
answers
98
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,...
5
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
680
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
761
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
136
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:...
2
votes
1
answer
46
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 ...
0
votes
0
answers
31
views
Golang, designing a flexible attribute system with diverse possible value types
So long story short, I am trying to model an attribute system for my application. It would have user attributes and system attributes, that behave exactly the same except one being tied to a specific ...
2
votes
1
answer
59
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
69
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
745
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
54
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 ...