concept user in category nosql

This is an excerpt from Manning's book MongoDB in Action, Second Edition: Covers MongoDB version 3.0.
1When we mention normalization we’re usually talking about reducing redundancy when you store data. For example, in a SQL database you can split parts of your data, such as users and orders, into their own tables to reduce redundant storage of usernames.
$ irb -r ./connect.rb irb(main):017:0> id = $users.insert_one({"last_name" => "mtsouk"}) => #<Mongo::Operation::Result:70275279152800 documents=[{"ok"=>1, "n"=>1}]> irb(main):014:0> $users.find().each do |user| irb(main):015:1* puts user irb(main):016:1> end {"_id"=>BSON::ObjectId('55e3ee1c5ae119511d000000'), "last_name"=>"knuth"} {"_id"=>BSON::ObjectId('55e3f13d5ae119516a000000'), "last_name"=>"mtsouk"} => #<Enumerator: #<Mongo::Cursor:0x70275279317980 @view=#<Mongo::Collection::View:0x70275279322740 namespace='tutorial.users @selector={} @options={}>>:each>
When users experience performance problems, it’s not unusual to discover a whole slew of unused or inefficient indexes. The most efficient set of indexes for an application will always be based on an analysis of the queries being run. Be disciplined about the optimization methods presented in chapter 7.

This is an excerpt from Manning's book Making Sense of NoSQL.
Table 1.2. The key case studies associated with the NoSQL movement—the name of the case study/standard, the business drivers, and the results (findings) of the selected solutions
Case study/standard
Driver
Finding
LiveJournal’s Memcache Need to increase performance of database queries. By using hashing and caching, data in RAM can be shared. This cuts down the number of read requests sent to the database, increasing performance. Google’s MapReduce Need to index billions of web pages for search using low-cost hardware. By using parallel processing, indexing billions of web pages can be done quickly with a large number of commodity processors. Google’s Bigtable Need to flexibly store tabular data in a distributed system. By using a sparse matrix approach, users can think of all data as being stored in a single table with billions of rows and millions of columns without the need for up-front data modeling. Amazon’s Dynamo Need to accept a web order 24 hours a day, 7 days a week. A key-value store with a simple interface can be replicated even when there are large volumes of data to be processed. MarkLogic Need to query large collections of XML documents stored on commodity hardware using standard query languages. By distributing queries to commodity servers that contain indexes of XML documents, each server can be responsible for processing data in its own local disk and returning the results to a query server.
Figure 3.7. Data security and access control—how sensitive columns can be hidden from some users using views. In this example, the physical table that stores order information contains credit card information that should be restricted from general users. To protect this information without duplicating the table, RDBMSs provide a restricted view of the table that excludes this credit card information. Even if the user has a general reporting tool, they won’t be able to view this data because they haven’t been granted permission to view the underlying physical table, only a view of the table.
![]()
If you’re selecting a NoSQL system, you’ll want to make sure to look at the findability of the system. These are the characteristics of a database that help users find the records they need. NoSQL systems excel at combining both structure and fuzzy search logic that may not be found in RDBMSs. Here are a few types of searches you may want to include in your system:
Search ranking —Search ranking is the process of sorting search results based on the likelihood that the found item is what the user is looking for. So, if a document has a higher keyword density of the requested word, then there is a higher chance that document is about this keyword. The term keyword density refers to how often the word occurs in a document weighted by the size of the document. If you only counted the total number of words in a document, then longer documents with more keywords would always get a higher ranking. Search ranking should take into account the number of times a keyword appears in a document and the total number of words in the document so that longer documents don’t always appear first in search results. Ranking algorithms might consider other factors such as document type, recommendations from your social networks, and relevance to a specific task. Stemming —Stemming is the process of allowing a user to include variations of a root word in a search but still match different forms of a word. For example, if a person types in the keyword walk then documents with the words walks, walked, and walking might all be included in search results. Synonym expansion —Synonym expansion is the process of including synonyms of specific keywords in search results. For example, if a user typed in aspirin for a keyword, the chemical names for the drugs salicylic acid and acetylsalicylic acid might be added to the keywords used in a search. The WordNet database is a good example of using a thesaurus to include synonyms in search results.