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

learn more… | top users | synonyms (1)

15
votes
1answer
7k views

When should you use a document vs relational vs graph database? [closed]

For the purposes of discussion let's consider a FourSquare scenario. Scenario Entities: Users Places Relationships: Checkins: users <-> places, many to many Friends: users <-> users, ...
4
votes
3answers
9k views

Connecting mobile apps to a web service; What is it called and where do I start?

I have some basic knowledge of iOS development and I want to now start connecting my apps to databases hosted on the internet, so that users will have access to remote / public data that pertains to ...
6
votes
4answers
288 views

How do I link an domain object in memory to its database records without cluttering the domain with database concerns?

Your domain model contains a set of objects. I'm here presenting a side project, but I have a much more complicated work project falling to its knees because I didn't do a good separation of the ...
13
votes
5answers
1k views

Is it the job of programmers to design the database?

I've been a programmer for the past six years. Throughout my career, I have worked on many web applications. Most of the time, when a database was needed, it was given to us (the programmers) or we ...
6
votes
4answers
5k views

Handling database schema changes when pushing new versions

During times of heavy development, the database schema changes both rapidly and continuously, and by the time our weekly push to the beta build comes around, the schema has changed so much that the ...
5
votes
2answers
432 views

GIS-based data visualization and maintenance tool

Background Looking to leverage an existing GIS system for exploring organizational data. Architecture The following figure represents a high-level overview of the system's desired features: The ...
1
vote
1answer
766 views

Effective programming of data layer management/access

Short Version: What is the term/concept which describes the efficient design of programming the data layer for efficient data access and what are some sources/books/articles/website which discuss this ...
0
votes
1answer
1k views

Client/Server App – Best online data storage/administration/communication library?

I work on some iphone/android apps and the “data stored on a centralized server” pattern seem fairly common. So far, I have done one app like this, doing everything myself at a low level without ...
1
vote
4answers
993 views

Web application - database design/infrastructure

I have just begun development of a web application (that will be deployed using Google app engine), without going into the specifics, the web app will allow users to deploy a small website of their ...
2
votes
2answers
519 views

How would you transfer data between your data structures and databases?

I'm learning programming in school and I have this question that's bugging me about data structures and transferring the information stored inside them to databases. We're doing just small systems - ...
2
votes
4answers
1k views

At least one database view per database table-Is this good or bad design and why?

We are building a Windows Mobile based application to interface with a customer's existing web application. We are reading and writing data to the customer's SQL server 2008 database. The customer ...
5
votes
5answers
2k views

Structuring database for multi-object “activity” and “following” functionalities

I am working on a web application which operate with different types of objects such as user, profiles, pages etc. All objects have unique object_id. When objects interact it may produce "activity", ...
6
votes
3answers
3k views

NoSql databases - Decent tutorial/book that covers the concepts [closed]

Am looking for a good resource on learning the concepts behind NoSql databases. Most things I find are related to a specific technology (MongoDb, CouchDB etc) but I'm after all the concepts behind ...
4
votes
3answers
367 views

how to do database updates in each release

Our application uses database (mostly Oracle), and database is at the core. Each customer has its own database, with its own copy of application. Now with each new release of our product, we also need ...
5
votes
6answers
2k views

Database Table Prefixes

We're having a few discussions at work around the naming of our database tables. We're working on a large application with approx 100 database tables (ok, so it isn't that large), most of which can be ...
3
votes
1answer
101 views

Rpc transferring data or Replication

I have services on 10 machines that stores data in database on these machines. And I have main server that needs to pull that data from these ten machines. What is better for this. Implement some rpc ...
2
votes
1answer
319 views

Books or guides regarding secure key storage and database encryption [closed]

I have an idea for a SaaS product I want to create, however, this product will store extremely sensitive data that needs to be encrypted at rest. The trouble is not so much the encryption, but the ...
2
votes
5answers
4k views

An XML file or Database?

I am re-writing a section of my site and am trying to decide how much of a rewrite this will be. At the moment I have a web service feed that generates an xml once per day. I then use this xml file on ...
4
votes
2answers
762 views

Which is a better design pattern for a database wrapper: Save as you go or Save when you're done?

I know this is probably a bad way to ask this question. I was unable to find another question that addressed this. The full question is this: We're producing a wrapper for a database and have two ...
2
votes
2answers
374 views

Where should SQL/DB Queries be encapsulated in a software system?

I frequently write small applications (either web based or otherwise) that require heavy database usage. i've attempted various ways of handling where to put the actual sql queries (sort of ad-hoc ORM ...
4
votes
2answers
867 views

Storing data for use on Android and Windows Applications

I posted this last night on StackOverflow and was advised to move it over to StackExchange, thank you for taking a moment to look at my question. I'm developing a project proposal for my final year ...
3
votes
2answers
2k views

Rails and Mongoid best way to implement sharing system

I have to model User and Board in rails using mongoid as ODM. Each board is referenced to an user through a foreign key user_id and now I want to add the ability to share a board with other users. ...
1
vote
1answer
439 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 ...
2
votes
1answer
614 views

How to deal with transactions when creating a database connection for each query

In line with this post here I am going to change my website to create a connection per query to take advantage of .NET's connection pooling. With this in mind, I don't know how I should deal with ...
18
votes
2answers
17k 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 ...
1
vote
4answers
268 views

Is it better to use a Database or a data structure for network stack?

I've built a multi threaded messaging application in C and I'm currently using a MySQL Memory table to save the session ID, but I'm not sure whether this was a good decision or not. It works like ...
1
vote
1answer
254 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. ...
2
votes
4answers
2k views

Best approach for a database of long strings

I need to store questions and answers in a database. The questions will be one to two sentences, but the answers will be long, at least a paragraph, likely more. The only way I know about to do this ...
2
votes
6answers
3k views

How many indexes is too many indexes?

I have a table with about 37 indexes. Would that be considered too many? What are some best practices regarding indexing? EDIT: It is warehousing data, updated daily with new transactions. There are ...
1
vote
2answers
901 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
3answers
1k views

Should one use a separate database for application data and user data?

I’ve been working on a project for a little while and I’m unsure which is the better architecture. I’m interested in the consensus. The answer to me seems fairly obvious but something about it is ...
3
votes
7answers
5k 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 ...
2
votes
2answers
715 views

What's the best way to modularize a User schema so it's generic

I have a database design question. Basically I want to be able to create a schema for a User model, then use this User model in other models that extend User but I want to design it in such a way that ...
1
vote
3answers
289 views

Converting mysql and SQLServer tables quickly in an update utility

The requirements are to take an existing list of identical tables (AAA0001 - AAA9999) which generally don't meed our current requirements and need to be swapped out with three tables (XXX0001-XXX999, ...
5
votes
2answers
3k views

Models per database table?

I am using codeigniter, and have found myself in a similar situation where I have repeated Model methods. I am creating a Model per Controller. But I would creating a Model per database table be ...
0
votes
1answer
781 views

Caching Business Objects in MVC application

I figured this was more of an architectural question, so I chose to post it here rather than Stack Overflow. So I'm building an MVC web application and have just finished writing the code that wraps ...
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 ...
1
vote
2answers
190 views

Main class passes dbConn obj to all its services, I need to change the dbConn for one of its services. - suggestion for design pattern

There is this main class and there are several services ( which uses db connection to retrieve data ) These services are initialized in the main class db properties are obtained from the property ...
3
votes
2answers
184 views

Do Databases Optimize Queries with Sum/Average or Other Aggregates?

Imagine a database that has billions of rows with, say, payments. You need to calculate an average payment sum. That will be SELECT avg(amount) FROM payments; Now, if you need to re-calculate this ...
4
votes
2answers
896 views

Making sure database connection information is secured

This is the first time that I am working on a web application. I was going through the question What should every programmer know about web development? and noticed one thing that I knew nothing of: ...
11
votes
11answers
1k views

Is continuous creation and deletion of tables a sign of an architectural flaw?

Recently I had a discussion with a developer who mentioned that during program development, they routinely create and delete tables and columns on a regular basis while working on new features and ...
2
votes
1answer
288 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 ...
6
votes
2answers
396 views

What does this point about first normal form mean?

I'm reading the Wikipedia page on first normal form, and am confused about the last bullet point: 5) All columns are regular [i.e. rows have no hidden components such as row IDs, object IDs, or ...
8
votes
4answers
8k views

Business Objects within a Data Access Layer

So I've been creating a data access layer via TDD and have approached somewhat of a concern. I'd rather not start down the wrong path, so I figured I'd ask you guys to see if my thoughts were in line ...
2
votes
1answer
2k views

Object orientated data structures in database driven applications

I've started working for a company that maintains a small/medium sized commercial website. The website is written in c# asp.net, and uses SQL Server as a database. The structure of the code is very ...
2
votes
1answer
308 views

Calculate statistics for web application

I'm planning to add a couple of usage statistics to my web application. Some common things like: registered users, amount of comments/posts, etc. over time (last 24 hours / last week / last month / ...
0
votes
1answer
166 views

Recommendation for a database to query records with attributes that are arrays or hashes?

I'm building site with a very simple data structure: documents that are nodes that reference other nodes that each have arrays of parents, children and siblings, so the structure is: Node: uuid name ...
1
vote
5answers
493 views

Why is it evil to run selects from a prod server?

I'm basically looking for arguments to persuade the internal "consultants" at work as the following are not working: What happens if you do a Cartesian join and crash the server? You don't need to ...
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 ...
1
vote
2answers
154 views

Using a column to store the company or a separate database?

I am writing an system for the company to put their promotion material on the site, which is like some kinds of CMS. So, I need a database that store their data, but I am considering how to store ...