key-value

how to store data with many categories and many properties efficiently?

We have a large number of data in many categories with many properties, e.g. category 1: Book properties: BookID, BookName, BookType, BookAuthor, BookPrice category 2: Fruit properties: FruitID, FruitName, FruitShape, FruitColor, FruitPrice We have many categories like book and fruit. Obviously we can create many tables for them (M...

MYSQL KEY-VALUE PAIR Viability

Hi, I am new to mysql and I am looking for some answers to the follwoing questions: a) Can mysql community server can be leveraged for a key-value pair type database.?? b) Which mysql engine is best suited for a key-value pair type database ?? c) Is Mysql cluster a must for horizontal scaling of key-value based datastore or can i...

Suggest Cassandra data model for an existing schema

Hello guys! I hope there's someone who can help me suggest a suitable data model to be implemented using nosql database Apache Cassandra. More of than I need it to work under high loads and large amounts of data. Simplified I have 3 types of objects: Product Tag ProductTag Product: key - string key name - string .... - some other...

Performance for myCollection.Add() vs. myCollection["key"]

When dealing with a collection of key/value pairs is there any difference between using its Add() method and directly assigning it? For example, a HtmlGenericControl will have an Attributes Collection: var anchor = new HtmlGenericControl("a"); // These both work: anchor.Attributes.Add("class", "xyz"); anchor.Attributes["class"] = "xyz...

.NET - getting form field key/value pairs?

Hi there, I've got a form with textboxes and I want to run some server side validation code on the values after the form is submitted. I was planning to grab all the textbox controls on the page and adding them to a list, then running a for each loop that says for each control in the list query the database where fieldValidation.Name = C...

How can I get a value from an xml key/value pair with xpath in my xslt?

I have some xml that I want to process using xslt. A good amount of the data comes through in key value pairs (see below). I am struggling with how to extract the value base on the key into a variable. I would like to be able to do something like this: <xsl:variable name="foo" select="/root/entry[key = 'foo']/value"/> but that does...

What mail storage should I choose for our web application; IMAP, key-valud store, rdbms, ...

I have to store e-mail messages for use with our application. I have "metadata" for all messages inside a relational database, but I don't feel comfortable keeping message content (gigabytes and terabytes of email data) inside a database. I'm currently using IMAP as a storage, but I have my doubts if I choose correctly. First of all ther...

Are batch mutations atomic in Cassandra?

The Cassandra API supports batch mutations: batch_mutate(keyspace, mutation_map, consistency_level): Executes the specified mutations on the keyspace. mutation_map is a map>>; the outer map maps the key to the inner map, which maps the column family to the Mutation; can be read as: map>>. To be more specific, the outer ...

Interesting AS3 hash situation. Is it really using strict equality as the documentation says?

AS3 Code: import flash.utils.Dictionary; var num1:Number = Number.NaN; var num2:Number = Math.sqrt(-1); var dic:Dictionary = new Dictionary( true ); trace(num1); //NaN trace(num2); //NaN dic[num1] = "A"; trace( num1 == num2 ); //false trace( num1 === num2 ); //false trace( dic[num1] ); //A trace( dic[num2] ); //A Concerning the key co...

php compare array keys, not values

I am successfully using the array_key_exists(), as described by php.net Example: <?php $search_array = array('first' => 1, 'second' => 4); if (array_key_exists('first', $search_array)) { echo "The 'first' element is in the array"; } ?> But, take out the values, and it doesn't work. <?php $search_array = array('first', 'second'...

memcache won't store key/value because the value is too big.

cache.set(key, Biglist, 3600) print cache.get(key) When my "Biglist" is a huge list of lots of content, it doesn't seem to store. But when I change it to small text like "abc", it stores. What do I have to configure so that I can set my memcache to accept unlimited size of key/value? ...

Converting a hardcoded switch statement into a dynamically loaded many-keys-one-value lookup

What is a good collection/container to use for basically storing the contents of a switch-statement with multiple fallthrough situations? I guess, a more accurate way is, what's a good C# solution for a "many-keys-one-value" lookup? I checked through the System.Collections namespace and its associated namespaces, but didn't find anything...

With modern social networking and scaling, can Cassandra replace the standard relational database such as MySQL?

Is it possible to build the entire social networking application on cassandra? Sure, it takes longer to set up, but it scales much better. Correct? Please list the situations when Cassandra should be used. ...

"2d Search" in Solr or how to get the best item of the multivalued field 'items'?

The title is a bit awkward but I couldn't found a better one. My problem is as follows: I have several users stored as documents and I am storing several key-value-pairs or items (which have an id) for each document. Now, if I apply highlighting with hl.snippets=5 I can get the first 5 items. But every user could have several hundreds i...

MySQL query against pseudo-key-value pair data in WordPress custom query

I'm writing a custom WordPress query to use some of the data which the Woothemes Diarise theme creates. Diarise is an event planner theme with calendar blah, blah... and uses custom fields to store the event start and end dates in WP custom fields in the *wp_postmeta* table, which implements a key-value store. So for each post in the "ev...

Large PHP arrays or MySQL temporary memory tables?

How would you temporarily store several thousands of key => value or key => array pairs within a single process. Lookups on key will be done continuously within the process, and the data is discarded when the process ends. Should i use arrays? temporary MySQL tables? Or something in between? ...

What is the way to maintain database indexes in files

I'm writting key-value storage for milions of documents - for study and fun. I added default b-tree indexing on key but of course there is no way to load all indexes to memory. For now storage have two types of files data (not ordered key-value records) and index (no efficient conception for search, adding and deleting). In b-tree obje...

Fastest and most efficent way of seaching a key-value pair in Java?

DISCLAIMER: THIS QUESTION WAS NOT MEANT TO BE ARGUMENTATIVE!!!!!!! What is fastest and less memory draining way of searching a key-value pair? I will be storing items in a key-value like relation and I need to access them quickly. Should I use a SQLite database? A Map? A Hashtable? A HashMap? Please give some advantages/disadvantages ...

Java - How to create new Entry (key ,value)

I'd like to create new item that similarly to Util.Map.Entry i.e. that will already contain the structure key,value The problem is that I can't use Map.Entry itself because apperently it's a read-only object that I can't instanciate new instance of it. Does anyone know how to create new generic key/value object? ...

C++ in-memory Key-Value stores

I'm looking for suggestions regarding in-memory key-value store engines or libraries, that have C++ interfaces or that are written in C++. I'm looking for solutions that can scale without any problems to about 100mill key-value pairs and that are compatible/compilable on linux and win32/64 ...