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

learn more… | top users | synonyms

22
votes
3answers
7k 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 ...
7
votes
3answers
999 views

what are the best tips for storing images in a database?

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 ...
3
votes
1answer
818 views

Is “PHP and MySQL Web Development, 4th ed.” an outdated book to learn from?

I want to get into web stuff, and thought of going with PHP+MySQL. I have experience in C#, C++, desktop graphics, but no web stuff besides HTML, CSS which I started learning 2 months ago. On SO ...
3
votes
5answers
692 views

Good techniques to speed up database execution

I have an ASP.Net application that is using a MySQL database. My queries are not executing as fast as I would like them too. Are there some standard ways to increase the speed of a MySQL database ...
111
votes
13answers
41k 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 ...
82
votes
10answers
10k 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 ...
37
votes
11answers
2k 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 ...
3
votes
5answers
1k views

For a large website developed in PHP, is it necessary to have a framework?

I am wondering if it is necessary to have a framework or if it is a must-have if I plan to make a large website. Large website could mean a lot of things: in other words, multiple dynamic web pages ...
0
votes
1answer
160 views

Inserting data to database from Android

I have to build an application where the requirement is that my clients will send data from their Android device and I have to save that data to a database. I have done the part of coding that ...
68
votes
15answers
15k views

Why should passwords be encrypted if they are being stored in a secure database?

I have a web service. Right now, I have passwords stored in plain text in a MySQL table on my server. I know this isn't the best practice, and that is why I am working on it. Why should passwords be ...
53
votes
12answers
32k views

Is it a bad practice to store large files (10 MB) in a database? [closed]

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 ...
19
votes
6answers
3k 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 ...
10
votes
9answers
3k views

Foreign key restrictions -> yes or no?

I would like to hear some”real life experience” suggestions if foreign key restrictions are good or bad thing to enforce in DB. I would kindly ask students/beginners to refrain from jumping and ...
9
votes
5answers
952 views

Advice for good web server development setup [closed]

A month or so ago I created my first LAMP stack and implemented a simple web site that exercised each letter in that acronym. However my development setup was much less than ideal. I don't really ...
7
votes
6answers
6k 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 ...
6
votes
2answers
762 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, ...
1
vote
2answers
669 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 ...
6
votes
1answer
331 views

General approach to re-factoring an 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 ...
1
vote
1answer
1k views

Is map-reduce the basic factor that makes NoSQL more scalable than SQL?

I'm studying the differences between NoSQL and SQL, and what makes the first more scalable. I think I got the point, so I'll try to explain: Suppose an app has a list of billions of users, each with ...
1
vote
5answers
738 views

Php: Whats my next step? [closed]

So in college I started learning Php, mostly starting with the Larry Ullman books. I got a job at a company after, where I was able to learn some stuff from the higher up guys. Since then, I've done ...
5
votes
4answers
454 views

QR Codes as Booking Confirmations for Conference?

A client of mine is holding a conference and we have the task of creating a booking system for them. However they have requested that we use QR codes so that on the door, a person can simply present ...
5
votes
2answers
194 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
3answers
228 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 ...
4
votes
3answers
333 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
3answers
394 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 ...
3
votes
2answers
947 views

I need advice developing a sensitive data transfer/storage/encryption system

I got closed on SO and told to post this here as it's about general application design as opposed to specific code. Intro I'm currently working on a project which involves the daily extraction of ...
3
votes
1answer
1k 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 ...
2
votes
3answers
707 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 ...
1
vote
3answers
693 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 ...
1
vote
3answers
898 views

How do I approach this PHP/MYSQL query?

I have a reservation system that I have coded and my final task is to allow the user to enter a set of dates and then show them all available options. The reservation table is set up with unit_id, ...
0
votes
1answer
112 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 ...