Stack Exchange Network

Stack Exchange network consists of 174 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.

1
vote
1answer
19 views

Code to get data from rest api(JSON) extract variables and upload those to databse using MYSQL

I'm working with a REST API, first time doing this and i have a working code but its long and just looks messy to me. I just know there's a better and faster way to do it. But like I said it's my ...
-1
votes
0answers
5 views

Basic Authentification for SwaggerUI generated RESTful services in Groovy/Grails [on hold]

Sorry for my naive question. I want to test basic authorization in my swaggerUI generated REST endpoints documentation. I have generated some api-docs with SwaggerUI plugin containing many endpoints....
0
votes
0answers
31 views

Database design model for courier company

What do you think about my database domain? General description This database domain will be used in REST app where the main functionalities are: client makes and order with parcel (weight, size, ...
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 ...
0
votes
0answers
6 views

Double Entry Accounting Schema [migrated]

Setting up a double entry accounting system for personal use and to help manage a really small business. Trying to put a few features that seem relevant now. I'm just starting to learn about DB/...
1
vote
1answer
66 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
46 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
52 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. ...
0
votes
1answer
34 views
0
votes
0answers
14 views

Node.js: User model and DB insertion queries

I have written the following user model for an app I am working on to encapsulate some raw SQL queries and insert rows into a PostgreSQL database. I need some input on how I can refactor and extract ...
1
vote
1answer
34 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
173 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
123 views

Library Management using File Handling

I have never written program in file handling. Help me improve this program. book.h ...
0
votes
0answers
29 views

Document purchasing

I have created a ASP.NET Core WEB API service and I am using EF core for communication with a database. Now, I am looking for an efficient design of my database. At this moment I have three tables ...
3
votes
1answer
74 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
279 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
124 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 ...
1
vote
1answer
279 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
32 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 ...
0
votes
0answers
45 views

ContactBook console based app

I wrote this simple contact book app. It helps the user to store and retrieve contact information. The app uses a SQL database server to store all the user data. One significant fact is that the db ...
-1
votes
2answers
100 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: ...
2
votes
1answer
121 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
43 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
568 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
71 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
60 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
96 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
36 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
73 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
102 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
52 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
41 views

Comparing data in SQL using foreign keys

The following is given: ...
0
votes
1answer
101 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
27 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
72 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
155 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
36 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
66 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
133 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
91 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 ...
0
votes
0answers
22 views

Filemaker script to omit records

I have a script in Filemaker to omit records. The funny thing is that sometimes this works like a charm and sometimes it doesn't seem to end (have to hit Esc to stop the script). The way my script ...
1
vote
4answers
578 views

Correct using of try/catch clause on database execution

When a statement to a DB returns null, I am catching it this way: ...
3
votes
1answer
83 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, ...
4
votes
1answer
378 views

Script to store, search, and delete IPFS data with description in JSON file

Here is the script that I would like reviewed for the following: Best practices and design pattern usage Correctness in unanticipated cases Better dictionary access The script is made to store (IPFS)...
2
votes
1answer
70 views

Insert contact information from form fields into MySQL database when button is clicked

I am just a beginner trying to do my due diligence and research things properly. I am trying to go about the correct way of adding data into a database. I have read articles on the following: Not ...
2
votes
2answers
120 views

Class to provide access to various database sources

I'm struggling to understand how to implement principles of encapsulation, inheritance and polymorphism to break this code into logical parts. My background is in VBS/Classic ASP and database ...
3
votes
2answers
522 views

Entity Framework Lazy loading performance comparison

The following code takes about 20 seconds to run with about 200,000 records in the TaskLogs table: ...
0
votes
0answers
60 views

SQL Server database cleanup, need to drop stored procs, foreign keys, and tables, and?

We have a SQL Server 2008 database that has some old tables and stored procedures that need to be dropped. We want to keep the newer tables, but just clean up the old no longer used objects. My task ...