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

learn more… | top users | synonyms

3
votes
4answers
682 views

When should a database table use timestamps?

First a note, I thought maybe this question belonged in the database exchange, but I think it is more broadly related to a programming solution as a whole than to databases. Will move to database ...
0
votes
0answers
34 views

MySQL left join + performance

SELECT * #Case 1 cp.* #Case 2 FROM crawl_page AS cp LEFT JOIN artist AS a ON cp.cpURL LIKE ...
-1
votes
2answers
142 views

How to fit requirements into MVC

Let's say we have a website requirement to allow User functionality. Simple! We create the UserModel, UserController and UserView. Works perfectly. However, let's assume that User has a many-to-one ...
0
votes
1answer
867 views

MySQL PHP User/Group Permissions

I am trying to configure a mysql database table that I can use as a per user/group permissions table. Almost like what Facebook has, for a local company intranet site. What is the best possible way ...
0
votes
1answer
1k 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 ...
0
votes
3answers
618 views

Unique and primary keys on a database (mysql)

I'm having quite some doubts here... If I have a table related to username/password login how can I assure there won't be any more matches of the same username and password in the same table using ...
10
votes
1answer
325 views

Preferring Database Normalization vs. Schema Transparency?

A new requirement has surfaced on an old codebase, that basically enables direct (internal) communication between two formerly not-directly related classes of users (stored in different tables with ...
2
votes
2answers
403 views

How do MySQL joins really work?

In my case joining table inside subquery or outside subquery gives very few difference with COUNT CASE 1: about 6202 rows. In this case table_c is joined inside subquery, but is only joined (No ...
1
vote
1answer
220 views

Text conversion - Javascript before saving to db, or php when retrieving?

Long story short, I have a social networking site I wrote a while back as a "proof of concept" to myself that I had the skills to do it. I decided to revisit it, and "improve" a lot of the bad ...
0
votes
1answer
123 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 ...
0
votes
0answers
89 views

Searching in a large dataset

I am working on a model of social interactions in mice. I have mice and boxes and a simulation that outputs which mouse stays in which box during which time period. The problem is how to obtain, in ...
1
vote
2answers
468 views

Design pattern to handle queries using multiple models

I am presented with a dilemma while trying to re-designing the class structure for my PHP/MySQL application to make it more elegant and conform it to the SOLID principle. The problem goes like this: ...
1
vote
1answer
869 views

Java Desktop Application For Network users [closed]

I'm developing a desktop application using Java. My application will run in a network environment where multiple users will access the same database through the application. There will be basic CRUD ...
3
votes
1answer
182 views

Best way to rename existing unique field names in database?

I have a database table that contains id, filename, userId id is unique identifier filename should also be unique table may contain >10000 records When a user uploads a file it should be ...
0
votes
1answer
829 views

I need to create an employee schedule/appointments program, but I don't know how to set it up [closed]

I work for a gym. I am the programmer, its just me, nobody else! Gets really frustrating when there's nobody to bounce conceptual ideas off of. I'm getting rid of our archaic paper binder systems for ...
3
votes
1answer
180 views

At what point does caching become necessary for a web application?

I'm considering the architecture for a web application. It's going to be a single page application that updates itself whenever the user selects different information on several forms that are ...
0
votes
1answer
139 views

How should I evaluate the Database Solution for Large Data Application

Background I have been tasked to write an application that will be a combination of document and inventory management in VB.net which will be used to store document images in TIFF, PDF, XPS, TXT, DOC, ...
1
vote
1answer
156 views

Store data for multiple User Type

I am developing an app where four types of user share same module. So is it a good idea to create: one table and user_type and user_id (something like that) table prefixes basically 4 diff tables of ...
0
votes
1answer
151 views

What is the disadvantage of using abstract class as a database connectivity in zend framework 2 instead of service locator

If I use database by creating adapter with drivers, initialize it in some abstract class and extend that abstract class to required model. Then use simple query statement. Like this: namespace ...
3
votes
2answers
117 views

Handling changes to data types and entries in a database migration

I'm fully redesigning a site that indexes a number of articles with basic search functionality. The previous site was written about a decade ago, and I'm salvaging about 30,000 entries with data ...
11
votes
5answers
826 views

What Do I Need To Know About Servers In a Web Development Role? [closed]

I know that may sound a little vague, so I'll try and explain a little further... After being self employed developer for many years I'm now in search of a commercial web developer role. My only ...
-3
votes
1answer
775 views

What is the Meaning of Return False in a Php Function

i wanted to know what is the meaning of return False in an function. go Through this function: function reset_password($password,$user_id) { $sql="UPDATE user SET password='$password' WHERE ...
0
votes
2answers
685 views

More efficient way to paginate search results

I'm making a website in PHP where the user can search a big MySQL database. The user is shown the first result. I want the next button to take the user to the next result, and so on. The trivial ...
0
votes
3answers
493 views

What's best practice for a SELECT * FROM SQL in PHP? [closed]

I need to make a "SELECT * FROM" Sql from PHP, that now returns about 10.000 records, that I insert in an Array and re-utilize in a page to show results in a table. I need to have all that elements ...
1
vote
2answers
2k views

Using Autoincrement Primary keys as Foreign Keys

When creating a table, there is an option for us to set the numeric primary key as autoincrement where it's value increases whenever a new data in inserted. This primary number can be used for ...
1
vote
2answers
499 views

Importance of stored procedures and triggers in building web applications? [duplicate]

Almost in every interview for the position of web developer, they ask about stored procedures and triggers well I am aware from their definition and basic usage but the truths is I have never used any ...
2
votes
1answer
136 views

Incremental seek on MySQL result

When outputting data in a large file, I try to make it a habit to incrementally output data in chunks, to prevent reading the entire large file into memory. As an example to show what I mean: $fp = ...
2
votes
3answers
646 views

Is it safe to just use MySQLi?

I have developed an open source PHP application and currently it uses both the MySQLi or MySQL extension for backwards compatibility. I'm wondering about switching it over to only be compatible with ...
1
vote
3answers
596 views

How will I restrict the number of users logged in based on session?

I have a software (in cloud) with so many registered users. I want to restrict the number of users logged in at a time to certain number (configuration based, let's say 100). If the 101 user tries ...
2
votes
1answer
216 views

Multi-Thread Return Single SQL Result

I am having some difficulty with MySQL and returning a unique row to a thread. I want it so the thread will search for a row from the table where the bit (see below) is false and only one row is ...
1
vote
2answers
150 views

Self reference using a new table vs concatenated list of ids

At my current workplace there is a common pattern in database design: they don't use foreign keys but they list all corresponding ids in a column like this: some_table id name image_ids 1 a ...
1
vote
1answer
449 views

Combine Data from Two Tables-Help Needed

I have developed a web site with a mysql backend, but am not satisfied with how I am getting one set of data and do not know how to get another dataset. The page in question is at: ...
0
votes
1answer
361 views

Are there any SQL servers that support compiled queries?

Can SQL queries be compiled into byte code or equivalent to enhance performance? I know that most database servers support prepared statements, but is that the same thing as compiling? Most ...
1
vote
1answer
146 views

How to maximise the features of MySQL when used with php

I asked this question a while back on SO (http://stackoverflow.com/questions/15506040/maximising-the-features-of-php-and-mysql-when-used-together) but it's a recurring topic, so I thought I'd ask in a ...
2
votes
3answers
693 views

High traffic chat - how to check if there is new message and show it for all users

I already had question about this but obviously it was not accepted very well, apparently too long when it's actually more information so you could have given me better answer. Ok, I will be much ...
0
votes
1answer
210 views

how do design the database tables for file download statistics

I have the web application where i am serving file downloads in php. All is working fine and i have the download column in file field where i increment it. But i want to have full statictics of ...
8
votes
2answers
3k views

Data Synchronization in mobile apps - multiple devices, multiple users

I'm looking into building my first mobile app. One of the core features of the application is that multiple devices/users will have access to the same data -- and all of them will have CRUD rights. I ...
10
votes
7answers
410 views

When to start thinking about scalability? [closed]

I'm having a funny but also terrible problem. I'm about to launch a new (iPhone) app. It's a turn-based multiplayer game running on my own custom backend. But I'm afraid to launch. For some reason, I ...
2
votes
3answers
640 views

Defining work days and work time

I'm working on development of SMS parking software, and I'm stuck at one point for a month... I need to implement periods of payment (or work time, of a work day, if you will). Here's the problem: ...
3
votes
2answers
330 views

Displaying items with a countdown timer

I am creating a widget for rotating topics. The functionality is as follows: Each topic is displayed one by one on the homepage and has a duration of 30 seconds. A countdown timer is displayed on ...
1
vote
2answers
485 views

Implementing search over large data set, PHP or Mysql stored procedure?

I'm building an Online Food Ordering System with PHP and MYSQL, One of the feature of the application is to allow users to search for the restaurants by typing the area name. I would like to know ...
-1
votes
1answer
141 views

write my own or choose a framework for link sharing website [closed]

I'm a PHP programmer and I've done any projects based on PHP and MySQL without using any framework so far. Now I'm going to create a big link sharing system (excel-able,modular,fast,theme ...
1
vote
1answer
570 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
119 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
1k 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
440 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
231 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
448 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
547 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
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 ...