<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rahul A Shetty on Medium]]></title>
        <description><![CDATA[Stories by Rahul A Shetty on Medium]]></description>
        <link>https://medium.com/@shettyrahul?source=rss-11e24867fdec------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GDIXVZVEDPq_JDFn_saIcA.jpeg</url>
            <title>Stories by Rahul A Shetty on Medium</title>
            <link>https://medium.com/@shettyrahul?source=rss-11e24867fdec------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 14:10:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shettyrahul/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Metrics reading by a Product Manager — Part 1]]></title>
            <link>https://medium.com/@shettyrahul/metrics-reading-by-a-product-manager-part-1-7db73380c18?source=rss-11e24867fdec------2</link>
            <guid isPermaLink="false">https://medium.com/p/7db73380c18</guid>
            <category><![CDATA[startup-lessons]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Rahul A Shetty]]></dc:creator>
            <pubDate>Mon, 06 Dec 2021 10:20:38 GMT</pubDate>
            <atom:updated>2021-12-16T06:46:07.485Z</atom:updated>
            <content:encoded><![CDATA[<h3>Metrics reading by a Product Manager — Part 1</h3><p>Over a period of time I have observed behaviors in the nature of metrics and in the way metrics are read or created.</p><p>There are 2 lists that I will present here</p><ol><li>The Be-aware list</li><li>Good practices for good metrics <em>( coming soon)</em></li></ol><p>Let me start with the Be-aware list. These are the cautions that I am accused of repeating the most. I have not added examples for below. Was lazy. If it gets 100+claps or 100 retweets or 100 LinkedIn likes, I will put the effort :)</p><h3>Be-aware</h3><ol><li>Be-aware of <strong>averages </strong>( and know when to use it)</li><li>Be-aware of <strong>denominators </strong>( nature of the sample)</li><li>Be-aware of the trap of <strong>causation vs co-relation</strong>. But do read the <em>Book of Why</em><strong> </strong>— Some co-relations are causations ( more about it in another post)</li><li>Be-aware of <strong>thinking linearly</strong> when you project/imagine the future of a metric</li><li>Be-aware of assuming <strong>normal distribution</strong> ( like averages)</li><li>Be-aware of <strong>system influence</strong> as a whole while tracking feature metric</li><li>Be-aware of <strong>external factors</strong> that effect metric ( point 6 extension)</li><li>Be-aware that metrics are mere parts that drive/influence the machine. Do not forget <strong>interdependency </strong>of parts and the machine itself ( Point 6, Point 7)</li><li>Be-aware of focusing on the metric and<strong> forgetting about the user</strong>. eg: CTR</li><li>Be-aware of<strong> ‘too good to be true’ </strong>metric results</li><li>Be-aware of seeking metric to<strong> satiate curiosity vs metric to learn</strong> about the user</li><li>Be-aware of <strong>vanity </strong>metrics</li><li>Be-aware of<strong> influences of query language &amp; schema </strong>when deriving metrics</li><li>Be-aware of the fact that <strong>tools at disposal do influence</strong> choice of metrics and also insights from them!</li><li>Be-aware of creating <strong>excess events, properties</strong>. Noise hides signal and hence reality ( holds good for the number of points in this list too 🙂 )</li><li>Be-aware of the fact that if a <strong>metric is popular</strong>, it does not mean it is for you. Do not measure the elephant for speed and rabbit for strength</li></ol><p><em>P.S: It does feel the Be-aware word is repeated a lot. Sorry</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7db73380c18" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NoSQL — What did we learn — Part 1?]]></title>
            <link>https://medium.com/@shettyrahul/nosql-what-did-we-learn-part-1-19401bec74f2?source=rss-11e24867fdec------2</link>
            <guid isPermaLink="false">https://medium.com/p/19401bec74f2</guid>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[startup-lessons]]></category>
            <dc:creator><![CDATA[Rahul A Shetty]]></dc:creator>
            <pubDate>Wed, 06 Mar 2019 16:18:10 GMT</pubDate>
            <atom:updated>2021-12-16T07:05:24.005Z</atom:updated>
            <content:encoded><![CDATA[<h3>NoSQL — What did we learn — Part 1?</h3><p>This is how we discovered NoSQL. We started working on GCP in 2015. Cloud DataStore was probably the standard database of GCP during that time. To our delight, it served the four objectives we had identified for our system:</p><ol><li>Horizontally scalable</li><li>Pricing</li><li>Automatically scalable</li><li>Speed</li></ol><p>We then realized that it was a NoSQL database. And thus began our story with NoSQL. We now use it in almost all our products. We learned a few things while using NoSQL ( and Cloud DataStore) during these years</p><p>NoSQL comes in different flavors — Document based (Cloud datastore, MongoDB), Key value-based ( DynamoDB), Column-Store (Cassandra), Graph-based ( Neo4J).</p><p>Pick a type based on the data and the queries you perform on them. For example, a graph-based database is good for a social networking site maintaining connections. A key-value database is handy when the data is packed well and fast retrieval is the primary purpose</p><p>Azure has a good article on NoSQL databases — <a href="https://docs.microsoft.com/en-us/azure/architecture/data-guide/big-data/non-relational-data">Non-relational data and NoSQL</a></p><p>For starters, we make a good effort not to visualize the schema as a <em>table. </em>The intuition when it comes to a database is to view it as rows and columns. There is nothing wrong in it ( even for NoSQL). But at the start, it helps to break the mold of what an entity, kind, tuple, table means in NoSQL.</p><p>Secondly, relational databases take data as a starting and central point. It is all about the structure of data ( including relations), optimization ( reducing repetition) of data. So the question that we ask while designing a SQL database it to think — <strong>“What answers do we need to provide?”</strong></p><p>On the other hand, NoSQL is <em>schema-less</em>. There is no structure for the data. This mean a ‘row’ ( I know, I know, I am breaking the rule), can have a different number of fields or different types of fields. ( Imagine each <strong>row as a self-contained document represented by JSON</strong>. Now you can digest schema-less visualization better)</p><p>Coming back to design. When you design a NoSQL database, the principle is to think — <strong>“What questions( queries) that might be asked of this data?”</strong></p><p>The best case scenario is that the query directly targets a document ( in the case of a document based NoSQL). This means we <em>avoid JOIN querie</em> s. And for that matter JOIN queries are not available in NoSQL databases ( remember non-relational). And since we want documents to be self-contained, we might have to repeat the data.</p><p>If you think Normalisation is a virtue, this is nothing short of an anathema.</p><p>Eg: SQL: Employee, Contact details, Address could be 3 different tables</p><p>NoSQL: Employee details, Contact details, and Address will be one document in the case of a NoSQL design. Being schema-less Contact details could be just email or email &amp; phone number ( the number of fields can vary).</p><p>You should try to embed all data in one document under the following circumstances: ( Microsoft article on modeling data)</p><ul><li>There are contained relationships between entities.</li><li>There are one-to-few relationships between entities. ( the number of contacts or addresses of an employee are usually less)</li><li>There is embedded data that changes infrequently. ( e.g: Address, Contact details do not change frequently)</li><li>There is embedded data won’t grow without bound. ( The number of address and contact details do not grow beyond small limits)</li><li>There is embedded data that is integral to data in a document.</li></ul><blockquote><em>This quest for self-containment contributes greatly to the read performance.</em></blockquote><p>But while doing so, there will be two things that you will have to do</p><ol><li>Denormalisation</li><li>Repetition of data</li></ol><p>We will encounter them shortly.</p><p>Data does tend to have relations in the real world. It is not always self-contained. Let’s see how NoSQL handles queries that in a relational database would require JOIN.</p><p><strong>1:n : Reference</strong></p><p>One to many. E.g: Posts -&gt; Comments.</p><p>A post can receive many comments. They are unbounded. And the comment list could be frequently updated. Embedding them inside the post for the sake of self-containment will not serve the purpose. The cost of writing &amp; updating is high.</p><p>Now, you do not embed. But you reference the post inside of the comment. So it will look like the following:</p><pre>Posts = { post_id1,....}<br>Comments = { comment_id1, text, time, post id, ......}</pre><p>This means now you can run one query to get all the comments with particular post id.</p><p>As a rule of thumb, embed the reference in the growing data. But again…you can still use embed if your applications have a low write frequency.</p><p>In the above solution, we break the embeds into buckets so we can manage the size of the array. Embed works too. But it might not be an elegant solution for your problem.</p><p><strong>m:n</strong></p><p>Things become starkly fluid here. This is where you wish you had used a relational database. You start thinking of duplicating data and moving it into a relational database and so on.</p><p>And you might be right.</p><p>Till now, we did learn about embedding &amp; referencing. In the m:n landscape, you might do a bit of both. Let us consider the example of Video -&gt; Viewing users</p><p>A video can be viewed by multiple viewers. A user can view multiple videos. So if you have a query that wants to get me all the users that have viewed this video and a query that we need to support asking for all the videos this user has watched. Given this how do we design?</p><p><em>Option 1: Referencing</em></p><pre>Video = { video_id, title, desc,..., [user_id1, user_id2, user_id3] }<br>User = { user_id, name, age,.....,[video_id1, video_id2]}</pre><p>In this case, we have both the arrays being unbounded and could be frequently updated in a popular system. So is referencing still a good idea?</p><p>The answer to this depends on your use case — the number of users or videos in your system and their access to each other.</p><p><em>Option 2: Another document</em></p><pre>Video = { video_id, title, desc}<br>User = { user_id, name, age}<br>Views = { video_id, user_id, time, location}</pre><p>The above solution does look like a relational one. Right? Now you know that the world is not perfect.</p><p>The advantage here is that the view document can store extra information like the time the video was viewed, location and other things.</p><p>But the disadvantage is if you have queries like these.</p><pre>Get all users under 20 who have watched this video.<br>Get all videos watched by users who are are paid subscribers</pre><p>The above will lead to multiple reads for a single query. Plus the processing time.</p><p>Depending on your visibility to the requirements and future changes, you can do something like this</p><pre>Views = { video_id, user_id, time, location , &lt;some immutable user information duplicated here&gt; , &lt; some immutable video information duplicated here&gt; , }</pre><p>Immutable because, if you embed mutable information, you run into the problem of a huge increase in writes. For instance, each time the user information changes or video information changes, you will have to update all the views. This does not make sense.</p><p>But they make some of the above queries possible ( to an extent).</p><p>In the next part, we will cover the non-query aspects of NoSQL.</p><p>What about ACID <em>ity?</em></p><p>If NoSQL is your primary database, when do you require a SQL database?</p><p>How do the implementations of a NoSQL database (like Cloud DataStore), Firebase, MongoDB deliver on the promise of performance?</p><p>Do keep reading. And post your thoughts on what you have already read.</p><p>Thank you.</p><p><em>Originally published at </em><a href="https://medium.com/growthbeats/nosql-what-did-we-learn-part-1-51479b98eab6"><em>https://medium.com</em></a><em> on March 6, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19401bec74f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>