Questions tagged [database]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
22 views

Scalable and Optimised group chat system

I have a simple chat system. I have built this to scale so I would appreciate optimisation tips or alternative table structures too. This does not include the pub/ sub queue system. Users ...
2
votes
2answers
60 views

A simple write-once-read-many indexed based database

I started writing a cyrptocoin from scratch, and then got sidetracked writing the database portion which I eventually turned it into its own project. Data is written to the database and then retrieved ...
1
vote
0answers
9 views

Parse Back4App database as a master database change log rather than actual database- thoughts on this design principle?

first post here. I'm looking for some general input as to the correctness of what I'm trying to do here. Is this a good idea, bad idea, what could be plus points or negative aspects to this design? If ...
3
votes
1answer
51 views

Testing DAO Delete User

I have several Dao classes, including a UserDao, below. The DAOs have many methods, but I'm focussing on deleteUser: ...
1
vote
1answer
39 views

Wanted to eliminate the repetition in the classes created to reduce duplication

Can some one help me on how to eliminate repetition to reduce duplication score on the below classes created in the code ...
0
votes
0answers
27 views

Is my implementation of connection scope for Dao right?I have Dao and Service where I implement connection and transaction scope

I have DaoFactory that returns DaoImpl and can make connection/transation scope ...
2
votes
0answers
16 views

Capturing email extracted data in dataframe to store in database of a django web frame work [duplicate]

This code was written to capture extracted text from emails and store those details in a database. Now the challenge is to reduce the amount of code, improve simplicity and reduce the duplication of ...
2
votes
1answer
56 views

Object relational mapper - optimize in memory data representation and code improvements

An Object-relational mapper built using php. This was done for educational purposes, and curious to know what kind of improvement has to be done to use in production. Please refer to the complete ...
0
votes
0answers
54 views

Extract fields from email and store into a Django database

This code was written to capture extracted text from emails and store those details in a database. I would like to reduce the amount of code, improve simplicity and reduce the duplication of my code. ...
3
votes
0answers
61 views

How can I filter and sort LinkedList faster and more effective?I have list of orders that should be processed

I have method that fetches all orders from Database and filtering, sorting that data(I know better to do It by specific query to Database but I dont know how). I have Order entity that has following <...
1
vote
0answers
15 views

processing webhook request coming from a 3rd party application

I need some help to evaluate whether I am doing it right. The scenario is, a 3rd party application is sending a webhook request after a successful payment but the problem is that sometimes this ...
2
votes
1answer
154 views

Simplify a complex KQL Query

The situation is, I have two fields in a database (or that can be derived) - when the message was received (Received, of type ...
1
vote
1answer
16 views

BoltDB Lookup and Add methods and advice on unit testing

I am writing a Go package that handles communication with BoltDB as a part of some larger project. I have 2 methods for interacting with DB. ...
0
votes
0answers
22 views

MTG Metagame Schema

So there's another question about storing information about a trading card game, but in my situation I have to store not only raw tournament information but a lot of statistics I've extracted from it: ...
2
votes
1answer
83 views

MySQL database custom session handler using PHP with MySQLi extension

I have made the decision to move the storing of session data to the database. Any new ideas, suggestions are welcome. Please also give security suggestions. Like SQL injection is possible here, etc... ...
1
vote
0answers
23 views

Tiny persistent storable class

I would like to have a minimal storable class in Python that I can use as ORM. I quite thinking my approach is bad, but I would like to have your opinion. I do not want to use SQLAlchemy or PeeWee as ...
0
votes
1answer
36 views

Entity Relationship Diagram for Grade Calculator

I was wondering if anyone would be able to review my Grade Calculator for a course ERD? I'm looking for ways to improve the current design (if any improvements need to be made that is) and if anyone ...
0
votes
0answers
7 views

how to Transpose two-dimensional arrays values from rows into columns in postgres?

Table "matrices" Column | Type | Modifiers --------+--------+----------- matrix | text[] | not null rows count 2,values are in this format given ...
1
vote
3answers
47 views

Embedded IoT: local data storage (Second Update)

I have made the review changes based on feedback I have got from here which was based on the feedback I got from this one. I am almost done and now looking for a final review with respect to any minor ...
4
votes
3answers
51 views

Embedded IoT: local data storage (Updated)

I have made most of the review changes based on feedback I have got from here. Now I am back here for a second review to further better my code. Before posting the changes, somethings I haven't ...
4
votes
2answers
263 views

Creating a database, a table within the database and inserting some values into it in one go

I've written a script which creates a new database, a table within the database, ...
0
votes
0answers
14 views

Handling sessions in SignalR core

I am using .Net 5, and I am making game server using SignalR core. Ther're 2 ways to inject service to my classes. 1- Constructor injection: where I must separate functions and data, even if it's ...
6
votes
2answers
505 views

Embedded IoT: local data storage when no network coverage

I am working on a part of an IoT project where I have been given a task to develop a mechanism to store data locally when there is no network coverage or if the network is down for some reason. Our ...
3
votes
1answer
94 views

All core MediaWiki upgrade script (round 2)

The following script upgrades an existing, all core (no add ons) MediaWiki install. I run it with set -x for debugging (I avoid ...
3
votes
2answers
164 views

Downloading and parsing research papers

I am trying to write a script which gets a research paper from a website by calling their API and then traverse it sentence-wise with some conditions. The paper is accessible in XML format. I am ...
0
votes
0answers
63 views

Merge rows in a pandas DataFrame while ignoring specified values and checking for conflicts

The problem I have a set of dataframes where each row should have a unique ID value, but sometimes imported data has multiple rows with the same ID. I want to do a ...
0
votes
0answers
23 views

How to effectively sperate CRUD operations from the main SQLiteOpenHelper - android studio

I'm conflicting about how I want my database architecture to be built. First of all, I use a singleton pattern for the database in order to insure one instance of it (so its thread-safe), and also for ...
3
votes
1answer
30 views

Read database from IO context and update UI from Main context in Kotlin

Still a bit new to Kotlin and coroutines, so I want to learn best practices. The following code seems to work as expected in it's original context, though the naming has been tweaked here. The list of ...
2
votes
1answer
72 views

A lightweight CRUD, based on the Table Data Gateway pattern

In order to reduce the boilerplate code, I decided to write a lightweight database helper, based on the Table Data Gateway pattern (or at least the way I understand it) with the aim of using it for a ...
1
vote
0answers
37 views

Monitor room repository for livedata changes and update views

I have built a quiz app. It is my first project so the purpose is to learn app development at this stage. There are two key things which I am wondering how to do better (the app is fully functional). ...
2
votes
1answer
58 views

Covid-19 World Case Report Beta 0.1

I am a self-learned programmer and this is my first program. I would really appreciate any critique on my approach. The program should automatically download the who data file to the folder these ...
3
votes
1answer
76 views

Creating a struct-of-arrays database with encapsulating interface c++

I want to create a struct-of-arrays (SOA) database for better cache use but also have a separate interface that gives encapsulation. I am close to the design I think but would like more experienced ...
1
vote
2answers
99 views

Repeated DB connection at max user connections

I am trying to create class with connect to mysql database. And if there is max number of connections I want to wait and try it again. I figured out, how it can works, but I am not sure, if its the ...
3
votes
0answers
111 views

PowerShell Script to get data from Third Party API and insert into database

I have created a PowerShell script that will call a REST API and then for each node returned, add the data into a database table. This particular endpoint only returns ~600 records worth of data, ...
3
votes
1answer
60 views

Filtering database with Linq

I'm building an MVC web app with ASP.CORE 3.1 and EF connected to MSSQL. Today, finally after 3 days, I've somewhat reached a working code for filtering my view. I've got database of Date stamps (15 ...
1
vote
0answers
24 views

Preventing the user from entering the same categories [closed]

I'm new to MVC and EF so this may be a really simple question, but what is the best way to prevent the user from trying to enter duplicate records? I have a table called Category with two columns Id ...
8
votes
4answers
1k views

Generalization of any() function with switchable default parameter for empty iterables

I have some use-cases where I want the behaviour of the build-in any() function to be slightly different, namely to return True ...
3
votes
0answers
20 views

Organizing and accessing data in xml database - VB.Net

So I made an XML database for my music player where I store songs data (title,artist,album,genre,year) the code for generating the database is working but slow as heck, the code works as following ...
1
vote
0answers
24 views

Microservice unit testing database script insert Error - H2 [closed]

For unit testing my ProductList service, I tried run a script to insert some data and then try to get this data and compare the list size. But my database insert script is not running and returns null....
2
votes
0answers
28 views

Erlang: Seeking advice on BEST practices with ETS table manager

I wrote a some what "simple" module to retain ETS tables should the owner crash. I think it's small enough for review; big enough to make enough mistakes. Honestly I'm a hobbyist programmer ...
2
votes
0answers
158 views

Providing different __table_args__ to SQLAlchemy mapped class depending on backend DBMS

I need to set different __table_args__ for the mapped class depending on the backend DBMS, e.g. mssql and ...
2
votes
0answers
62 views

Using R to Dynamically Query Database Using SQL Template

Purpose of Code The purpose of the main function (get_player_penalties()) is to: Generate simple SQL statements from user input and a template Query a database ...
7
votes
1answer
426 views

LinDB: A dictionary type database

As an exercise, I've decided to write a lightweight, dictionary type database. Below are some of the features I've implemented: Overwrite Inserting: I allow the user to determine if they want to ...
3
votes
0answers
52 views

SQL database implementation - statement execution

This is another class from my implementation of SQL in C#. It handles the execution of SQL statements, with the core method looking like this: ...
3
votes
0answers
395 views

Product inventory database with attributes and variants

I have design a model for product apps. This is the first time I am trying to create a product's database schema and then model it in Django. My code handles the following: A product type can have ...
3
votes
1answer
159 views

Get future events from Pinnacle API

My program makes API requests to Pinnacle Sports to retrieve future events and saves them to the database. Questions: Do I manage the database resources correctly? It takes about 3 seconds to check ...
1
vote
0answers
27 views

Randomly generating invoice IDs

As more fully detailed in my question here, I'm in the process of starting a small, local business and wanted to avoid showing sequential invoice IDs to clients, and instead generate completely random ...
1
vote
0answers
49 views

Database connector in Python

I've been trying to build an ORM. I started with the connector layer, which is responsible for the database server connections and executes raw SQL as the code below shows. I have built the ...
3
votes
1answer
200 views

Meme (title with picture) exchanger

Project structure without code: Packages: Classes in packages: In ConfigConstants I store path to folder, where I save pictures. Also in ...
2
votes
1answer
52 views

Fully buffered stream with atomic commit

This is a class from an implementation of SQL in C# I am writing. It fully buffers all reads and writes, and also logs changes to a log file so that updates are atomic ( all or nothing ). It ...

1
2 3 4 5
11