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

learn more… | top users | synonyms

0
votes
0answers
15 views

Dynamic Printing Options

I believe this is the correct community to post this question in, if not please point me to the correct one. Overview: Current web app gives users the ability to print labels from specific printers. ...
-1
votes
0answers
21 views

Shuffling of MCQ's in my examination portal

the screen shots attached are structure of database of my exam portal, one picture represents the question bank and second represents the test details.Test ID is acting as a primary and foreign key. ...
0
votes
0answers
79 views

how to create triadic relations in laravel framework

I need to create triadic relation in laravel framework. Consider three models: Card, Notes, User. Card is related to notes and user, while they are related to each other. Now in models, when the ...
1
vote
1answer
110 views

Php-mysql injection

<?php error_reporting(E_ALL); //ini_set('display_errors', 1); $db_server = "localhost"; $db_name = "2"; $db_user = "root"; $db_passwd = ""; $connection = mysql_connect($db_server,$db_user,$...
3
votes
3answers
56 views

Mirror data from SQL Server to MySQL on a computer with dynamic IP

Here is my problem, I have a task to create an android app to display data from our SQL server, the problem is our SQL server is not online. We have a MySQL server too, the MySQL server is online, so ...
0
votes
0answers
10 views

Updating user input based parameter in google search document

I am trying to implement rating system in google app engine and trying to use search API to maintain documents that has update rating. I will not use these rating to query but I want those rating to ...
-4
votes
1answer
54 views

How to give not null constraint at table level? [closed]

Can I give not null constraint as given below in MySQL create table instructor ( ins_id int, ins_name varchar(100), salary int, not null(ins_id) ); What will happen if ...
-2
votes
0answers
21 views

submitting a post request with an empty field does not update the previous value to an empty string

I have the following line, where the value may become outdated and need to be cleared. However, the database only updates when the value is changed to some non-empty string. <textarea name="...
1
vote
1answer
42 views

Updating all records in MySQL table while still available to the user

I have this 'table A'. It contains two columns; email and email_alias. A sample is below: ===================================== = email | email_alias = ========================...
4
votes
2answers
77 views

How to handle a one-time startup SQL script

I'm trying to figure out the best way to tackle running a one-time SQL script when a service instance starts up. Here's the scenario: We run multiple Amazon instances of our service in parallel. ...
0
votes
2answers
56 views

Should object enforce validation rules on read as well as write?

I have a class that enforces database-friendly formatting for some of its properties in the __construct() method. This guarantees that if a new object is created and saved, it will be saved correctly....
4
votes
2answers
100 views

Database design, processor vs inconsistency

I was wondering, if I have a table that stores, lets say, a user's transactions, then when I need to fetch the user's current balance I would have to go and use SUM() like SELECT SUM(value) FROM ...
-1
votes
2answers
66 views

Can I start a search after a certain number of rows in MySQL

I am thinking of a case where I have to find, say, an article with a title given as input by user. All my articles are stored in db and somehow I know that the requested article is after n rows. There ...
-2
votes
1answer
56 views

How to compare Sql datetime field with date field [closed]

I have datetime type column in sql tablename id createdand i get date from input date type html tag I want to compare in sql query where close condition. How to compare both field. var startDate = $('...
3
votes
1answer
98 views

Getting posts from users that are being followed: two different implementations

I have two different implementations for retrieving posts from the users someone is following and I want to know which one you would recommend using. First I'l show you the tables, and then the two ...
0
votes
1answer
132 views

Question(s) about PHP PDO connections

Let's say I have a Db class [ db.php ] : <?php class Db { // class properties private $db_driver = ''; // dsn credentials private $db_dhost = ''; private $...
1
vote
3answers
86 views

Multiple items in a single column SQL

I'm creating a charter database structure. I'm trying to figure something out, I have read on here that databases should be normalized. Now, I'm a bit confused on this because I believe I have ...
1
vote
2answers
99 views

Are there downsides to not explicitly defining database relationships?

I have a PHP application with a MySQL database. I have not defined any formal relationships between tables. (eg. Set Foreign key, etc). Although in every query (CRUD) I always consider the relation ...
3
votes
3answers
160 views

How to test data based on SQL queries?

I'm trying to set up a test framework for (SQL) datasets that get updated daily. I want to write assertions that involve comparisons between two tables–for example, the sum of column visitors in the ...
3
votes
3answers
172 views

When dealing with tens of billions of rows in a web app table, would a NoSQL database be noticeably faster than a relational one? [closed]

I'm currently designing a conceptual web app, where users can submit posts, comments, and "like"/"dislike" both of those. However, I am not sure of how to store the (dis)likes, because of how many ...
1
vote
1answer
167 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 ...
9
votes
2answers
479 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
97 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
223 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 ...
0
votes
1answer
99 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
18 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
54 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 ...
4
votes
0answers
105 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
75 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
81 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
105 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 questions....
8
votes
1answer
181 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
99 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
128 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
151 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
39 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
206 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
1answer
56 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
216 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
395 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
34 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
137 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
260 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 available....
0
votes
1answer
277 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 ...
3
votes
2answers
352 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
225 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
131 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
114 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
167 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( '...