Questions tagged [mysql]
MySQL is an open-source, relational database management system.
29
questions
23
votes
4
answers
11k
views
Store images in the database, or in files with a database link?
Is it appropriate to store the image files in the database? Or it would be better to store only the path of the file in the database, while keeping the file itself on the server?
Are there any other ...
173
votes
21
answers
161k
views
Stored Procedures a bad practice at one of worlds largest IT software consulting firms?
I'm working at a project in one of the world's top 3 IT consulting firms, and was told by a DBA that company best practice's state stored procedures are not a "best practice". This is so contrary to ...
241
votes
13
answers
189k
views
Why use a database instead of just saving your data to disk?
Instead of a database I just serialize my data to JSON, saving and loading it to disk when necessary. All the data management is made on the program itself, which is faster AND easier than using SQL ...
34
votes
3
answers
24k
views
How to build completely modular web applications [closed]
In the coming months we're going to begin a project where we take a system we've built for a client (v1) and rebuild it from scratch. Our goal with v2 is to make it modular, so that this specific ...
101
votes
10
answers
55k
views
Why is "Select * from table" considered bad practice
Yesterday I was discussing with a "hobby" programmer (I myself am a professional programmer). We came across some of his work, and he said he always queries all columns in his database (even on/in ...
10
votes
6
answers
12k
views
Is MongoDB the right choice in my case? [closed]
I'm going to build my first real project in Rails that consist in a web app made of 3 main parts:
The static part where no database is used
The User registration part which will require a database ...
7
votes
1
answer
545
views
General approach to re-factoring a large, very badly written legacy system [duplicate]
Possible Duplicate:
Techniques to re-factor garbage and maintain sanity?
What is a good way to refactor a large, terribly written code base by myself?
Really open question here. I'm not after ...
4
votes
3
answers
1k
views
OOP and relational databases [duplicate]
I see a lot of talk in the OOP world about principles and laws such as Open/Close and Loose Coupling, I can understand how they are so high valued, However I seem to have ran into a problem with ...
244
votes
13
answers
266k
views
Is it a bad practice to store large files (10 MB) in a database?
I am currently creating a web application that allows users to store and share files, 1 MB - 10 MB in size.
It seems to me that storing the files in a database will significantly slow down ...
172
votes
3
answers
73k
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 ...
38
votes
11
answers
3k
views
Why isn't protection against SQL injection a high priority?
On Stack Overflow, I see a lot of PHP code in questions and answers that have MySQL queries that are highly vulnerable to SQL injection attacks, despite basic workarounds being widely available for ...
21
votes
6
answers
6k
views
Pitfalls of using MySQL as your database choice? [closed]
I've read online on multiple occassions that MySQL is a bad database. The places I've read this include some threads on Reddit, but they never seem to delve in on why it's a poor product.
Is there ...
18
votes
7
answers
11k
views
500 databases or 1 database with 500 tables or just 1 table with all the records? [duplicate]
I currently have an application that is used by a single end customer. For ease of discussion assume the application only needs a single database table for all records. I now need to support multi-...
12
votes
2
answers
22k
views
Creating a separate table for images or adding "image fields" to many tables?
I need to create a database in which several tables have images.
For example, users have profile pictures and uploaded ones and products have many pictures, as well.
Is it better to have one SQL table ...
10
votes
3
answers
4k
views
How to separate sensitive data in database(MySql)
I need to design a database that will contains information about personal disease of users.
What can be the approach in order to implement the columns of the DB's tables: encrypt the information, ...
6
votes
1
answer
6k
views
mysql, one connection vs multiple
On nodejs with node-mysql, should I create one connection for the service like this:
var client = mysql.createClient({
user: 'user',
password: 'pass'
}); // Create a new mysql Client
io....
5
votes
2
answers
457
views
Storing stop/start points in a database
Let's say I am storing start and stop points per user into a database table.
For example... let's say in a chat system, a user only needs to see lines 24-293, and 500-512. (Let's say he logged off ...
4
votes
2
answers
8k
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 ...
4
votes
1
answer
9k
views
Practical mysql schema advice for eCommerce store - Products & Attributes
I am currently planning my first eCommerce application (mySQL & Laravel Framework).
I have various products, which all have different attributes. Describing products very simply, Some will have a ...
4
votes
3
answers
2k
views
Application Logic Vs DB Triggers for database cleaning
When cleaning out old data from a set of database tables, is it safer to have the logic in the application or in a database trigger?
I am upgrading an application that I wrote a while back (and in a ...
4
votes
3
answers
2k
views
Rails data model - best practices question
I'm writing a Rails cookbook app as a learning exercise. I've created a table for Recipes which holds info for the recipe (name, author, etc...). I also have a table for Ingredients which will be a ...
4
votes
3
answers
530
views
Rule of thumb for field sizes
What VARCHAR sizes should be used for first and last names, phone numbers (preferably international), email adresses, urls, dictionary words and file names?
Edit: Zapped the introductory phrase to ...
3
votes
3
answers
832
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 ...
3
votes
3
answers
1k
views
Is it better to use a switch statement or database to look through 5,000 to 10,000 instances?
I have some JSON data in this format (5,000 instances for now):
{"id":"123456","icon":"icon.png","caseName":"name of case"}
I am allowing the user to search for the name of the case and then return ...
1
vote
2
answers
3k
views
MySQL with mutiple threads and processes
I'm developing a telecom messaging platform in C, and I'm going to need multiple processes to be working with MySQL DB.
How can I make two processes read/write to/from a Mysql DB and, if/when one of ...
1
vote
2
answers
6k
views
Store HighRes photos in Database or as File?
I run a site which has a couple of million photos and gets over 1000 photos uploaded each day. Up to now, we haven't kept the original file that was uploaded to conserve on space. However, we are ...
1
vote
2
answers
349
views
How to minimize networking cost of distributed game database?
We've been working on a networked online game project which will run in near future and
looking for a satisfying solution for our distributed game database. We didn't take networking costs
into ...
1
vote
3
answers
2k
views
Pattern for Accessing MySQL connection
We have an application which is C++ trying to access MySQL database.
There are several (about 5 or so) threads in the application (with Boost library for threading) and in each thread has a few ...
0
votes
1
answer
710
views
Schema table for multi-integration tokens
I'm designing a schema table that will manage the auth tokens for integrations // app with social networks.
At the moment only for Twitter and Facebook.
I'm thinking in this mode
id social ...