MySQL is an open-source, relational database management system.
0
votes
1answer
127 views
Which is better to call: API or Database?
I'm building a web app that hits up some APIs to get JSON dumps of data. I'm running across a problem. I can either grab all the data, dump it into a DB, then pull it from the DB as needed. OR I can ...
-5
votes
0answers
46 views
I add dynamically dropdown and input fields rows using Jquery php but how to submit multiple fields row data into mysql Php? [on hold]
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
$(function () {
$('#btnAdd').click(function () {
var num = ...
9
votes
2answers
193 views
Benefits of Structured Logging vs basic logging
We're building a new app and I'd like to include structured logging. My ideal setup would be something like Serilog for our C# code, and Bunyan for our JS. These would feed into fluentd and then could ...
0
votes
1answer
55 views
Generate id in application or use database generated one?
I am writing a small app that manages a couple of recipes. I have a MySQL database that is used by my data persistance layer. I need some kind of id in my business objects representing the recipes to ...
1
vote
2answers
76 views
How to sync the data from the same user across multiple devices
I'm working on a small fitness app in which the user (whom is authenticated with the a server) could create their own workout plan which will be synced with a server.
The problem with this is that ...
-4
votes
0answers
14 views
Insert fails in phpMyAdmin, but works when using MySQL directly [migrated]
I'm trying to insert a hash into MySQL, so I can test user logins. My first instinct was to use phpMyAdmin to make quickly updating passwords easier (default hash is 60 0's), until I get around to ...
0
votes
1answer
83 views
Saving an image in MYSQL vs saving to a folder [duplicate]
Is there an advantage to either method and/or a risk to either? Looking to upload JPG or PNG files only with a size limit of ~3mb with reduction done before insertion.
0
votes
0answers
14 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
44 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
51 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
49 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
61 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
44 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 ...
6
votes
0answers
77 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 ...
0
votes
1answer
94 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 ...
3
votes
1answer
124 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
110 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
35 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
55 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
34 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
139 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 ...
0
votes
2answers
293 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
31 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
132 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
241 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
196 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 ...
2
votes
2answers
218 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
166 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 ...
0
votes
1answer
110 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
85 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
157 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
319 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
151 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
404 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
94 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
3answers
313 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
2k 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
142 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 ...
0
votes
4answers
358 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
197 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 ...
2
votes
3answers
195 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
80 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
341 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
313 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
269 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
134 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
623 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 ...