Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [database]

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

2
votes
2answers
52 views

PHP Filesystem JSON Files DB

Regarding the use of the file system as a database to simply hold JSON files. Any input on this matter from people who know will be appreciated... ...
4
votes
1answer
50 views

Non-Entity framework database interaction model

A C# WPF user interface has been developed for the Book Inventory MySQL database previously shown in this question. Since the database had already been developed this was a database first ...
0
votes
0answers
54 views

Asynchronous wrapper for database connection

I'm using a database that has a library for access to it. Connection is done synchronously, it's blocking and I do not have a way to abort it. To connect, I have to write: ...
0
votes
0answers
22 views

Flask database design for a social media site like Twitter

This is a mysql database that is created through sqlalchemy. I really don't want to rewrite all of it in sql code, but the code should be understandable if you know a tiny bit of MySQL. I am ...
0
votes
0answers
28 views

Inserting 50k rows with Spring Data and JPA

I am using Spring Data JPA with Spring boot application. My requirement is to insert 50K rows in JPA entity table in one hour or less. I have 3 entities A, B and C. Entity A has a one to many ...
-1
votes
1answer
78 views

Handling Entity Framework in connected mode within Windows Forms [closed]

I know the difference between the Entity Framework connected mode vs disconnected mode. In connected mode we do all the stuff inside one single DbContext instance. ...
1
vote
0answers
20 views

how to take the linspace of values between 2 columns in pandas [closed]

I am trying to take the linspace of between 2 columns of a dataset. Heres an example. a b C D 0 3 13 3 13 1 4 14 4 14 2 5 15 5 15 ...
8
votes
1answer
49 views

Maintain non-persistent database for books

The following program displays a menu, and prompts the user to choose an option. Options include to add a book, delete a book, view all books, and to exit the program. (Note that the actual code to ...
2
votes
0answers
33 views

SQL Database for Visitor Registration System

This is intended for a web-based application that allows someone to register visitors, assign their hosts, and indicate the dates in which they will be visiting. Imagine this scenario: I want to ...
0
votes
2answers
64 views

NoSQL data model design for players in a game

I am modelling a game which can be single (player1 vs player2) or double (pair 1 vs pair 2, where each pair contains 2 players) and each game has a score. The game is group and date based e.g. Group A ...
3
votes
3answers
112 views

Dynamic PHP PDO insert method

This is my attempt at making a class for dynamic PDO queries in PHP. The code works, but I would like the hear what I can improve to make it more secure and readable. ...
0
votes
1answer
39 views

PHP flatfile storage

So, I made a tiny (~2 KB, <100 lines) library for simple flat-file data storage. How it works is, you define a file to be used, and then you can add/read/modify/delete objects as "keys" to/from ...
5
votes
1answer
124 views

Polymorphic Data Socket Factory with Query Contingency Protocols in Python

I work on a small data team where we developed this tool when we began experiencing several job failures on our legacy big data systems. We have several data lakes, each with their own API, and until ...
2
votes
0answers
138 views

MySQL database schema for e-commerce website

I'm making an e-commerce site, using MySQL for storing data. ...
3
votes
2answers
112 views

Finding the duration of how long a search has been popular

Program: I have designed a program in python that does the following (in order): Webscrapes google trends for the most popular searches Stores the searches and traffic of the searches in an in-memory ...
3
votes
1answer
59 views

Queries to print out on the screen a list of menus

For common users I have 10 queries and for registered users I have 30 queries like this one below, only to print out on the screen the link for the querystrings, a guy said to me that I should escape ...
3
votes
0answers
225 views

Generic Unit of Work implementation

I am implementing the unit of work pattern to be used in the logic layer of my application. The goal is to abstract away the tasks of managing transactions / connections. My implementation relies ...
-1
votes
1answer
60 views

Getting data from REST API (JSON), extract variables and upload those to database using MySQL [closed]

I'm working with a REST API, first time doing this and I have a working code but it's long and just looks messy to me. I just know there's a better and faster way to do it. ...
0
votes
0answers
7 views

Dynamic Statement Executor

I've written a stored procedure in order to simplify the process of calling dynamically constructed MySQL statements: Implementation ...
1
vote
1answer
70 views

Auto generate database table

I have written my own little auto-generated table class, and I was wondering if you guys can give me some tips on how to make this code more elegant and secure and maybe compact it so I use only one ...
1
vote
1answer
47 views

Handler for several kinds of requests to modify a database in an Android app

I'm working on an Android app, and at one point I need to retrieve a request code in a callback method and perform some database operations depending on the request code. It started out ok when there ...
-5
votes
1answer
64 views

How to write SQL in a industry standard style [closed]

Here are the commands I ran to start setting up a database I need. ...
1
vote
1answer
52 views
1
vote
1answer
166 views

Isolate a Database Change Within Django Transaction.Atomic

I have been typically adding the @transaction.atomic decorator to my endpoints and appreciate if a request fails at any point the data completely rolls back. However, some of my endpoints will make ...
5
votes
2answers
844 views

Generic tree data structure for flat data from a database

Could someone please review my code for performance(any other suggestions are welcome) which converts flat data list coming from database to a tree? Interface for db entity class ...
4
votes
3answers
284 views

Library Management using File Handling

I have never written program in file handling. Help me improve this program. book.h ...
3
votes
1answer
80 views

Project management query for various organizational units

I use the code below to calculate the required information from other tables. I used joins to display names instead of IDs and to get required sums from other tables. I used ...
0
votes
2answers
282 views

Fetching data from your database in a constructor

I have this item (an item is an object linked to a xml view), to build it I need 2 things, get labels from codes, and get text from the strings.xml android file. please ignore the long to int and int ...
5
votes
2answers
134 views

Filter Producs by any property

I have Products table which looks like this: I have some data in this table and I want to filter it depending on this columns (Filtering with columns type of string isn't problem). For this I have ...
2
votes
1answer
286 views

Connecting 2 databases: one for admins and one for customers

I am working with 2 databases. One for admins ('backoffice') and one for users. Account managers: Use the 'backoffice' database to manage customer accounts. Customers: Whenever a users connects ...
2
votes
0answers
34 views

Many to many (n to m) relationship without insert duplication php

I managed to make a many to many relationship work correctly using mysql, doctrine 2 and symfony 3.4. When a new element A that contains 0 to m element Bs is inserted, the B elements that already ...
3
votes
1answer
37 views

Stored procedure for sending emails at specified times after license expiration

I need to send email notifications for expired licenses: One Day Before/After Expiration Two Days Before/After Expiration Three Days Before/After Expiration One Week Before/After Expiration Two Weeks ...
-1
votes
2answers
104 views

MySQL select between MAX-n1 AND MAX-n2

I just made this link please check this out Online Results I need to select data between 2 values from a table by using MAX because each SID has different VID. My code: ...
1
vote
2answers
175 views

Synchronizer for importing XML files into a database when folder content changes

I have created a Synchronizer, the purpose of which is to read data from an XML source file and store the result in a DB. I have different source types, for example Student.XML, School.XML, etc. ...
2
votes
1answer
49 views

Mongoose schema to store items from Wynncraft's API

I am making a Schema to store items from Wynncraft's API. See an example assortment of items here: https://api.wynncraft.com/public_api.php?action=itemDB&search=a I have not finished making the ...
2
votes
1answer
570 views

Improvement in file management system based on the file names

Context: I have a program which stores data to the disk. The data is then reprocessed during some of the iterations. Thus, it needs to store, search and load set of data. Let's consider the ...
4
votes
2answers
85 views

Simple locale loader

I have a class that loads locales from a database. I'm not sure if locale is the right word. It's basically loading texts for a game, generic sayings like alerts and error messages. I'm also not sure ...
2
votes
0answers
90 views

Django social network application - database schema

I am writing a simple social media application in Django. I would like to know whether the following model structure is correct, or how can I improve the schema to get better performance. Do I need to ...
1
vote
0answers
130 views

Simple membership database and UI table design [closed]

I'm a bit unsure of the best way to tackle one requirement that I have on my project. I have one pretty straightforward task: I need to create database schema for members and their subscription status ...
1
vote
1answer
39 views

Tenis Common opponents R

I'm follow this article about "common opponent in tennis", my goal is to script it in the most efficient way. Below you can find my code but is so slow. To calculate the result of 1 match my laptop ...
7
votes
1answer
76 views

Database for storing exam results

I've been getting into COBOL lately, and I find it a very peculiar and interesting language that can still hold up to this day. The reason I'm uploading this is mostly to get some feedback in code ...
5
votes
2answers
120 views

Combining SQL Tables into One Table in New DB with Similar Fields

I have a SQL Server Database filled with Reports all having the same schema. What I've done is created a .NET application to automate the process of adding all reports to a new table. How can the ...
2
votes
1answer
67 views

Database model for a hotel

I have to create a Hotel database according to these requirements: information about guests should be found, information about rooms divided into categories, reservations (ordered by a type of a room ...
2
votes
1answer
42 views

Comparing data in SQL using foreign keys

The following is given: ...
0
votes
1answer
128 views

Filtering DbContext data dynamically by user input in WPF applications

I need to filter database data based on filters available to the end user in the form of search term text box, select boxes etc. I have put together this code and need feedback if this is a good way ...
0
votes
1answer
32 views

Is using beforeFind() event in background to dynamic update SQL queries a good practice? [closed]

I have a Projects table, which I need to ORDER BY code column. But problem is ...
4
votes
2answers
56 views

Inserting two rows that are almost identical to each other

I'm trying to make test data for an application I'm writing, and some of my test data is very repetitive, involving inserting a row and then inserting another row that is identical except for one ...
-1
votes
2answers
74 views

Improving predominance for updating 40000 records using entity framework [closed]

I have Two tables Circuit and Tag, Circuit ------------------ Id Name Path Tag ----------- Id Name Circuit_Id Now I have to loop through all the tags and ...
3
votes
0answers
259 views

Red-black tree in Rust

Although I have done a few toy projects in Rust, I haven't really done anything related to tedious memory management tasks. So I set out to create a database with the help of the project 500 lines or ...
1
vote
1answer
38 views

Creating Mongoose model

I'm creating a Mongoose model for a web service. I have a secondary index on facultyId because majority of the reads would want to search by ...