Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [database]

A database is any organized collection of data organized to provide efficient retrieval.

Filter by
Sorted by
Tagged with
1 vote
0 answers
30 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 ...
Jason's user avatar
  • 11
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 ...
Gerard Torrent's user avatar
-1 votes
1 answer
58 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 ...
BeeFriedman's user avatar
1 vote
0 answers
35 views

insert then update generated id back to the table on bulk insert using XML in SQL server

I have 2 tables StockDetails, StockMail First insert Stock name and Expiration Date into StockDetails Table(inserting bulk data using XML) Then Generate Reminder date(7 Days before expiration date) ...
Relax's user avatar
  • 131
2 votes
1 answer
53 views

Python SQLAlchemy database model for Version Control system

This is my first time creating a non-trivial database and I was wondering what I could do better. As the title says this will be used a in toy version control system. Most of my choices feel "...
Doruk's user avatar
  • 203
1 vote
1 answer
56 views

Insert huge data from csv file in .Net framework 4.7.2

I need to insert about 500k - 1 million data lines from a CSV file. The time of getting the reports list and insert to database by using SqlBulkCopy is very good (...
HaNgocHieu's user avatar
1 vote
3 answers
145 views

Inventory Management System

I'm trying to learn Django by building an inventory management system, here's my final models.py. I'm looking for feedback! ...
saad.sawash's user avatar
-2 votes
1 answer
47 views

which layer is more fit to check data integrity: service or database? [closed]

I read a book named Effective SQL and found this interesting part. Enforcing and maintaining business rules and relationships in the data is part of the data model, and the responsibility belongs to ...
bear su's user avatar
10 votes
1 answer
3k views

COBOL Database Program

For a school project I've created a database program in COBOL and now that I'm finished, I have to write a report on the project. As one aspect of the report, we have to discuss whether the product (...
drake14w's user avatar
  • 103
4 votes
2 answers
247 views

A PHP class for the common database operations?

I'm a CS undergrad, so I don't have much experience. But while coding vanilla PHP projects, I found that I was repeating myself a lot with the CRUD operations. So overtime, I developed a single file ...
sammy medawar's user avatar
1 vote
0 answers
32 views

Fully updating DB table with Prisma (TypeScript)

I'm often updating the Pokemon model with more detail. This detail is then sent to the UI to be displayed in the new sections I add over time. Since there are ...
eloy's user avatar
  • 43
2 votes
0 answers
38 views

Barebones Qt/QML app that generates a list of dishes and then a shopping list with ingredients

I have written a simple app that generates a menu in the form of a list of recipes. It furthermore generates a shopping list, given a menu, consisting of the (unique) ingredients in the recipes that ...
Michele Bolognini's user avatar
0 votes
1 answer
60 views

DB Layer of a project management CLI

I am (re)writing a project management CLI and want to put it on a solid foundation concerning the database connections and testing. My focus was to build a DB class which is easy to test and could be ...
Koala's user avatar
  • 103
11 votes
4 answers
2k views

Simple Key Value Database using C

I was recently doing an assignment for a job interview, which asked to create a simple key value database with 4 command line operations: create key value: Adds a key value pair/updates an existing ...
P4PL4's user avatar
  • 111
0 votes
1 answer
79 views

PHP login codes suggestions

Now i have a fully functional PHP codes for login and registeration i was wondering if anyone could offer improvements to the code The code: Config.php: ...
Bebo's user avatar
  • 39
1 vote
1 answer
142 views

Follow up to Validation Script in PHP

So I've implemented the suggestions in Original question And now my code looks like this: ...
Bebo's user avatar
  • 39
1 vote
1 answer
117 views

PHP Validation script

The code below is modified slightly from the code in this previous post. I believe the code below could be improved and more secured but i don't know how so someone please show me how an improved ...
Bebo's user avatar
  • 39
0 votes
1 answer
221 views

SQL & PHP login method

My code is working however it seems to be using old outdated php version so less secure and I'm still new to programming so I'd be more than thankful if someone shows me how an improved updated and ...
Bebo's user avatar
  • 39
4 votes
0 answers
51 views

API for operators and alerts

Note: The important chunks of code are pasted in the question but the larger representation of the app is available on GitHub. Some time ago I was tasked to create a simple FastAPI app. I did manage ...
Nitwit's user avatar
  • 501
0 votes
0 answers
28 views

MySQL join query to link valuations with associated valuation tasks

...
Michael LB's user avatar
6 votes
4 answers
153 views

an algorithm that chooses the best games on steam

The code below will go through an excel spread sheet taken from kaggle, is named "SteamGames (71k games)" and the creator is "MEXWELL". inside the ...
Ellie's user avatar
  • 549
4 votes
1 answer
208 views

Storing icons in Room Database

I want to store some 512x512 icons for my Android app in a Room database. This is so each item in a list can have all the text data along with the image data stored in a single record. The answers to ...
Adam's user avatar
  • 321
1 vote
0 answers
63 views

Appending data from files listed in a file

I am working on a project that requires me to write VBA code which, upon a button press, loads the data from certain files in a given directory. In my testing, I was able to load the data from 1100 ...
Leon-Josip Dzojic's user avatar
1 vote
1 answer
98 views

Is there any sugestions how to make this script faster if its possible?

I wrote a script that uses an uploaded excel file to import data to the database. It checks for the image first if it can be downloaded without any error then insert the rest of the data. With ten or ...
Benjji's user avatar
  • 11
1 vote
1 answer
115 views

Laravel Eager Loading tickets from DB

So I have the following relationship in my Model: Events Model: ...
Nifty Matrix's user avatar
1 vote
0 answers
25 views

Database recording users' consent to be subject to commands of other users

I am adding a database to my application that fulfils these requirements: There is a set of users and a set of commands. Each user can consent to any number of other users to have commands done on ...
Papa Grisha's user avatar
2 votes
1 answer
74 views

Helper functions to get, set and remove from Firefox browser storage. Also, to get, push and remove from lists stored in the database

I am making a plugin for Firefox, this is (more or less) my first time working with JavaScript. Is this a reasonable design for working with both values and lists in a database? ...
Emil Holmsten's user avatar
2 votes
1 answer
500 views

How to structure in handling websocket and inserting data to databse in Python

I connected to the websocket, and the data response in the callback function handle_message. I wish to insert all the data to influxdb using ...
tung's user avatar
  • 107
4 votes
0 answers
59 views

Use XYZ data to create cross sectional profiles across beach terrain, using OS Grid

This might be a slightly long question, but I've recently been doing a bit of R&D on the data processing workflows within the company that I work at and it would be great to see if there are any ...
Adam Johns's user avatar
0 votes
1 answer
181 views

Efficient way to read files python - 10 folders with 100k txt files in each one

i am looking for an efficient way to read and append texts of .txt files to a dataframe. I currently have 10 folders with 100k documents each. What i specifically need to do is: getting the names of ...
Piergiorgio Di Pasquale's user avatar
2 votes
1 answer
85 views

Database buffer class

I designed the following DataBaseBuffer class, to be used by different threads that generate queries and need to send them to the database. It was inspired by ...
Reda's user avatar
  • 23
4 votes
1 answer
211 views

Postgres DB design

I need to develop a database to handle muting people in an online community. The DB needs to keep track of the currently muted people. When somebody gets unmuted, that entry gets moved to an archive ...
Larry Teischwilly's user avatar
8 votes
2 answers
1k views

High traffic website that shows users subscription status

I was in two minds as whether to post this question on stackoverflow or dba stackexchange but because I am asking for review, I thought of posting here. I am new to Python and looking for feedback on ...
javanoob's user avatar
  • 183
0 votes
1 answer
172 views

Movie library system

I want to implement a crud movie library system and also some filtering capabilities. Since it is so big, I have added the link to the code. https://github.com/neslihanbozer/Movie-Library. I am aware ...
Nesly's user avatar
  • 17
0 votes
1 answer
69 views

EF Core code-first "many-to-many-to-many" (Books with many credits with many people)

Let's say you have a book. A book can have an author, an editor, a proof reader, or several other credits. Which credits are available should be dynamic (someone might not want to have the "proof ...
TheHvidsten's user avatar
3 votes
1 answer
174 views

Summing categories of financial records per month in a query

My program is working properly but I'm unconfortable with code repetition. ...
Felipe Dourado's user avatar
2 votes
1 answer
119 views

function to group data by parent branches

I wrote this function to take database output like from PDO's fetchAll(PDO::FETCH_ASSOC) and turn it into a tree. For small datasets it works well. However, when ...
aswine's user avatar
  • 123
3 votes
1 answer
420 views

Why are my read speeds so bad using sqlite?

I know very little about databases and even less about how to optimize them, but I have a problem which calls for a database so here I am... I created a sqlite3 database using the following script: <...
erip's user avatar
  • 926
5 votes
3 answers
274 views

DB Class extending PDO w/ other useful functions

I have this DB class that extends PDO, that also has useful functions for certain tasks; I was wondering how well it's coded, and if so, what I could maybe improve on. I tried commenting in ...
Crimin4L's user avatar
  • 153
2 votes
1 answer
632 views

A database trait in Rust. How can I make all these generic parameters easier to use?

I am trying to hide the implementation details of accessing a Postgres database. To do this, I want to create "database" and "transaction" traits for use in a repository struct. ...
haz's user avatar
  • 255
1 vote
0 answers
46 views

UPDATE on Newspaper Bill Calculator CLI with Python (3 of 3, Database)

Code is posted after explanation. Due to the size of the project, this is being posted in three separate posts. This also ensures each post is more focused. Post 1 of 3, Core: UPDATE 1 on Newspaper ...
eccentricOrange's user avatar
-2 votes
1 answer
194 views

Insert row into database using static or non-static method [closed]

I would like to know if there are any benefits of one of the following 2 methods which insert an object into a database The first function calls the Model method statically, creating a new instance of ...
Raging_Jim_Lahey's user avatar
3 votes
1 answer
87 views

Newspaper Bill Calculator CLI with Python (3 of 3, Database)

Code is posted after explanation. Due to the size of the project, this is being posted in three separate posts. This also ensures each post is more focused. Post 1 of 3, Core: Newspaper Bill ...
eccentricOrange's user avatar
3 votes
1 answer
99 views

Acupuncture database builder

The following code builds a rudimentary acupuncture database by collecting data from the web. I would like to hear suggestions about improvements to the database structure, code organization, web-...
Sati's user avatar
  • 417
0 votes
2 answers
184 views

Version 2: Display visitor's number on your web page (changed code after getting answer for first version)

Version 2: Display visitor's number on your web page (changed code after getting answer for first version). The first version is here: Display visitor's number on your web page The "visitors&...
user avatar
0 votes
1 answer
281 views

Display visitor's number on your web page

Display visitor's number on your web page. The "visitors" table has only one column (visitor_count) and only one row. The column's initial value is 0. I know goto should not be used but then ...
user avatar
1 vote
0 answers
29 views

Django data migration - worked, but far from performant

Background: I am learning web dev and decided on the Django framework as an excuse to learn Python at the same time. (Background is stats with lots of R and ...
Mr Meeseeks's user avatar
4 votes
1 answer
154 views

Implementing a data extraction pipeline with Bash

I wrote the following scripts to extract data from BigQuery and InfluxDB using the bigquery cli and the influx cli. The code works as expected. I included all files for completeness, but I'm primarily ...
Moritz Loritz's user avatar
2 votes
1 answer
250 views

Optimization of laravel pivot table relationship

I have a pivot table called invite_riskarea which is designed as follows: This table stores the permissions that have a specific user (through an invite id) to ...
sfarzoso's user avatar
  • 137
1 vote
1 answer
78 views

Search controller logic to search through models and manufacturers

I have the following Laravel controller that searches through two models - Manufacturer and SearchTerm (which contains models of manufacturers, synonyms of models as well as common misspellings) using ...
Hashim Aziz's user avatar

1
2 3 4 5
11