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 [mysql]

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

0
votes
0answers
4 views

Deleting records and readding in MySQL using MyISAM forgets constraints with Hibernate [migrated]

MySQL - MyISAM - Hibernate First error in my assumption was that my DB had Foreign Keys. (Not as versed in the different engines provided by MySql) I was testing a multiple id delete and messed up a ...
2
votes
1answer
62 views

Allow client side direct access to the database [duplicate]

I am asking advice from the SQL graybeards. Because my following proposition goes against everything I have practiced. In this instance Let's assume we are developing a phone app. A social network ...
1
vote
2answers
87 views

Should transaction id's skip?

In my application, the transaction id's sometimes skip i.e. 3314, 3315, 3317 ... I think this happens when a payment is made, but mysql rolls back the transaction because of an error down the line. I ...
-1
votes
1answer
31 views

Hybrid solution using mysql and mongodb

I am developing a web app that uses a mysql database. I recently encountered some changes that require me to store 3rd party data having an inconsistent schema. I've decided to use mongodb as a ...
0
votes
1answer
79 views

Is it a good idea to create a new “message table” for each user? Should I worry about performance if I use a single table?

I'm working on an app that will have messages exchange and which have a database with several tables to all users data and preferences but I got thoughtful about the table of messages. I will have ...
0
votes
1answer
68 views

Database schema for products and their packages

The product is water purifier, and we are selling packages included support for changing filters. Serial is a unique number identifying a single produced item and it's only for water purifiers not ...
-1
votes
2answers
324 views

Application/Database design where two tables have both 1-to-many and 1-to-1 relationships

I have an application where the requirements are to show a list of (just for example) car manufacturers. When you click on one of the manufacturers, a list of car models show up. You can then click on ...
0
votes
4answers
117 views

Could you please recommend an approach on converting non-unique field to a unique field?

On our prod db we have two tables: companies invoices Relationship: A company has many invoices An invoice belong to a company The invoices table contains duplicate invoice_number for each company. ...
1
vote
2answers
140 views

Small databases online

This is to ask whether accdb databases are suitable for this application, and how to connect the user with the database (and the phone network with the database if anyone has a comment on this). I ...
0
votes
1answer
18 views

Architecture for remote data collection using MySQL

I am working through a MySQL design issue. I have a server with a database of phone numbers used in nuisance calls, like robocallers. I also have remote clients that are provisioned. I want the remote ...
0
votes
2answers
95 views

Database agnostic DAO (NoSQL + SQL)

Background While writing a new component, I m in middle of making a decision of SQL/NOSQL database (Mongo vs Mysql) for my storage layer. As of today, mysql seems to be a perfect fit for my use-case (...
2
votes
2answers
73 views

How to implement change log of a ticket in complaint management system [closed]

One of the requirement, in the complaint management system were are designing, is to implement complete history of the ticket. For example Status was changed (new to pending to work in progres to ...
0
votes
4answers
179 views

How to understand coalesce in MySQL? [closed]

coalesce definition in Cambridge Dictionary: If two or more things coalesce, they come or grow together to form one thing or system. to combine into a single group or thing But in MySQL, ...
2
votes
0answers
42 views

How to let users specify their own logical conditions (PHP / Laravel)

I am currently trying to create a web application, that saves inbound emails. I have figured out how to save the incoming emails into my database, and I have all the email information available (...
2
votes
0answers
32 views

Dynamic API Data Validation

I am in the process of building an heavily data-driven web application written in Node.js / Typescript with Mariadb for the database engine. I am trying to put an emphasis on extensibility and DRY ...
1
vote
1answer
22 views

Best practice to confirm unique username for user creation in JSP and JDBC?

First let me state the asynchronous approaches:- The user enters a character into the username form field. I create a connection to the database, use a prepared statement to confirm whether the ...
0
votes
1answer
78 views

Database abstraction layer

I'm currently developing an SaaS application in PHP, with Laravel, using its own DB class. Let's pretend we've got 2 classes under 2 namespaces, plus Laravel's own DB - so Illuminate\Support\Facades\...
1
vote
1answer
52 views

Ruby on Rails: primary SQL db and secondary No-SQL db without models

I have in mind to develop a Ruby on Rails app with two different databases. In the primary SQL db - let's say MySQL, for instance - I'd keep my app items, e.g. user profiling, user-user interactions ...
0
votes
1answer
49 views

Using sql triggers over higher level scripts

I recently came across a set of possibilities for creating rows in a table in my database. the scenario is that I am trying to populate a notifications table by different types of notifications data ...
-4
votes
2answers
98 views

should i create db functions in MySql rather than Php code?

I have a MySQL database and I am working with Core PHP. What is the best practice in terms of accessing the database? Should I create functions in MySQL and access them in my PHP-code OR write ...
1
vote
1answer
175 views

Does it ever make sense to create tables dynamically?

I'm building a service where I need to filter activities from different products. The actual data itself lies in another key value store. As the service needs to support filtering on the activities as ...
0
votes
1answer
56 views

Modeling entities for company invoice management software

I am making a software to store all my company invoices (and then infer some statistics about it). The idea is: My company issues invoices to it's clients. My company receive invoices from it's ...
2
votes
5answers
532 views

Is it safe to put SQL statements in my C# application?

I'm making a medium sized application to be distributed privately to several Churches. It connects to an Azure database but it does not have any server managing the information (apart from the SQL ...
-1
votes
3answers
107 views

DB architecture for managing items of different categories

I'm making a rental app which has many categories with unique properties Example: Category 1 Car which has Fuel, model, color, speed Category 2 Apartment which has Rooms, lift, ...
-1
votes
1answer
35 views

How to find the best match (set of options) among several sets of options?

Imagine a couple dozen services (sets of options), each of which contains a subset of all available options. I want to create a web form listing all possible options so that users can check the boxes ...
0
votes
2answers
135 views

How to build reports for an ecommerce webapp without slowing it down

We have a medium sized ecommerce website which is entirely custom built in using Java and MySQL database on AWS infrastructure. Over a period of past several years, our orders volume has grown ...
0
votes
1answer
52 views

Partitioning table by aggregate id for efficient eventsourcing in RDBMS

My events are stored in MySQL and I'm reaching a point where I have tens of millions of rows and things are starting to get sluggish when pulling an aggregate I have read about "table partitioning" ...
2
votes
4answers
915 views

Strategy to improve performance on key-value pairs table

The situation Our system has a MySQL database with a product table whose parameters can't be modified. In order to add optional extra parameters, a developer designed a key-value pair table which ...
1
vote
0answers
376 views

Database design for a subscription service transactions

I need to create a table or a set of tables that needs to house transactional data of a subscription-based service, so that certain metrics can be queried efficiently paired with necessary post-...
0
votes
2answers
144 views

Do i need 2 tables to book entity?

I am developing a website to store books info such (title, book_no, author, edition, container...). I have two types of insert insert series of books (Eg: harry porter series: chapter 1, 2,3...) ...
0
votes
1answer
42 views

Dealing with server errors/database data when processing client requests

Suppose my server PHP end point follows something along the lines of the following: Client sends request to server. Server updates a record Server might do some PHP processing... Server updates ...
1
vote
1answer
246 views

Strategies for managing legacy data for a medium sized enterprise

I work for a mid market manufacturing company with around 1700 internal employees and about 7000 external users (employees of our customers). We grew through acquisition which means we have many ...
-1
votes
1answer
63 views

How to implement unique usernames from a list of phrases

I am looking to create a random username based on a set of existing phrases plus an integer since there can be multiple users with the same phrase. For now lets assume there's 12 phrases such as ...
-1
votes
1answer
66 views

Single Stored Procedure Per Table Update or Per Column Update

Let's say i have a table (in a large enterprise application) that has about 10 columns. I am limiting any consumer access to the table to only be possible by calling stored procedures. When it comes ...
1
vote
2answers
358 views

Optimal use of hibernate with mysql's stored procedures

I am working on a project (to use as a reference). The project uses mysql, hibernate and spring (REST) and is supposed to be a single microservice. I have come to find out that limiting user/consumer ...
2
votes
1answer
133 views

What is the best way to maintain synchronicity between a table that has a list of another table?

I used to do Java development and with JPA, I don't really have to worry about the synchronicity between a table and the lists it owns. For those who don't understand what I mean, here's an example. ...
-3
votes
1answer
89 views

What is the best way to deal with an existing Table with around 900 columns in mysql? [closed]

I am currently get a job and faced to a Table with around 900 columns in their database. I am not sure what should I do instead of re-design the database, Please advice me for this situation that I ...
1
vote
0answers
63 views

Optimistic locking vs separate lock store for background workers

I need to compute the value of a row R on a table based on rows queried on another table B. I need to do it in a queue worker because the computation of the value can be slow. A message is queued ...
-2
votes
1answer
65 views

How to calculate user activity

I am working on a Xamarin.Forms PCL social media app project. People can like posts and comment on them which is saved in MySQL. I would like to add an activity page. What is the best way to ...
-2
votes
3answers
134 views

Keeping Different users data in same database

I am a fresh frontend web programmer. and I recently programmed few types of web based mobile applications(means originally developed on web using angularJS and I have used a tool to create .apk file)...
0
votes
1answer
89 views

Using mysql's\mariadb's root user for development on a docker development environent running multiple application instances

I have setup a docker-based development environment having the following images as you can see in docker-compose.yml: version: '2' services: phpBB_dev: build: context: . dockerfile: ...
-1
votes
2answers
290 views

How do i create a logic for dynamic product list page like below using php and bootstrap?

The big image is catalog or ad blocks that comes from catalog table. And small images are the actual products block that comes from product table. There may be more products and more catalog. ...
0
votes
1answer
76 views

Server load/capacity based on data structure

Using PHP, I created a chatbox, and I used an unorthodox way of storing chat messages in MySQL. The tbl_chat_messages has the following columns: id | sender_id | receiver_id | message | date The ...
2
votes
0answers
871 views

How to store unique sessions for logged in user(s) with different devices?

I want to do something like Facebook does. We can see any time where we're logged in. e.g.: Windows PC · New Delhi, India Edge · Active now Windows PC · New Delhi, India Chrome · 8 minutes ago ...
2
votes
2answers
74 views

Sql: Pre inserting relational entities vs the “lazy creation” of the entities

I have the following entities in my database (it's simplified): Student (id) StudentCourse (id, student_id, course_id) Course (id) Lesson (id) LessonCourse (id, lesson_id, course_id) ...
1
vote
2answers
1k views

Build a realtime chat app which stores messages in a MySQL database

I'm thinking of making a realtime chat app that would allow me to store user messages into a MySQL database. So far these are the two ideas I have. 1) Create and API which the message is sent to and ...
0
votes
2answers
653 views

Design - JSON Strings storing large amounts of data for large amount of users

I have a website that allows users to be "tracked" and track their time/work. This involves the users being able to update their account with my site at most every minute, but typically users do it ...
4
votes
1answer
282 views

Checking for duplicate with encrypted values

I was hoping to get some advice on a particular task I'm trying to implement. I have a table that stores secure data and returns an ID as a representation of that data. No problems there. So, for ...
2
votes
2answers
377 views

creating nodejs apps in php/mysql framework with later on full step by step migration to nodejs in mind

I'm looking for the most efficient path to convert over time my own made php framework for nodejs and I believe that nodejs experts and specific developers who had their years working with apache/php/...
2
votes
1answer
416 views

Storing logs on mysql database

I was looking for more information on logging user actions on the application (web based project). I did found this question, but it's a more conceptual answer, wich helped me getting started with ...