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

learn more… | top users | synonyms

-6
votes
0answers
40 views

How to update null value in MySQL boolean (tinyint) field instead of boolean value [on hold]

I want to update null value in MySQL boolean field through Hibernate which is initialized ones with boolean value.
-4
votes
0answers
34 views

List aggregator web application [on hold]

I was looking to build a small web app to list pictures by group (ex. fruits, animals, cakes, etc.). Then allowing each user to select from the various lists and create their own master list from the ...
0
votes
0answers
11 views

SQL data model for nested milestones/timframes

I'm currently weighing different approaches to a data model and I'm curious what others would do. The main nugget of info is ACTIVITIES, which belong to a chain of milestone time releases. Stages ...
-1
votes
1answer
37 views

Querying Results from End of the table

Normal behavior of the SQL Table is to add new rows in end of the table. I want to query results of single row only. So mysql command is SELECT id FROM users WHERE country='india' LIMIT 1 this ...
3
votes
0answers
23 views

Using mysql 5.7 Json Columns for EAV

I am developing an e-commerce product and I have been able to implement all functionality and am left with allowing users to create additional attributes for a product. Right Now I have two options. ...
-4
votes
1answer
32 views

Migrating MYSQL functions and stored procedures to SQL Server

The company i'm working for is selling HRIS management software. It was built using ASP and mysql. But one of our client's demand is for it to be based on MS SQL Server. our team is made up mostly of ...
0
votes
1answer
53 views

Replace use of ComboBox with user controls

In currently developing a project where I'm going to use a lot of combobox, in order to avoid repeating a lot of code I'm planning on building a user control containing a ComboBox that retrieve the ...
1
vote
1answer
27 views

How to handle file uploads express (UUID / location)

I am building a community website with a NodeJS express backend and a mysql database. Now I am up to the point where I want to store profile pictures of users and pictures related to specfic ...
0
votes
0answers
19 views

Better way to build SQL query from form input? [migrated]

Very new to php. Using XAMPP, netbeans. I am using a <form> to send various input parameters as a GET to retrieve data from a very simple two table MySQL db. After filtering the inputs ...
5
votes
0answers
58 views

Algorithm to generate Edges and Vertexes outwards from origin with max multiplicity of 3

I am creating a 2d game for a website where the universe can grow extremely large (basically infinitely large). Initially, the universe is composed of 6 stars that are an equal distance from the ...
2
votes
0answers
81 views

Why isn't LIMIT [offset,]row_count in standard SQL? [closed]

SQL:2008 added support for a comparable OFFSET syntax OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS} ONLY. On the other hand, MySQL (and SQLite) support LIMIT offset, row_count or LIMIT ...
0
votes
1answer
92 views

What is the significance of database host name while configuring database?

The name database host, how the name indicates "the server that hosts the database", should be the server ip, that hosts that database. I don't see any relation of it with the scripts that try to ...
-1
votes
0answers
7 views

Incorrect datetime value when setting up Django with MySql [migrated]

I am trying to set up Django with Mysql on a Mac machine. Django version: 1.9 Mysql version: 5.6.23 Mac OS version: 10.11 For the data communication between Mysql and Django, I use Mysql Connector. ...
3
votes
1answer
121 views

How do large corporations store API keys?

When FaceBook or Google give me an API key, are they just storing it in a database? Unlike a password, where you can hash and salt it before putting it in the database, it seems to me that a key ...
2
votes
2answers
96 views

Best approach to develop php mysql project with multiple developers

We are 4 developers working on a PHP-mySQL web project. Currently we work together as described below: All project files except DB is hosted at GitHub All project files except DB is hosted at GitHub ...
1
vote
0answers
32 views

Compiling data from multiple API sources, multiple languages, into a single database (MySQL or Mongo)

I'm thinking about a database schema, and would really appreciate if some of you could look at where I'm up to and offer some advice.. The mission - We have to write a program that will fetch data ...
1
vote
1answer
24 views

Best Multiple tables product with categories

I was looking to create an EAV structure for an inventory management system. But I read this answer and decided against it. I am looking to create multiple tables for all my products. But the trouble ...
0
votes
0answers
30 views

Compute geographic areas Laravel

I am developing a backend for a taxi app in Laravel 5. Up to now, served areas are defined by the admins but I would like to change the way it works. I would like each taxi driver to define their ...
2
votes
1answer
103 views

Conflict resolution for two-way sync offline sync

How do you manage two-way synchronization between a 'main' database server and many 'secondary' servers, in particular conflict resolution, assuming a connection is not always available(offline ...
1
vote
2answers
258 views

Shopping cart in PHP : Sessions or Database? [closed]

I am currently developing a simple shopping cart using PHP & HTML. I've been having troubles with using the SESSIONS in Php like: Sessions not continuing when I switch pages even though I ...
0
votes
1answer
29 views

MySQL: Application Table Design

I'm creating a new site which will have many objects, such as posts(text/photo/video), products, photo galleries, etc. Currently my design is to put all of the objects into a posts table, but I'm ...
0
votes
4answers
130 views

How to avoid null in primary key? [closed]

I need to make table that seems to require two column primary key with one of the columns nullable. But according to questions I read on Stack Overflow that is undesirable and even against SQL ...
1
vote
4answers
233 views

How to deal with long running transactions?

I'm developing a Content Management System (CMS) and I would like to include a "Save Changes" button. I mean: a user performs several changes in the database, but those changes are still not ...
0
votes
1answer
177 views

Tracking hours with clock in/out

I am working on a web interface that would allow the user to keep track of the amount of time people spend at their establishment. The problem: I don't know what the best way to keep track of this ...
1
vote
2answers
164 views

Roles and permissions: a good approach in defining permissions?

My application has users and administrators. The administrators split into two: super-admin and limited-admin. The super gets all permissions while the limited can be configured to inherit just the ...
1
vote
1answer
135 views

Synchronize database with external API

I currently own a website where players can look-up their statistics of a game. When someone that is not in my database yet requests their statistics, I am calling the API with a PHP cURL request and ...
1
vote
1answer
99 views

PHP MySQL unique user data [closed]

I'm trying to create a php website that users log into and they can submit data to a MySQL database. How do I make it so the users can only see data they've submitted and not everyone else's data? ...
4
votes
0answers
75 views

RDBMS v/s NoSQL for analytics [closed]

While reading about this topic online I have found out that, in general, RDBMS are good for read heavy loads and NoSQL databases are good for write heavy workloads. This statement also seemed true ...
3
votes
1answer
156 views

How do SQL transactions return immediate results?

I am using transactions to do bulk insert/updates. This is my little test loop: $now = date('Y-m-d H:i:s'); for ($i=0; $i<60; $i++) { $db->insert($cfg['ps_manufacturer'], array( ...
0
votes
3answers
318 views

Why does databases use text? [closed]

This might be a little dumb question but why do we save text in the db instead of something smaller? Couldn't there be some other way to store data in the db like in a compressed form, and then have ...
0
votes
1answer
140 views

What is the problem will happen if I create auto generate ID without using mysql auto increase of mysql table by my self?

I would like to ask you a question about MySQL AUTO_INCREMENT. I already created my own function to generate AUTO_INCREMENT when the user inserts any data input a table in MySQL. This function works ...
2
votes
2answers
336 views

matching usernames with their password

We are working on a simple login/registration form. Our login script checks to see if the username and password exist in the same row of the database. If it does exist, we bring the user to a welcome ...
0
votes
1answer
92 views

How to handle the default time when user is selecting dates to filter on?

We have an ASP.NET application which allows users to report on their data. We have a number of reports that the user selects the start and end date from a datepicker and then we returned the filtered ...
1
vote
2answers
262 views

What's the best way to track updates when syncing data from MySQL remote server to local SQLite database?

I'm making an iOS App, well, two actually. App A will be able to write TO-DOs to a remote MySQL database, and App B will be able to read what App A has written/modified. App B needs to be always ...
0
votes
3answers
1k views

Is it bad to store data in JSON form or should I use mySQL? [closed]

I've been building an application and the whole thing is built around a simple data storage system. Create an array. Convert it into JSON. Add <?php die() at the beginning to prevent access. ...
3
votes
1answer
60 views

PHP mysql checking for relational equivalence

Suppose I have a users table and in that users table I have a role_id. In my roles table I have: users - id - role_id roles - id - name roles id | name 1 | admin 2 | normal Now ...
0
votes
1answer
138 views

Algorithm to maintain a blog sign up page

I have a functional sign up page for a blog that updates a database with a users name, email, profile picture and a short bio. The General information page and the profile picture upload/bio page are ...
1
vote
5answers
1k views

Java desktop app with mysql database

I'm currently in the process of learning Java and swing and in doing so am trying to create a desktop app. As part of this app I have set up a mysql database which the app is connected to, however ...
1
vote
4answers
350 views

How can I keep browser URL secret when editing data?

Suppose, There is a user list. <a href="user/5">Edit</a> <a href="user/6">Edit</a> When a system user clicked to edit a user info. Then it goes to url to browser like as ...
1
vote
2answers
187 views

Process string before or after insert into mysql

I have a device network where each device has different sensors (temperature, humidity, etc..). Each device uploads raw measured weather data every 10 seconds to a apache/php/mysql REST API. There are ...
1
vote
3answers
173 views

Is it safe to only use intval to sanitize user input for a database select?

Is it safe to only use intval to sanitize the user input for a database select, as in the following example? $id = intval($_GET['id']); $query = "SELECT * FROM table WHERE id='$id'";
0
votes
0answers
76 views

BCMath vs MySQL: performance

Scenario I am working on a web application that handles financial transactions, and my code will need to be reusable for everything from consumer carts to manufacturer/distributor shipments. The ...
1
vote
3answers
317 views

DB Schema design : single table with more columns vs multiple tables with fewer colomns

What would be better DB design for a social network website. A single table with more columns and less rows or multiple table with fewer columns but more rows. For example: User can post an update on ...
0
votes
1answer
74 views

Should migrations modify data?

Imagine you have a table that has 5 columns, and you need to split this into two tables, because in your iterative process, your application has increased in complexity. Should migrations change the ...
1
vote
2answers
295 views

Making a safe PHP login system [duplicate]

I am making a php website that requires user login. It has a remember me function. I would like to ask if the following approach is safe ? User logs in with correct username and pass (and remember ...
1
vote
2answers
251 views

NoSQL or MySQL? [closed]

I'm developing an app that requires to save data that is not consistent across all rows. These database entries represent different kind of sport activities. Let's take an example: In football the ...
1
vote
1answer
130 views

Multiple MySQL update calls per second, can some of them be “missed”?

I have simple question, I think its not that big of a deal, but I'd still like to ask it as its boggling my mind for past 2 days a lot. What if I have a poll where instead of inserting answers to ...
2
votes
2answers
525 views

Composite Primary Key drawbacks

For website that I maintain (eCommerce) I now need to make a table that seems to require Composite Primary Key of 5 columns. I never used 5 column as primary key before, only 2 and rarely 3. I ...
0
votes
0answers
37 views

Advice on paging tree structured data

I'm in the process of building web based a commenting system, for which the comments are rendered in a reddit / disqus style tree structure. The MySQL schema uses a string of ancestor id's, and the ...
1
vote
3answers
350 views

Auto-save user input - the smartest way?

I'm developing a social network website and I'm working with php/mysql/jquery and I want users to have the most user-friendly website experience. That's why I try to avoid a save (submit) button at ...