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

learn more… | top users | synonyms

1
vote
1answer
521 views

How does MySQL blob actually work?

This is a question driven by curiosity. I am learning Oracle database and Oracle database handles Blob data in a separate tablespace, which I believe reduces overhead while trying to read large Blob ...
0
votes
1answer
117 views

Running entire frontend of a system on a flatfile cache

I'm in the middle of moving away from PyroCMS to a custom solution built on Laravel. Wont go into the details as to why here, but it is a necessity. I'm toying with the idea of caching things like ...
3
votes
6answers
973 views

OOP (php) for beginners - some unclarities

I started reading some tutorials about OOP, because I want to learn the basics. I have a question about it. I understand how you can have a object "Car" and give it a color like this ...
1
vote
1answer
436 views

Which practice is the best for database connection? (PHP, etc)

Leave a open database connection throughout the execution of the aplication, or for each time a operation will be executed a new connection will be created? Open throughout the execution: Open ...
1
vote
1answer
229 views

Class table inheritance… To 'type' or not to 'type'

I currently have a database that uses Class table inheritance model. Three different tables inherit from this table. The child tables have all a FK to the parent table and the fields are properly ...
1
vote
2answers
440 views

Why OTServs have an item cloning problem if the server crashes? [closed]

OTServs are open source MMORPGs with a huge community. Mostly all of them have a serious problem: if the server crashes, people can clone items. This is a dirty trick that can be executed because the ...
0
votes
1answer
537 views

run local php/database application on windows pc without wamp

I have a php/mysql applications which I designed, and the client doesn't want it to be online (installed on a webserver) or available on the internet, he wants his employees to use it on a local ...
-1
votes
1answer
216 views

What are techniques used to make scalable, fast databases? [duplicate]

I'm studying the differences between NoSQL and SQL. If I understood correctly, there are two main techniques to optimize a database: Indexing rows. Say you wanted to make a query such as WHERE x = 1 ...
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 ...
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 ...
2
votes
1answer
189 views

Sorting rows off an autoincrementing primary key

Is it a bad practice to rely on an auto-incrementing primary key to sort rows in a table? A coworker and I were having an argument about this subject. We need to be able to find the last-inserted row ...
-1
votes
2answers
1k views

Store and trigger cron-'like' actions with PHP and (My)SQL [closed]

I'm crashing my head over a design decision, and I'm trying to get some more inspiration/hints/tips/.. from other programmers. What is the goal: I want to run one cron task (php script) every ...
3
votes
2answers
948 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
4answers
291 views

Senior team members want to move query-relevant persistent data from DB to cache. Does this make sense?

I am a young engineer recently employed at a small company that sells products to the general public. We use Ruby On Rails and MySQL. Our database has a lot of customer data, but a great deal more of ...
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 ...
3
votes
1answer
81 views

MySQL setup for remote site failover

I'm designing a custom web-based inventory management and workflow system for a client of mine. One of their remote sites has fairly sketchy internet access, and needs to have no (or very little) ...
1
vote
3answers
424 views

Should I calculate hotness of a post on request or pre-calculate it?

Here is the Reddit's hot algorithm: cpdef double _hot(long ups, long downs, double date): """The hot formula. Should match the equivalent function in postgres.""" s = score(ups, downs) ...
0
votes
1answer
873 views

Retrieving hierarchy of tree-nodes stored in relational database

I have a hierarchical ADT that I want to store in a database. Nodes have exactly one parent element that is a node as well. Multiple nodes can have the same parent node. My current approach uses an ...
16
votes
3answers
1k views

How to design website workflow?

I have been thinking about this for really long time without reaching an optimum answer. First of all, I'm a medical doctor who loves programming but never really studied it, except for home learning ...
4
votes
1answer
339 views

Multi-platform design with Delphi, Java, MySQL and CouchDB

What are the most obvious drawbacks to this idea for an enterprise(ish) model using the following technologies. Browser based and native developed GUI using Delphi to connect to Datasnap server ...
2
votes
1answer
422 views

DB Schema for packaging products / services together under a single pric / Offer

I'm trying to 'conceive' the business logic of this website that have many activities, that the users can build their "combo" and get discounts depending on their choices and how long they are willing ...
1
vote
2answers
472 views

How do I add restrictions for users to sign up before they can access web site?

How do I get my webpage not to go back when they hit the back button and are logged out ? how can I add a web page to be blocked like FACEBOOK doesn't let you get into their site with out having a ...
4
votes
3answers
657 views

Is it conceivable to have millions of lists of data in memory in Python?

I have over the last 30 days been developing a Python application that utilizes a MySQL database of information (specifically about Norwegian addresses) to perform address validation and correction. ...
3
votes
5answers
325 views

When do I bite the bullet and hire a developer? [closed]

I have an awesome URL, I've had it since the mid 90's, and up until around 2002 I was having an awesome time writing music reviews and features into static pages and adding their URL to static index ...
7
votes
6answers
6k views

Should I encrypt data in database?

I have a client, for which I'm going to do an Web application about patient care, managing patients, consults, history, calendars, everything about that basically. The problem is that this is ...
1
vote
2answers
2k views

What is appropriate way for managing MySQL connection through C#

My question, at the bottom line, is what is the appropriate(best) way to manage our connection towards MySQL db with C#. Well, currently I'm working on some C# (winforms type) <-> MySQL ...
1
vote
5answers
1k views

Is it Considered Good SQL practice to use GUID to link multiple tables to same Id field?

I want to link several tables to a many-to-many(m2m) table. One table would be called location and this table would always be on one side of the m2m table. But I will have a list of several tables ...
3
votes
3answers
3k views

How to handle monetary values in PHP and MySql?

I've inherited a huge pile of legacy code written in PHP on top of a MySQL database. The thing I noticed is that the application uses doubles for storage and manipulation of data. Now I came across ...
3
votes
2answers
648 views

Having a generic data type for a database table column, is it “good” practice?

I'm working on a PHP project where some object (class member) may contain different data type. For example : class Property { private $_id; // (PK) private $_ref_id; // the object ...
2
votes
1answer
247 views

Sharing a database while we work on local copies?

A friend and me are working on a webapp. We're using git so each of us has a local copy of the app. But the problem is the database. We want to be able to see the latest changes the other person made. ...
2
votes
6answers
2k views

Is it possible to keep only one Database for both web and desktop applications?

I'm experiencing a trouble with my business model, let me explain better. I'm developing a software for 1 year and few months, it's for the food industry, more exactly a software to: Delivery, Take ...
5
votes
2answers
418 views

Is mysql_* deprecated after PDO was introduced?

I have been noticing for a long time on Stack Overflow that most users recommend to use PDO instead of mysql_*, because PDO is more secure than mysql_*. But my question is if websites which are ...
6
votes
2answers
1k views

What to learn after standard C++? [closed]

I switched to C++ a few months ago, learning its syntax, the main features of the STL and what you can usually find in a "learn C++" manual. Now I would like to go further. What would be your ...
9
votes
4answers
2k views

Are there any conceptual drawbacks to building a web app with C++ and MySQL?

I've inherited a pretty interesting project where there is a good opportunity to take an existing piece of software and turn it into a SaaS web app. As the project is inherited, the code base/ ...
0
votes
2answers
354 views

Breaking up a large PHP object used to abstract the database. Best practices?

Two years ago it was thought a single object with functions such as $database->get_user_from_id($ID) would be a good idea. The functions return objects (not arrays), and the front-end code never ...
3
votes
4answers
737 views

My father wants to learn PHP-MySQL to port his application. What I should do to help?

My father is a doctor/physician. About 15 years ago he started writing an application to handle his patient's medical records in his clinic at home. The app has the ability to input patient's medical ...
2
votes
1answer
378 views

Is it safe to use LAST_INSERT_ID() in a system like Point of Sale

Is it safe to use LAST_INSERT_ID() in a system using MySQL like Point Of Sale when there are multiple users using the system at the same time?
1
vote
3answers
196 views

Help with DB Structure, vOD site

I have a video on demand style site that hosts series of videos under different modules. However with the way I have designed the database it is proving to be very slow. I have asked this question ...
6
votes
2answers
1k views

Making the switch from MySQL to PostgreSQL?

I've spent the last year becoming really comfortable with MySQL, but due to its increasing trendiness and my desire to homogenize my web-apps with Heroku, I'd like to start using PostgreSQL for my web ...
6
votes
3answers
213 views

What's the difference between the insert methods and why one is faster

I have insert 14.485 lines on MySQL like this: INSERT INTO `bairros` (`id`,`cidade_id`,`descricao`) VALUES (1,8891,'VILA PELICIARI'); INSERT INTO `bairros` (`id`,`cidade_id`,`descricao`) VALUES ...
1
vote
2answers
145 views

Using replacement to get possible outcomes to then search through HUGE amount of data

I have a database table holding 40 million records (table A). Each record has a string a user can search for. I also have a table with a list of character replacements (table B) i.e. i = Y, I = 1 ...
0
votes
2answers
412 views

1 to 1 Comparison and Ranking System

I'm looking to create a comparison and ranking system which allows users to view 2 items, click on the one that they feel is the better one and then get presented with 2 more random items and continue ...
0
votes
1answer
97 views

Identifying elements from data feeds generated by affiliate sites

I am working with data feeds from affiliate sites. The basic idea is to provide an interface where the user can paste a link to an XML datafeed (these are huge btw, around 60 mb) that would then be ...
2
votes
3answers
346 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 ...
10
votes
6answers
6k views

Is there any reason to use varchar over text columns in a database?

Is varchar just a remnant from before text came around, or are there use cases where you would want to use a varchar? (Or char for that matter..) (I use Postgres and MySQL (MyISAM) daily, so those ...
2
votes
6answers
1k views

Dynamic Fields/Columns

What is the best way to allow for dynamic fields/database columns? For example, let's say we have a payroll system that allows a user to create unique salary structures for each employee. How ...
2
votes
2answers
178 views

Better way to search for text in two columns

Here is the scenario. I am making a custom blogging software for my site. I am implementing a search feature. It's not very sophisticated - basically it just takes the search phrase entered and runs ...
0
votes
2answers
169 views

How should I handle using two databases with a legacy PHP application?

I have a legacy PHP application that was written in 2004 and uses MSSQL as a database backend. At this stage MSSQL is still supported by PHP but only just via a Microsoft driver. I have looked at ...
3
votes
2answers
3k views

Is a blob more efficient than a varchar for data that can be ANY size?

When setting up a database I want to use the most efficient data type for potentially fairly long data. Currently my project is to store song titles and thoughts pertaining to that song. Some titles ...
3
votes
4answers
379 views

Entity and pattern validation vs DB constraint

When it comes to performance: What is the better way to validate the user input? If you think about a phone number and you only want numbers in the database, but it could begin with a 0, so you will ...