MySQL is an open-source, relational database management system.
0
votes
0answers
40 views
CSV scheduled upload with quotes and delimiter inside values [on hold]
The requirement is to upload to my WAMP stack on a scheduled basis a CSV downloaded from a web tool that I don't control. The CSV file is delimited by commas and enclosed by double quotes. The issue ...
49
votes
11answers
8k views
Should I define the relations between tables in the database or just in code?
In my experience, many of the projects I have read in the past didn't have relationship definitions in the database, instead they only defined them in the source code. So I'm wondering what are the ...
0
votes
2answers
37 views
Database Architecture - Comprehensive history of likes/shares/etc for all accounts?
The Setup
This is a membership-based site. Each account is capable of:
Making posts (unlimited, no restriction on frequency)
Liking, sharing and commenting (on) the other posts
The goal is to ...
0
votes
2answers
95 views
Multiple tables with same name, but each with a unique id to distinguish them?
I'm trying to code a dice game where users log in and then challenge each other. I already made a version of this game without login but only one game could be played at a time.
So now, there will be ...
-3
votes
1answer
68 views
Is there any benifit to using a PHP class to handle MySQL queries?
I know several frameworks have this functionality built in where you can use their special methods to make DB queries. I also know this is (partially) to ensure that everything is handled correctly to ...
-2
votes
0answers
55 views
Store the entire video in database or just its file name? [duplicate]
I have an web application to develop that I will have to save all videos the users uploads and reproduce them at some point.
This application must deal with extreme internet's delays since it will be ...
-3
votes
1answer
61 views
How booking system works
I want to do movie ticket booking and event ticket booking.
In that how to avoid duplicate booking in short cuncurrency.
I have five seats remaining in my event.
Two user comes both will see 5 ...
0
votes
0answers
16 views
How should I structure an iPhone based offline Cache for OData?
I have an OData web service that I need to create an offline cache API for. This class will be leveraged by an offline-capable mobile client (iOS/Android/HTML5).
One option would be a class that ...
1
vote
2answers
65 views
A good way to program for closing a long running MySQL connection and re-open it at intervals?
I'm running a Java application that creates 50 threads as part of a threadpool; each thread running in an object that reads 1000 unique rows at a time from a MySQL table. So each object has it's own ...
4
votes
1answer
141 views
How to parse events and pull specific events - triggers vs ad hoc queries
What is the best method to parse events in daily batches from external source (csv file) that produces entries in a separate table if any of a multiple of conditions are met. Conditions can vary ...
0
votes
1answer
38 views
Using messaging queue as async mysql writes
I read some articles about developers who takes rabbitmq and produce from PHP messages to write to mysql.
they do this to make the page speedup and not wait for mysql to return an answer.
So in my ...
0
votes
1answer
66 views
Need help creating a database of map polygons
As a side project with my coworkers -- we are oil and gas geologists -- we have been creating an interactive map-based learning tool for other geologists.
We are having trouble building the database, ...
0
votes
0answers
72 views
Developing client-server application on top of Netbeans RCP
Our company is developing a large, database (MySQL) system on top of the Netbeans RCP. This is a Java Swing GUI based application.
We want to take advantage of Rich Client Platform to develop the "...
3
votes
1answer
78 views
Do both the Server and Client program require a GPL when utilising a MySQL Database at only the server end
I'm building my first app and have reached a point where I'm considering switching to a MySQL database. However, I noticed the GPL on the Community version of MySQL. So I did some prowling and noticed ...
1
vote
1answer
173 views
Polling versus push notifications
I have a hybrid web app for android. The webpage or website the app shows is in asp.net. The javascript for the webpage running in the webview of the app is sending out an ajax request every 10 ...
-1
votes
1answer
90 views
Big amount of text: database vs file
I have a web application with medium-high traffic where users can save designs made by fabricjs, so each saved design is a json with many parameters.
So basically two days after launch users have ...
1
vote
1answer
133 views
Is indexing foreign keys a good practice?
Looking at DB tables created by a different developer I have noticed that whenever a table had a forein_key_id field/column, it was always an INDEX/KEY.
I am not sure if it was manually created, or ...
1
vote
1answer
71 views
(Dis-)Advantages of storing objects in relational database?
In an off-hand comment on this question about storing PHP objects in a MySQL database I mentioned that it is probably not a good idea to do so.
My reasoning is that MySQL is explicitly a relational ...
0
votes
1answer
23 views
Clan with members and admins Database Design
I want to create some clans in my game... And they can have some admins with some privileges...
Am I need to create 2 tables one of them for clan info and one of them for clan members ?
2
votes
1answer
40 views
How to stage multiple queries
I am developing a reporting framework that requires multi-step calculations for numerous customers. An added complication is that customers have specific though similar methods of calculations. For ...
-4
votes
1answer
55 views
Select rows from table1 where message_id doesn't exist in table 2? [closed]
I have a table named messages, which has a column named id (and other non relevant columns). Then I have another table named messages_data which has a column named message_id (and other non relevant ...
3
votes
1answer
52 views
Modeling a database for a heater domotic app
Imagine a domotic webapp, to command a heater.
You could setup N plans, for a plan I mean a similar table:
+----+---------+--------------------+
| id | name | target_temperature |
+----+---------+...
0
votes
1answer
66 views
Storing in MySQL relationships between different type of objects
I have an app that needs to attach objects of different types between them. For example: I have to add Lead type object to a Contact type object , a Contact to an Event and so on.
Such relationship ...
-1
votes
1answer
124 views
Is it ok to fire database queries again and again?
I am preparing a Java project and working on MySQL database.
Currently I am stuck at a point where I want size of the resultset before I can actually fetch entries from it.
The fetching of size is ...
1
vote
1answer
41 views
Why does MySQL slave receive two ROTATE events?
I am experimenting with the mysql-binlog-connector-java library for Java. When running sample queries and observing the sequence of replicated events I noticed that the ROTATE event is received twice (...
1
vote
2answers
173 views
Concurrent inserts to MySQL or write to separate tables and consolidate it?
I'm working on Apache Storm (but anyone who knows MySQL well could help too). Topology is like this:
Single spout ----emit---> Multiple instances of a Bolt
Each instance of the Bolt inserts a ...
1
vote
2answers
133 views
How should I setup a database for school management?
I'm struggling to set up a database to use in my School Academic system that is supposed to record all student's scores and then be able to prepare a report that shows students ranks.
The hardest ...
0
votes
0answers
95 views
Using an online database for multiple users to store their data
I am considering changing my wpf application to use a online database instead of a local XML file.
I have read some tutorials about binding data grids to Mysql database tables.
But what I don't ...
-3
votes
1answer
113 views
Is SQL inefficient since it has to parse through everything?
As you know SQL doesn't have arrays. So if you make a table "article" and wish to have comments on your articles I presume you would make another table "comment". Inside "comment" table you have the ...
-5
votes
1answer
188 views
Insert data into database without using form
Do i insert the current directory files name into the database in PHP but without using the form??..
Because in my project a device send the pdf files on server's folder and i want to save these files ...
0
votes
1answer
58 views
Use redundant data in database design when have multiple relation
In my web application users can submit their advertises and buy package for advertise (packages are used for priority of showing advertises)
Database schema is like this:
**Package: id, title, ...
1
vote
0answers
60 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
vote
1answer
129 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,$...
2
votes
3answers
65 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
15 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 ...
1
vote
3answers
108 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
97 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.
Each ...
0
votes
2answers
58 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
115 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
79 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
107 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
100 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
212 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
112 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
112 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
755 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
199 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
207 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 ...
14
votes
2answers
2k 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
193 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 ...