Skip to main content

Questions tagged [mysql]

MySQL is an open-source, relational database management system.

2votes
3answers
333views

Should I break a large user table into smaller tables for specific roles and information?

I am designing a database for a system that has a users table. Currently, the table has around 50 columns, which include: Personal information (e.g. name, email, phone_number, address, etc.) Work-...
JayDev95's user avatar
0votes
3answers
207views

.Net 8 XUnit: How to mock MySql in a CQRS API using integration tests?

This is a rewrite of my own .Net 8 XUnit: Should my tests use real data or how to mock MySql with CQRS? in a much more clear way: The reason for rewriting my previous question is because in the ...
Diego Perez's user avatar
3votes
2answers
573views

.Net 8 XUnit: Should my tests use real data or how to mock MySql with CQRS?

I'm creating tests for our .Net 8 API. We use MySql for data storage and CQRS pattern for queries. In my personal opinion, I shouldn't use the real database for testing, because you will use an ...
Diego Perez's user avatar
1vote
2answers
114views

Linking records through multiple tables?

I'm writing a game server. Similar to the Sims. Players can own furniture items they purchase from the catalog. There can also be rooms. Players can be in a room. A room can have furniture items of ...
VoiD HD's user avatar
2votes
1answer
610views

Designing a flexible and comprehensive restaurant menu database schema?

I am working on developing a MySQL database schema for a restaurant menu system inspired by platforms like DoorDash, UberEats, and Yelp. My aim is to design a schema that is flexible and can handle ...
tony's user avatar
  • 145
0votes
1answer
186views

Our php codes base has 6 different ways to do INSERT … ON DUPLICATE KEY UPDATE, how do I fix it?

Our php codes base has 6 different ways to do INSERT … ON DUPLICATE KEY UPDATE. It happened over years because the php framework is evolving and my team members come and go, although I won't say we ...
Qiulang 邱朗's user avatar
-1votes
2answers
195views

Best Practices for Storing Operational Hours Extending Past Midnight in MySQL

I'm building a PHP application to manage business operating hours, including cases where the closing time extends past midnight. I'm considering various ways to store these hours in MySQL and need ...
tony's user avatar
  • 145
1vote
2answers
666views

Is it reliable to process millions of records with INSERT INTO SELECT directly in the database?

I have several million booking rows in a table and would now like to save the totals of the booking amounts in another table depending on the customer, account no., product, etc. Should this ...
root66's user avatar
-2votes
2answers
247views

Designing a database schema for a website related to my town's history

I am working on digitizing old photographs, articles, ephemera, etc. related to my town's history, and I've been tasked to put these scans I've made onto a website for the public to see. There are ...
EdmundF's user avatar
2votes
2answers
163views

Do we have 2 logical query processings, one with indexes and one without indexes?

In the book "Inside Microsoft® SQL Server® 2008: T-SQL Programming" the behaviour of a sql query is explained. The following picture is taken from the book. I have some questions about the ...
jwa's user avatar
  • 29
0votes
2answers
191views

How to handle time differences in MySQL

I'm facing a problem with handling different timezones in MySQL. I have looked into similar questions that were previously raised, but I couldn't find a proper answer. The issue I'm encountering is as ...
Prasad Darshana's user avatar
3votes
3answers
325views

How to reliably determine changes in a DB table since some sort of "checkpoint"?

My scenario is fairly typical, but I can't figure out a good solution. I have a DB table (in reality several unrelated tables, but let's focus on one) where there is a fair deal of activity going on. ...
Vilx-'s user avatar
  • 5,420
3votes
2answers
2kviews

Is it a good practice to have two unique IDs for an SQL-Database?

Currently I want to create a SQL database effectively and "logically". Lately I read a lot about the issues that it is (mostly) not a good idea to define primary keys that can be seen from &...
Vito's user avatar
15votes
9answers
10kviews

Can it be acceptable to construct SQL queries dynamically?

I know that as a general rule, you shouldn't construct SQL queries dynamically because of the possibility of SQL injection. However, it could come in quite handy to break this rule and define for ...
Thomas's user avatar
1vote
2answers
725views

Is it a good idea to design a database based on the API response data types?

I am trying to design my database, where i have to save some response data given from an external api as a webhook. This api will return me as well “referenceId” as an identifier, which i will use ...
user avatar

153050per page
close