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

learn more… | top users | synonyms

3
votes
4answers
287 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
450 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
418 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
855 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
334 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
408 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
461 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
653 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
322 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
5k 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 ...
2
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
625 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
244 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 ...
-2
votes
1answer
1k views

How to check for null in most sql's - “column is null” or “column = null” [closed]

I'm not sure of the right syntax to use. Is it select * from tlb where flag is NULL or select * from tlb where flag = NULL Is the answer the same for oracle, sqlserver and Postgres? Note: I ...
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
349 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
724 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
365 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
405 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
343 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 ...
8
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
167 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
368 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 ...
14
votes
3answers
6k views

How to design highly scalable web services in Java?

I am creating some Web Services that would have 2000 concurrent users. The services are offered for free and are hence expected to get a large user base. In the future it may be required to scale up ...
1
vote
3answers
1k views

What is the main difference between HAS_MANY and BELONGS TO relationship in mysql?

After making little progress in web development and php I figured out if I can make my grip strong on database designing, I will be able to reduce much code and time in developing the application. But ...
1
vote
3answers
679 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 ...
12
votes
2answers
432 views

How to temporarily save the result of the query, to use in another?

I have this problem I think you may help me with. P.S. I'm not sure how to call this, so if anyone finds a more appropriate title, please do edit. Background I'm making this application for ...
1
vote
2answers
420 views

Almost Realtime Data and Web application

I have a computer that is recording 100 different data points into an OPC server. I've written a simple OPC client that can read all of this data. I have a front-end website on a different network ...
0
votes
2answers
507 views

How to store cache?

The data in my website is stored in many different tables(friends,relatives,etc) and every-time I have to query each and every table. But all this data is subject centric. E.g. data for a person is of ...
53
votes
12answers
31k 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 ...
5
votes
2answers
378 views

When should I start the server side coding?

I am creating a website, where users can upload their own videos. So far I am just building the main structure with HTML and CSS. Is it a better practice to write server-side code before the site ...
0
votes
2answers
558 views

Wildcard user in select statement on indexed varcharcolumn

This question is based on some testing I've done recently in order to better understand SQL indexing system. Table with 500k entries, InnoDB engine This is a simple select query on a varchar field. ...
3
votes
1answer
370 views

Voting System like Stack Exchange

I am trying to create a voting system like Stack Exchange. Should I create a table and insert values like following and then sum up the "vote" or there are some better ways to do this? Table name: ...
0
votes
1answer
177 views

mysql fulltext search table design

I have been working on a Mysql db design which keyword based search seems to be necessary. Main table has two columns: id | Title For each entry, users will be required to enter 4 or 5 keywords. I ...
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 ...