This tag is for general database questions; if you question is specific to SQL use that tag instead.

learn more… | top users | synonyms (1)

8
votes
4answers
489 views

Staying OO and Testable while working with a database

What are some OOP strategies for working with a database but keeping things unit testable? Say I have a User class and my production environment works against MySQL. I see a couple possible ...
35
votes
5answers
22k views

When would someone use MongoDB (or similar) over traditional RDMS?

Im a bit confused......the whole NoSQL and such. When would you choose to use something like MongoDB over something like Oracle or MYSQL? I dont really understand....the "difference" as far as usage ...
15
votes
2answers
11k views

Creating database connections - Do it once or for each query?

At the moment I create a database connection when my web page is first loaded. I then process the page and run any queries against that conection. Is this the best way to do it or should I be creating ...
13
votes
5answers
6k views

What is the difference between all-static-methods and applying a singleton pattern?

I am making a database to store information about the users of my website (I am using stuts2 and hence Java EE technology). For the database I'll be making a DBManager. Should I apply singleton ...
15
votes
7answers
975 views

Safely fixing production database data

Bugs happen and sometimes data has to be fixed in production. What is the safest way to go about this from a big company standpoint? Are there tools that can help? Here are some considerations driving ...
6
votes
5answers
980 views

How to decide between storage formats and what are example use cases for some of them?

We have different ways to store program data (save files in games, employee databases, program configuration etc.): Plain text (think .ini and .conf) XML Databases (MySQL, SQLite...) .zip and ...
13
votes
4answers
3k views

Achieving Zero Downtime Deployment

I am trying to achieve zero downtime deployments so I can deploy less during off hours and more during "slower" hours - or anytime, in theory. My current setup, somewhat simplified: Web Server A ...
17
votes
6answers
5k views

Should I use one database per application or share a single database amongst multiple applications [closed]

I have multiple applications some that use data from the same sources. Is it best practice (or what are the pros/cons) to: leave the data in databases shared by multiple applications saves space ...
15
votes
5answers
1k views

Databases and Unit/Integration Testing

I have had a discussion with someone about unit/integration testing with web applications and I have a disagreement about 1 core idea. The issues is that the person I am talking to think that the ...
5
votes
3answers
511 views

How do I determine which language/framework is best for our web-based project?

I'm in the early stages of development for a web application that has three developers (myself included) working on it. The project is, at its core, a web-based database that will be used by around ...
8
votes
11answers
16k views

Using XML as data storage

I was thinking about the XML format and the following quote: “XML is not a database. It was never meant to be a database. It is never going to be a database. Relational databases are proven ...
7
votes
3answers
1k 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
5answers
709 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 ...
114
votes
13answers
42k 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 ...
43
votes
12answers
3k views

Is it necessary to create a database with as few tables as possible

Should we create a database structure with a minimum number of tables? Should it be designed in a way that everything stays in one place or is it okay to have more tables? Will it in anyway affect ...
64
votes
2answers
2k views

How do software projects go over budget and under-deliver? [closed]

I've come across this story quite a few times here in the UK: NHS Computer System Summary: We're spunking £12 Billion on some health software with barely anything working. I was sitting the office ...
10
votes
4answers
2k views

Weaknesses with different types of NoSQL databases

Here's my question: What are the weaknesses with different types of NoSQL databases? Specifically, what're the weaknesses of key-value stores, graph data stores and document stores? I've had an easy ...
13
votes
3answers
6k views

Is there a list of common usernames to reserve in a new system?

I need to reserve usernames in my new website. These generally fall into three categories 1) usernames no-one should have (eg: admin, user, service, help, root, etc) 2) names of super famous people ...
8
votes
9answers
2k views

How much database access should developers have?

So I've worked in many different workplaces as a developer and my level of access to the database has been varied. I typically don't have production db access. Most of the time I have access to the ...
9
votes
2answers
1k views

How do you handle database change deployments?

We have been discussing database deployment techniques today, having had a couple of recent failures in our current process and having seen situations where we would like to roll back a deployment but ...
8
votes
6answers
7k 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 ...
4
votes
4answers
1k views

When is it necessary to use ORM tools?

I was raised in a part of web developmentland where the creation of websites is mostly synonymous with Wordpress, FTP, Joomla, and procedural code, instead of things like TDD, A/B testing, Doctrine, ...
9
votes
6answers
22k views

what do database programmers do?

Every time I read about Oracle programmers etc, I get confused. I don't know what exactly they do. From my understanding, application programmers need to develop the core functionality. The libraries ...
8
votes
5answers
2k views

Writing Web “server less” applications

TL;DR What are the prospects of writing applications which are completely based on a REST database server (CouchDB) and web applications which directly access the DB instead of having a web server in ...
8
votes
3answers
718 views

How to manage database schema changes in open source project releases

I manage an open source PHP/MySQL web application used by a few K-12 schools and some colleges. I'm also the project's only developer. While it used to be little more than a source download of an ...
12
votes
7answers
1k views

Why shouldn't you develop on production database? [duplicate]

I need help with organizing my arguments for why it's MADNESS to develop against production data. Backstory: I started working here six months ago and I noticed we're developing directly against ...
9
votes
8answers
446 views

Refactoring or upgrading databases to handle new features

Several responses to a database schema question, suggested an additional table to normalize a database for a feature that is not part of the current requirements (A UserDepartment table to allow for a ...
0
votes
1answer
393 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 ...
0
votes
3answers
324 views

database migration: upgrade schema deployed on client machines

I'm working on an application, which when deployed is installed locally on client machines, and uses a local database server. Stupidly, I didn't plan for schema changes -- and now it needs to change. ...
55
votes
12answers
36k 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 ...
48
votes
12answers
3k views

Database source control

Should database files(scripts etc.) be on source control? If so, what is the best method to keep it and update it there? Is there even a need for database files to be on source control since we can ...
26
votes
8answers
13k views

Create my own database system [closed]

I need to learn how databases work in order to use them more efficiently, and my way of learning is by doing. I want to create my own database system. I am not referring to creating a pseudo-database ...
7
votes
4answers
2k views

What are the differences between algorithms using data structures and algorithms using databases?

The General Question What are the differences between algorithms using data structures and algorithms using databases? Some Context This is a question that has been bugging me for some time, and I ...
36
votes
12answers
2k views

Should experienced programmers know database queries? [closed]

There are so many programmers out there who are also an expert at Query writing and Database design. Should this be a core requirement to be an expert programmer or software engineer? Though there ...
10
votes
22answers
6k views

Software Developer Interview Question - Fair or Unfair [closed]

I just phone interviewed with a company for a graduate software developer position and was asked the following questions. I should add that the company concerned are not a database vendor. How does ...
56
votes
6answers
3k views

Is this a ridiculous way to structure a DB schema, or am I completely missing something?

I have done a fair bit of work with relational databases, and think I understand the basic concepts of good schema design pretty well. I recently was tasked with taking over a project where the DB was ...
15
votes
9answers
2k views

Constraints in a relational databases - Why not remove them completely?

Is there any reason to build constraints between tables (inside SQLserver) nowadays? If so, when? Most applications in my area are built on object principles and tables are joined on demand. Demand ...
10
votes
3answers
770 views

How do I know my data is relational or object oriented in nature?

Just read these lines- If your data is object in nature, then use object stores ("NoSQL"). They'll be much faster than a relational database. If your data is relational in nature, the ...
9
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 ...
8
votes
6answers
3k views

HTTP Session or Database approach

I am confused a little as what should be my approach, Working on a design of shopping cart and i need to store shopping cart either in session or in database but not sure which approach would be ...
7
votes
3answers
7k views

Why to use web services instead of direct access to a relational database for an android app?

I searched on the web how to access in an efficient manner to a central database at a remote location and I met suggestions to use web services instead direct access (i.e. JDBC etc ) to a database.I ...
7
votes
5answers
851 views

How do you off load work from the database?

In at least the web development field, web servers are everywhere but are backed by very few database servers. As web servers get hit with requests they execute large queries on the database, putting ...
15
votes
6answers
730 views

What do DBAs do?

Yes, I know they administrate databases. I asked this question because I'd like to get a further insight into the kind of day-to-day duties a DBA might perform, and the real-world business problems ...
14
votes
5answers
656 views

Is having functionality in DB a road block to scalability?

I may not be able to give the right title to the question. But here it is, We are developing financial portal for wealth management. We are expecting over 10000 clients to use the application. The ...
11
votes
3answers
1k views

How to create better OO code in a relational database driven application where the database is poorly designed

I am writing a Java web application that consists mainly of a bunch of similar pages in which every page has several tables and a filter that applies to those tables. The data on these tables comes ...
11
votes
10answers
906 views

How could RDBMSes be considered a fad?

Completing my Computing A-level in 2003 and getting a degree in Computing in 2007, and learning my trade in a company with a lot of SQL usage, I was brought up on the idea of Relational Databases ...
9
votes
4answers
827 views

Benchmarking databases

I see lots of discussions flying around about performance of db 'x' or that moving from 'x' to 'y' improved our site performance. I'm yet to see proper benchmarking that works across different types ...
7
votes
1answer
373 views

When allowing a user to change passwords, should I generate a new salt?

In my database, I have a column for the hashed password and the salt. My application allows users to change their password. Should I use the same salt for the password, or should I generate a new ...
7
votes
3answers
2k views

Should I use a config file or database for storing business rules?

I have recently been reading The Pragmatic Programmer which states that: Details mess up our pristine code—especially if they change frequently. Every time we have to go in and change the code to ...