0
votes
4answers
126 views

MySQL Database design - Opinions

Im working on a web Application for our bussiness with my brother. Our application its pretty simple, will be develop with php and mysql. Clients and providers ABMs Articles Inventory (we do not ...
0
votes
1answer
42 views

Should I persist notification before or after publishing it through Redis pub/sub?

I'm implementing a mechanism to notify a group of users about newly inserted blog comments. The architecture uses the Redis Pub/Sub mechanism. By definition, the pub/sub mechanism aims to propagate ...
0
votes
0answers
21 views

What are the memory-management capabilities of MySQL + JDBC (in light of autonomic computing)?

I'm interested in implementing some kind of autonomic-computing functionality using MySQL. By autonomic-computing I mean roughly some failsafe abilities, whereby the application appears to be at least ...
0
votes
1answer
115 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 ...
27
votes
4answers
4k views

Is backing up a MySQL database in Git a good idea?

I am trying to improve the backup situation for my application. I have a Django application and MySQL database. I read an article suggesting backing up the database in Git. On the one hand I like ...
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 ...
0
votes
1answer
185 views

Why doesn't MySQL have an explicit “No Limit” option for queries?

I use SQLyog Community edition and like many other SQL applications out there it puts a 1000 result limit on queries that do not have a limit provided. I am wondering why MySQL doesn't have an ...
0
votes
1answer
65 views

DB Design: How to link a single column to a collection of entities

I have a db design question that I am sure has been quite extensively covered but I cannot find a good answer already. The problem is how to efficiently link a single school course to a collection ...
0
votes
2answers
146 views

Examples of designing a database that handles point tracking?

I'm attempting to expand my knowledge of how database designs and concepts work. I'm working on a hobby web/mobile app for practice that will challenge me. However, I am running into an issue. What ...
0
votes
1answer
96 views

Database design grouping many tables with their common fields [closed]

Is this a valid DB design? A user can create an organization, link as many offices to it, have an inventories that host items linked to organization or office, have clients for his business etc. | ...
1
vote
3answers
97 views

Select custom output formats from database with SQL

I am planning to make a simple rest service application, and I am currently deciding the architecture. I have decided that I want to write the middle layer in multiple languages, so that it is easy to ...
4
votes
3answers
225 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 ...
0
votes
2answers
333 views

How do programs like JAVA and C++ store variables in a database , does it still use MySQL like in PHP? [closed]

I imagine they have to have some sort of query to goes to a database , or maybe I'm wrong and they can just store it to their computer? Is MySQL for server - side scripting only?
0
votes
2answers
57 views

Store the result of a complex but frequent database query, in another temp persisting table

I have a slightly complex SELECT query which uses a number of JOINs and variables inside it and the query is run frequently throughout the application. The result varies when one column is updated. ...
3
votes
3answers
391 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 ...
0
votes
1answer
107 views

Comment system sorting madness

I have a website in which I'm loading all of the users' comments by the number of likes they have. This has caused me some troubles. Let's say comment #1 has 5 likes, comment #2 has 2 likes, and the ...
3
votes
4answers
471 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
3answers
496 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 ...
0
votes
1answer
107 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 ...
3
votes
1answer
180 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
0answers
136 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
112 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 ...
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 ...
2
votes
1answer
135 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 = ...
0
votes
1answer
188 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 ...
7
votes
2answers
2k 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 ...
1
vote
2answers
453 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
vote
1answer
434 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 ...
111
votes
13answers
40k 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 ...
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 ...
2
votes
1answer
410 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 ...
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 ...
2
votes
1answer
245 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. ...
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 ...
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 ...
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 ...
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 ...
1
vote
1answer
379 views

choosing Database and Its Design for Rails

I am having a difficulty in deciding the database & its structure. Let us say the problem is like this. For my product I have various customers( each is an educational institute) Each customer ...
1
vote
1answer
188 views

Data base structure of a subscriber list

I am building a application that allow different user to store the subscriber information To store the subscriber information , the user first create a list For each list, there is a ListID. ...
1
vote
2answers
655 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 ...
3
votes
7answers
4k views

What is the best approach for database design with lots of columns?

I am writing a query based financial application. It lets the user to write complicated equations (much like WHERE part of an SQL query) and find companies matching those criteria. For the above, I ...
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 ...
2
votes
1answer
251 views

How to swap out a DB from MySQL to SQL Server in a multiple large projects?

Is there a sane way / best practices way to swap out a DB from MySQL to SQL Server in a multiple large projects? Some of the projects are ASP projects, some of them are windows services, some are ...
7
votes
5answers
2k views

Is MySQL viable for small-medium business applications

After having worked with a Microsoft stack - VB.Net, ASP.Net, SQL Server - for the past 10 years, we are now faced with having to develop an application for both Windows and Mac environments. It has ...
4
votes
1answer
320 views

Technique for multiple users on same datasets

This is more a learning question than coding, but I'm certain it's a common issue for anyone developing administration systems or applications in php/mysql/js etc. I've developed quite a complex ...
0
votes
2answers
466 views

How to store personal information properly?

It's not about security or something. There is a table to record user information, like username, password, postcode and so on, one record per person. There is also a table called post to record the ...
1
vote
2answers
377 views

Database design

I'm on the way developing an application which requires a kind of dynamic database, So this is what I want, This is the for reading the details of a class, the number of variables and methods ...
6
votes
2answers
3k views

What's the difference between MariaDB and MySQL?

What's the difference between MariaDB and MySQL? I'm not very familiar with both. I'm primarily a front end developer for the most part. Are they syntactically similar? Where do these two query ...