database

Performing multiple database operations in a single REST call

I am trying to figure out the best way to call REST actions that perform multiple actions and multiple database updates from a single call. In my data model, I have Diners and LunchBoxes, and Foods. LunchBoxes are just many-to-many relationships between Diners and Foods, but with a count attribute that says how many of that type of f...

Potential pitfalls in using a JMS queue?

I've been asked to design and implement a system for receiving a high volume of automated sensor data from a large number of devices. This data will be produced at regular intervals and sent to the server as xml in an http post. The devices will keep resending the same data if they don't receive a specific acknowledgment from the server....

Referencing a control programatically with external source

Forgive me about the title, I have no idea what this is called. I have a MS Access database set up, with a Period field that has either values 1, 2, 3, 4 or 5. I retrieve these values using a database connection and I would like to reference a particular control based on what period was grabbed from the database. Here's example code, p...

What aspect of relational databases makes it difficult for them to scale sufficiently on services like Google App Engine?

Apparently the reason for the BigTable architecture has to do with the difficulty scaling relational databases when you're dealing with the massive number of servers that Google has to deal with. But technically speaking what exactly makes it difficult for relational databases to scale? In the enterprise data centers of large corporat...

ESENT table browser?

Hi, Has anyone had any experience with the Esent database engine? I've been taking a look at what it's used for, and am getting excited. Active Directory is implemented on top of an Indexed Sequential Access Method (ISAM) table manager, historically called "Jet." This same table manager is used by Exchange, File Replication service ...

Date split-up based on Fiscal Year

Hi, Given a From Date, To Date and a Fiscal Year system, I want to get all the split-up duration within the given From & To Date based on the Fiscal Year system. Explained below with examples: Example 1: Fiscal Year system: Apr to Mar From Date: Jan-05-2008 To Date: May-15-2008 Based on Fiscal Year system, duration should be splitte...

Which language to use for scripting PostgreSQL?

I am about to embark on a PostgreSQL project for a client. They want to develop a huge professional database with many complex joins, so after consideration I have chosen to go with PostgreSQL over MySQL. An important consideration is how to effectively interface to the database with scripts. Currently, the client uses about a million s...

How to reference a control from a module?

Forgive me about the title, I have no idea what this is called. I have a MS Access database set up, with a Period field that has either values 1, 2, 3, 4 or 5. I retrieve these values using a database connection and I would like to reference a particular control based on what period was grabbed from the database. Here's example code, p...

Ruby on Rails active record syntax to query status updates in a twitter style application

I have a twitter style application whereby a user follows many people. This is achieved using a self-referential association. This all works very nice but my brain has just gone dead while trying to figure out the active record syntax needed to list status updates (posts) from people the user follows ordered by time in a single query. ...

Do any databases support automatic/timed closing of databases?

We would like to implement an application architecture in which we have large numbers of databases on the disk, one database file for each customer. When a user request comes in the database is opened (if it isn't already). After a certain period of time with no activity, the database is closed automatically by the server, thereby free...

Is it safe to move a MySQL instance by copying the log file onto a snapshot?

My MySQL database is outgrowing the drive that it is one. I'm on EC2 so I can create snapshots easily. Therefore I propose the following process: prune the log files snapshot restore to a bigger volume at a new mount point stop the server copy the log files swap the drive mount points restart the server -- it should read from the binar...

data mapper vs active record

What are the advantages and disadvantages of both active record and data mapper? Please be PHP-specific, where the language matters. Personal experiences are welcome! Ideally with both. ...

SQL: Filtering data using a join is bad?

For example, I have the following tables: animal ----------------------- animal_id | animal_name ----------------------- owners ----------------------- owner_id | owner_name ----------------------- owners_animals -------------------- owner_id | animal_id -------------------- I want to find the animals with no owners so I do the quer...

NHibernate and SQLite exception

When i try to deploy mapped table into database with GenerateSchema..i get the exception: NHibernate.HibernateException: Could not create the driver from NHibernate.Driver.SQLiteDriver. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> NHibernate.HibernateException: The I...

Better performance or better structure

Better performance: list($result1,$result2,$result3,$result4)=get_all_result(); The number of total sql queries are fewer,and performance is a bit better.But it's hard to reuse. Better structure: $result1=module1_get_result(); $result2=module2_get_result(); $result3=module3_get_result(); $result4=module4_get_result(); It'll need m...

Google Contacts Address Book Schema - How to have 1 to many fields for data?

In Google Contacts, it seems that it allows you to many as many Email Address', Telephone numbers, Address', etc as you wish. You can simply keep clicking the add link to make as many fields as you want. This makes me curious on how this is made in a schema? ...

In which cases am I better using DBs like Couch or Mongo as opposed to traditional RDBMS

In which cases am I better using DBs like Couch or Mongo as opposed to traditional RDBMS. What is the problem they are suppose to solve (or solve more efficiently) then RDBMSs? ...

Is database normalization still necessary?

Is database normalization still "the thing?" When I studied databases course we were taught all levels of normalization and were said that we must always do it. Now, with all the NoSQL movement, it seems normalization is no longer the thing to do? Please share your thoughts! Thanks, Boda Cydo. ...

What exactly is NoSQL?

What exactly is NoSQL? Is it database systems that only work with {key:value} pairs? As far as I know MemCache is one of such database systems, am I right? What other popular NoSQL databases are there and where exactly are they useful? Thanks, Boda Cydo. ...

How should I query MySQL and how to cache the results from MySQL?

I have managed finally to get Solr working, with the help of all you guys, so THANK YOU! And I have to say, I now understand why you recommended it, it's really powerful. Now, to the issue... I have indexed all "Searchable" information into Solr, and my plan is to query Solr, and then get the ID:s of the query-results (of all records t...