MySQL is an open-source, relational database management system.
1
vote
0answers
24 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 ...
0
votes
1answer
82 views
Nested query between two tables
I'm trying to write a query which combines data from two tables. Both tables contain information about certain objects. An object is uniquely defined by a triple (x,y,z) (each x, y and z have a ...
-2
votes
2answers
94 views
How can I distribute a PHP application without it being copied by my client? [duplicate]
My team developed software for a client using PHP, because our team was proficient at the language and it allowed us to implement the software quickly. Now, this project is ending and we want to be ...
1
vote
1answer
14 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
24 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
61 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
211 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
27 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
127 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
224 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
158 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
122 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
105 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
87 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
60 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
151 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
313 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
107 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
274 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
85 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
221 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
888 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
134 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
948 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
331 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
162 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
158 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
67 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
270 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
73 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
272 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
236 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
126 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
409 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
34 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
313 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 ...
6
votes
3answers
353 views
Do common relational database systems work 'out of the box'? [closed]
I'm quite new to software development and whenever I come across small projects which involve storing (relational) data I always ask myself if something like a micro-blog (or any other project with ...
3
votes
2answers
349 views
Do I need a web-service for this case? Data-synchronization over multiple clients
I'm new in this area and a little bit confused about my current thoughts on a web-service implementation for my application. I want to synchronize all connected clients with the current data on a ...
1
vote
1answer
1k views
How to get real time notifications, when a database change (insert, update, delete) occurs?
I'm creating a dashboard which should monitor a database table. I have only database access (no application layer). The table is rather large (10 million rows), however not changing rapidly (100 ...
4
votes
2answers
275 views
Design interface for WebService to access several MySQL databases
I am currently trying to design an interface for a WebService that can access several MySQL databases. There will be 4 operations available, Add(), Read(), Update() and Delete().
The WebService just ...
5
votes
1answer
565 views
Social network notification system
Background
I am working on an app for a client that includes some social networking features. I was originally developing the mobile front-end, but circumstances have left me in charge of developing ...
1
vote
0answers
1k views
Android, PHP session and JSON object retrieval
I am working on an app in android studio.. it currently has a login and registration system that are linked to a database and both work perfectly.
I am now trying to carry over the user id value ...
0
votes
0answers
22 views
Edit files on multiple domains on Mambo CMS
I have multiple domains on same web server, all running on Mambo CMS. Each site uses same template and has roughly same site structure. I need to edit the same page on each website - is there a ...
-3
votes
1answer
264 views
using node.js server with mysql-module and PHP for a penny-auction website? [closed]
I'm building a penny-auction platform like DealDash and just read into the WebSocket and node.js topic.
I used PHP, MySQL and Ajax to build the website. I'm nearly finished and just have to implement ...
1
vote
1answer
285 views
Am I planning my database/backend correctly?
I'm an iOS developer and to be honest I'm not really looking to become a database expert right at this moment, but I do need to know how to properly plan out what I believe to be a pretty cookie ...
0
votes
1answer
194 views
How to structure programs that interact with databases? [closed]
I've just finished a book on MySQL and I'm in the infantile stages of learning to couple that with Java. I know that the technology I need to learn is called JDBC and that it essentially allows you to ...
3
votes
2answers
152 views
How to infer the result of a query?
To understand what a query does, I have always thought the following is the procedure on evaluating a query:
Form the table as specified in the FROM clause.
Pick the rows from that table as ...
-2
votes
3answers
1k views
How to store integer array in mysql database [closed]
I am making a college attendence system so i need to store attendence of thousands of students. if I go for 1 column for each day then it will take 12*30 almost 360 column for a year. So I want to ...
1
vote
2answers
549 views
Is this a race condition?
I have a friend arguing this is a race condition, but I'm struggling to understand how.
This is for a web application using PHP and MySQL where users can login and create tickets, these tickets have ...