I'm looking for a database that supports the following functionality:
1) Records in the database are like Python dictionaries or Perl hashes. For example, a "purchase" record might look like this:
<purchase 5436> = { product: "BMX Bike", price: 99.50, city: "Springfield" }
2) The records are stored in arrays of variable length. The database contains lots of these arrays. For example, the purchase table might look like this:
purchase array 1: [ <purchase 5436>, <purchase 54>, <purchase 112> ]
purchase array 2: [ <purchase 76>, <purchase 5984>, <purchase 1102>, <purchase 12> ]
...
purchase array 658: [ <purchase 10142>, <purchase 35>, <purchase 6458>, <purchase 23> ]
3) I want to be able to do two kinds of queries on this database:
3a) Count the # of records that match a various criteria. For example, how many purchase were made with a value over 50? I know of lots of databases that support this.
3b) Count the number of times records appear in a certain order. For example, how many arrays are there were a purchase over 50 was made and then a purchase in "Springfield" was made? I don't know what kind of database you would use to do this.
edit: Response to Steve Haigh: I should have mentioned that speed is important, and this database needs to support gigabytes of data. For example, there might be 1,000,000,000 purchase arrays, and I want to count how many of them have a purchase in "Springfield" followed by a purchase in "Hometown" (note that order is important). Maybe I'm wrong, but I think a relational DB would be too slow for this purpose.