Questions tagged [database]

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

Filter by
Sorted by
Tagged with
2
votes
2answers
84 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... ...
8
votes
2answers
166 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 ...
1
vote
1answer
112 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: ...
3
votes
1answer
1k views

Inserting 50k rows with Spring Data and JPA [closed]

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
104 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. ...
8
votes
1answer
74 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 ...
0
votes
2answers
123 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
1k 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. ...
1
vote
1answer
72 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 ...
6
votes
1answer
163 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
13k views

MySQL database schema for e-commerce website

I'm making an e-commerce site, using MySQL for storing data. ...
3
votes
2answers
127 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 ...
4
votes
0answers
1k 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
75 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. ...
1
vote
1answer
74 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
49 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
197 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. ...
2
votes
1answer
69 views

Insert data on Data Base using PDO Prepared Statement

...
1
vote
1answer
736 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
4k 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
1k views

Library Management using File Handling

I have never written program in file handling. Help me improve this program. book.h ...
3
votes
1answer
87 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
633 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
156 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
300 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
38 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
114 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
219 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. ...
4
votes
1answer
97 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
576 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
96 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
194 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
1answer
59 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
88 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
134 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
155 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
53 views

Comparing data in SQL using foreign keys

The following is given: ...
0
votes
1answer
350 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
40 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
60 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
82 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
1k 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
44 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 ...
1
vote
1answer
74 views

Decrease execution time in updating rows in PHP

Any tips on how the below code can be optimised for faster execution? I have a table in postgres called staging with the below columns; ...
1
vote
2answers
570 views

MySQL database wrapper

Here is a wrapper to a MySQL connection. First I have a DatabaseController and then a DatabaseConnection. How I use this is ...
3
votes
2answers
122 views

Image Database Service

I created simply database service with get, insert, get all image names and verify exist method. All images will be store in blob storage with unique filename + postfix size. Next one I have image ...
2
votes
4answers
6k views

Correct using of try/catch clause on database execution

When a statement to a DB returns null, I am catching it this way: ...
2
votes
1answer
91 views

Exporting documents from PostgreSQL into a second database

This is my first try with a database. I read some articles/books and now i tried it myself and I want to know if I can write it better or what are my mistakes. All in all I am using try/catch/finally, ...

1 2
3
4 5
11