Questions tagged [database]

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

Filter by
Sorted by
Tagged with
-1
votes
1answer
44 views

Login to a school system and get account type

I'm new to MySQL database design. My question is this database is correctly built or not. We used the users table to login and get account type and here the code to login ...
3
votes
4answers
81 views

Java program to manage animal data and store them in text files

I made this program as a baby step to creating an animal shelter management system that will be used in a real life animal shelter. The goal is to move from text files to an online database, and from ...
1
vote
0answers
34 views

Lightweight, modular Discord bot - tips and feedback on the code?

The full project is up on GitHub. The codebase is super small as it stands. I'm brand new to reactive programming and Spring, and would mostly like insight on those two things. Asynchronous ...
1
vote
1answer
35 views

Database connection and DataMapper

Following my previous question Database interface and PDO adapter, I wrote a new simple class to connect to Database and run a query returning a PDO statement. ...
2
votes
1answer
54 views

Database interface and PDO adapter

I'm writing my own framework in PHP and I want respect the SOLID principles. I made this interface: ...
2
votes
1answer
81 views

Employee database

To keep in practice with good techniques of java programming, I've decided to write a database. All it does it stores employees, allows users that are logged in to get/set employees, and has a login ...
2
votes
1answer
24 views

List products based on slug and sidebar filters

This method shows the list of manufacturers' offered products based on the slug and sidebar filters. Most of the time I have to write the same query with only some changes: you can say I am repeating ...
0
votes
0answers
35 views

Parties and Messages in SQL e-Commerce db design

I'm posting a follow-up question based on my first question. My goal is to, as an exercise for myself, create a complex (in my opinion) e-commerce application. The explanation of the application can ...
4
votes
1answer
83 views

SQL e-commerce database design

I want as an exercise to create an e-commerce application from bottom up. My main goal here is to gain a lot of knowledge. I have experience in web development, but never have been there from the ...
3
votes
0answers
28 views

Connect to a database with Diesel

New to Rust and would like some clarification on idiomatic and readable use of Result and Error types. Here I'm simply connecting to a database using Diesel. In my opinion, the use of match and Boxing ...
0
votes
0answers
24 views

Ensuring referential integrity in child, group relationship

I'm not going to lie - Sql Server is not in the top 10 of my skill set, but it's something that I have to do from time to time. What's more, I'm using Entity Framework, so there is a workaround ...
2
votes
1answer
53 views

Using IndexedDB as an in-browser cache

In my site: Users have many Activities Each Activity has encoded_polyline data I display these encoded_polylines on a map I want to use IndexedDB (via Dexie) as an in-browser cache so that they don'...
4
votes
1answer
58 views

Django model for real estate

I have built a real estate management system with Django. I want to know if my design database was wrong. Please let me know how to improve it. Should I make the models use more than two tables (...
0
votes
1answer
32 views

Handling a PUT API call to write to a database using promises

The following function is accepting PUT connection to a server API, checks authorization to write and then performs write to a database. The eslint linting tool ...
2
votes
1answer
107 views

Conditional joining Pandas dataframes

I'm looking for an optimum way to join two Dataframes where the same record exists in both. Examples would be: ...
2
votes
2answers
63 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... ...
5
votes
1answer
73 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
57 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
34 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 ...
3
votes
1answer
107 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
84 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
55 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
54 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
74 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
284 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
46 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
132 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
974 views

MySQL database schema for e-commerce website

I'm making an e-commerce site, using MySQL for storing data. ...
3
votes
2answers
113 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
444 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
64 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
16 views

Dynamic Statement Evaluator

I've written a stored procedure in order to simplify the process of calling dynamically constructed MySQL statements: Implementation ...
1
vote
1answer
72 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
48 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
82 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
60 views

Insert data on Data Base using PDO Prepared Statement

...
1
vote
1answer
300 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
2k 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
535 views

Library Management using File Handling

I have never written program in file handling. Help me improve this program. book.h ...
3
votes
1answer
84 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
295 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
140 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
289 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
108 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
197 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
67 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
572 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 ...