Tag Info

Hot answers tagged

5

Welcome to database hell! NoSQL is often championed as a solution to these types of applications. However, your problem here is clearly that the programmers have no idea what they are doing. Furthermore, it looks like your management is afraid of change, or unwilling to take the hard decisions which you correctly list and which are likely to fix the root ...


4

As you have multiple rows inside the JSON column, you need a function that returns a set. This can be done using the json_to_recordset() function: select j.* from json_test, json_to_recordset(json_data) as j(name text, country text, hobby text, address text, sex text); Because this is an anonymous record type, you must explicitly define each column. ...


4

Despite the mainstream of noSQL databases IMHO the decision about adopting such technology should be made according to the achievements needed according to the information stored, not only attending to the performance you currently have. This means that maybe your best option is to stick to the SQL database and improve your HW. But additionally I read ...


3

There are a couple of concepts which need to be distinguished. One is about structure and the other about schema. Structured data is one where the application knows in advance the meaning of each byte it receives. A good example is measurements from a sensor. In contrast a Twitter stream is unstructured. Schema is about how much of the structure is ...


3

[EDIT - added several public dataset sites]. First off, there is no real evidence that NoSQL databases are "better" at handling large datasets than traditional (OldSQL) RDBMSs. Check out Ted Dziuba's article about how he can't wait for NoSQL to die. He makes the point that Walmart continue to use RDBMSs - and they're not a small company! He says that NoSQL ...


2

For your use case of key-value data, where the value is simple, MongoDB is more than you need. It is a document-oriented data store for complex value types. A specific key-value store would suit your needs. RIAK is the one I've looked at though several others exist. Since your retrieval will be by time range i.e. key range, Elastic's full-text ...


2

My largest obstacle right now with Cassandra are the no-join, no order by (since everything is ordered by key for you), and mass update. If your current data structure depends on joins (or aggregation) to pull off the queries you need you won't find a nosql option that includes these. You do have some options: Consider reviewing your current data ...


2

Although Cassandra allows the definition of "columns" within a "table", these are much less strict than a relational database schema. As it says here different rows in the same column family do not have to share the same set of columns, and a column may be added to one or multiple rows at any time. In this world, the new value is only added to the ...


2

SQL Server has Change Data Capture in it's Enterprise edition. From msdn link to information: Change data capture records insert, update, and delete activity that is applied to a SQL Server table. This makes the details of the changes available in an easily consumed relational format. Column information and the metadata that is required to apply ...


2

Reasons for unexpected data growth of data files. "Data fragmentation" and data file preallocation When a document is deleted, it's space is used right away if the new document fits into that space. Let's say you delete a document which takes 1kb of disk space and a new document requiring 0.9 Kb of disk space is synced to disk, then the first free space ...


1

Would I loose that data, or not ? Good question! As outlined in the DataStax documentation section on The Write Path To Compaction, you would not lose data. As you can see, when Cassandra processes a write operation, data is written to both the commit log (on-disk) and to the memtable (which you referred to). In case of a "plug out of the wall" ...


1

In Cassandra, as far as I know, for SELECT filtered by non-key attributes, you only have three options: (1) Application side filtering. That is, if you get your results from a CQL SELECT, use your application to filter the results. For all but the smallest data sets, this is ill-advised. (2) Bite the bullet, and create those secondary indices. (3) ...


1

Try this link https://cloud.google.com/appengine/docs/php/storage . This should get you started on the use and main concepts. FYI joins are not applicable to the datastore but if you model out your data correctly you should have no problem.


1

For mongo shell sessions there is a concept of mongorc files which include JavaScript to execute when the mongo shell starts. You can use this feature to extend or customise the behaviour of the interactive shell. If you want secondary reads to be allowed by default for all shell sessions you can either: add the rs.slaveOk() command to the .mongorc.js in ...


1

JShean, I am with the MarkLogic product team, I saw your question and wanted to point you to some information. In general, mlcp is the most efficient way to load documents into MarkLogic, though I know many customers don't like dumping all the data to disk. Have you considered doing the process in batch - dump a certain set to disk, use mlcp to load and ...


1

All things being equal, it is logical to assume that better hardware = better performance. However, computers are strange beasts - I know that with Oracle, if you assign very large sizes (you need good hardware) to certain caches, you can actually slow down the machine. The only real suggestion that I have is that you test, test and test again. You cannot ...


1

In your question you are using "SQL" and "relational" to mean the same thing. In the same way you can think of "NoSQL" as meaning "not relational" i.e. there is no primary key / foreign key concept; there is no "normalisation" enforced or implied; there is no real meaning of the words "table" or "column". To a key-value store all it knows about is a big ...


1

Someone make this bench: http://mimdl.tumblr.com/post/115308901909/benchmarking-handlersocket-mysql-innodb-memcached Get Operation with HandlerSocket was completed in 1.20499610901 Sec, i.e; making 8,299 QPS (Queries per second) Get Operation with InnoDB Memcached Plugin was completed in .93115 seconds i.e; making 10,739 QPS Select Query for MySQL took ...


1

Many NoSQL products have sharding built-in. The DBMS itself looks after storing a particular key range on a certain server and keeping redundant copies for high availability. Client connections are routed within the DBMS rather than in the application. Multi-server scale out becomes easy, at the cost of CAP compromises.


1

I can't test this at the moment, but that's the basic format. You should change your date data type to ISO so it works easily with the below code: var lastWeek = new Date(); lastWeek.setDate(lastWeek.getDate() -7); db.messages.find({ "rep_header.share_date_2.$date": { $gte: lastWeek} } } );


1

You can get the 2-way Sync feature using Couchbase Mobile (client-side) solution and on the backend using Couchbase Server Can check out an example on this blog post


1

Just execute on shell "use dbname" When you insert the first document on any collection you will see the db with "show dbs"


1

Using an RDBMS is fine, but the sticky part is how to store the parameters needed to render each type of question. I would caution against having separate table definitions (or lots of type-specific columns) for each type of question. While these details (such as the list choices for a multiple-choice question) can be seen through a relational lens, it ...


1

The problem (from what I can see) From what I can see from your output, you have a monotonically increasing shard key like ObjectId or a Date or something similar. MongoDB sharding is done with key ranges over the selected shard key. Put simply, it works like "shard0000 is supposed to hold the rang from -infinity to $i, shard0001 the keys from $h to $p and ...


1

In Cassandra you need to take a query-based modeling approach. In your case, I would create a similarly-structured query table like this: CREATE TABLE topicbyuser ( topic_id text, user_id text, event_time timestamp, data text, PRIMARY KEY (user_id,event_time), ) WITH CLUSTERING ORDER BY (event_time DESC); And then, if you wanted to ...


1

As NoSQL databases typically do not support joins, they expect you to store the data in de-normalized form. (So, throw the codd normalization rule book away. Just kidding). In this case, the thrid table better have the values duplicated something like (orderid, ordertime, [itemnames], waitername, orderserviced yes/no, servicetime, ...). itemnames can be a ...


1

You can also set the bin to null to delete it. http://www.aerospike.com/docs/client/java/usage/kvs/write.html#delete-a-bin


1

Neo4j is a schema-optional graph database. You could choose to enforce a full schema and reap the benefits.



Only top voted, non community-wiki answers of a minimum length are eligible