<?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 Krishna Vidja on Medium]]></title>
        <description><![CDATA[Stories by Krishna Vidja on Medium]]></description>
        <link>https://medium.com/@kavar.krishna?source=rss-89c2cea159f7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*yJKiGZBOk_g5jrwf62wxKQ.jpeg</url>
            <title>Stories by Krishna Vidja on Medium</title>
            <link>https://medium.com/@kavar.krishna?source=rss-89c2cea159f7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 28 May 2026 00:14:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kavar.krishna/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[Interactive Dashboard in Excel]]></title>
            <link>https://medium.com/@kavar.krishna/interactive-dashboard-in-excel-4fa74cb01d4a?source=rss-89c2cea159f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fa74cb01d4a</guid>
            <dc:creator><![CDATA[Krishna Vidja]]></dc:creator>
            <pubDate>Wed, 30 Nov 2022 02:19:06 GMT</pubDate>
            <atom:updated>2023-10-02T18:31:12.641Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K5qZem1UWoW_GDFnUmdROw.png" /><figcaption>Interactive Dashboard in Excel</figcaption></figure><p>We all know that Excel is packed with tons of powerful features, libraries of formulas, and galleries of interesting charts, making it one of the most useful tools for business analysts.</p><p>Business analytics involves using data to make crucial strategy-level decisions. The question is how to represent that data in a way that’ll help our leadership team or decision-makers come to a consensus quickly. This is your skills as an analyst and a dashboarding specialist will shine.</p><p>In this article, I will show you how to create a dynamic and stunning dashboard in Excel. We will look at creating pivot tables, designing the dashboard layout, adding various charts to the dashboard, unifying the charts into one theme, and then adding slicers/filers that control all the charts. Here is a preview of what you will be able to build at the end of this article.</p><p>Now, that we are set and done, let’s get right into it!</p><h3>Step 1: Dataset for Dashboard</h3><p>For our Ultimate Excel Dashboard, we will use a huge amount of transactional sample data. Here is the snapshot of the sample sales data:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o37sy1Lee0Yq8-h482Gxfw.png" /></figure><h3>Step 2: Creating Visualizations for the Dashboard</h3><p>For the given sales data, different types of plotting can be performed. We will create charts to analyze:</p><ol><li>KPI (sales, profit, quantity, no. of orders, profit margin)</li><li>YOY Growth</li><li>Sales and Profit analysis</li><li>Category wise Profit</li><li>Category-wise Sales share %</li><li>Sales by State</li><li>Top 5 Categories by Sales</li></ol><p>Now that you have your data set prepared, let’s start creating and preparing the Pivot Tables and Pivot Charts that we need to fill our Excel dashboard with life.</p><h4>Create Pivot Tables and Pivot Charts:</h4><p>First will work on creating 5 charts for our dashboard and then will move towards KPI.</p><p>For every Pivot Chart, we start by creating the Pivot Table. Once the Pivot Table is set up, we can drag and drop the required data fields into the rows, columns, and values of our Pivot Table section.</p><ul><li><strong>Sales and Profit analysis</strong></li></ul><p>For Sales and Profit analysis we need to create a pivot table with sales and profit. To create a pivot table, navigate to the Insert tab, and then the PivotTable option on the left.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*1D0YVmexmH4BCALPDwfBeA.png" /></figure><p>This will open up a new sheet with Pivot options on the right. We need month vise sales and profit so will simply drag the sales and profit field into the values section and the field into the values section and order date in the axis (categories). You will notice order date will display year wise so remove year and quarter from axis to keep list of months only.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Lp4B8b4D8nxiE9HQjGp1w.png" /></figure><p>Change the format of sales and profit values as shown below by right click on selecting sales and profit columns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UhN3fxgBNXE1EICglPknyQ.png" /></figure><p>Now, let&#39;s create a chart for this pivot table. for that click on any cell on the pivot table to activate the pivot chart and select combo chart as we want to show sales and profit both on the same chart as a dual axis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-RabjslgpOO0kwNGgMrDwQ.png" /></figure><ul><li><strong>Category wise Profit</strong></li></ul><p>We are going to create a waterfall chart for the category-wise profit. First, create the pivot table by taking profit in values and category in the axis field of the pivot table and try to select the waterfall chart which will give you the below error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yHTLETFZM3VOlnMhgZXobw.png" /></figure><p>The Waterfall Chart and Map Chart are 2 exceptions Chart which currently requires copying the Pivot Table Data outside of the Pivot Table and then inserting a regular chart that references the copied data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZSNQF-81v2uNU5e8o8SShA.png" /></figure><p>Format the profit values into $0.00,”K” format as shown before.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*VMAoIqNrfbBU9Xdi6DCK0g.png" /></figure><ul><li><strong>Category-wise Sales share %</strong></li></ul><p>We want to know which category has highest sale out of all the available ones. For this, we will plot a pie/donut chart. In the pivot table, drag “Category” in the rows section and “Sales” in values. Show sales values as grand total as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*on3qEaTyj0BZ5bcQ610AQA.png" /></figure><p>To plot the donut plot, click on the pie icon in the pivot chart options and select the donut plot at the end. Display labels by clicking plus sign on the right corner. Next, remove all the unwanted field buttons to enhance the chart visually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q89oimYDOld3ijhIr7yo4w.png" /></figure><ul><li><strong>Sales by State</strong></li></ul><p>For every new plot, you need to create a new pivot table. Therefore, repeat the process of creating a pivot table and navigate to the new pivot table sheet each time. Now, for sales by date, a Map plot would convey more information about the actual region of the country.</p><p>Drag “State” to rows and “Sales” to values to create a pivot table. we cannot plot the Map plot directly from a Pivot table. Therefore, you need to copy the pivot table, paste it into the same sheet, and then create the reference of the values to the pivot table values. Below image will help you to understand this part.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FDrKRRgPTJWiW-vUsJg_cg.png" /></figure><ul><li><strong>Top 5 Categories by Sales</strong></li></ul><p>We want to show the Topmost 5 categories that have the highest sales, and for that create a pivot table with “Category” on rows and “Sales” on values. Then, sort the data from largest to smallest.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*fNuZ6G2pGOLwzkZDW3HnFQ.png" /></figure><p>Choose the top 5 categories and then select pivot chart to show top 5 categories by sales.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*veD2VOKW90mJzvXBMjxnMQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*52c7ee-J-G7bzT_SA-6HmA.png" /></figure><ul><li><strong>KPI (Key Performance Indicator):</strong></li></ul><p>KPI is a measurable value that demonstrates how effectively a company is achieving key business objectives. Organizations use KPIs to evaluate their progress and success at reaching targets.</p><p>Here, we going to create 5 KPIs for our dashboard. let’s start with the first one which is Sales. You can use a Sparkline chart for KPI but here I would like to use a line chart as a sparkline chart, will show you how.</p><p>Select the line chart from the pivot chart for a pivot table with month and sales and remove everything from the chart except the line only so we can use this line chart as a sparkline chart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yzjfkp33AI1t4TTbDofZLw.png" /></figure><p>Repeat the same process for the other three KPIs for Profit, Quantity, No. of Orders.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FPK9WcJJzWwxHfz_BPNllQ.png" /></figure><p>For Profit Margin KPI, we have to calculate the profit margin which is =Profit/ Sales using calculated field.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*8WWebmlT21q0eBOsNoIGJA.png" /></figure><p>Now, all five KPIs with charts are ready to go for a dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1JFACUDH9j0ue0y_3Tr56A.png" /></figure><ul><li><strong>YOY Growth</strong></li></ul><p>Year over Year (YoY) growth measures the change in an annualized metric across two comparable periods, typically the current period and the prior period as of the fiscal year-end date. The formula to find YOY growth is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*Gtq5cbQJuwlSiQkKcQUXow.png" /></figure><p>Increased YoY Growth → <strong>Positive</strong></p><p>Decreased YoY Growth → <strong>Negative</strong></p><p>Calculate YOY Growth for all KPI fields using the above formula. To show positive YOY growth give green color with an up arrow and give red color with a down arrow for negative YOY growth.</p><p>([Green]▲0.00%;[Red] ▼0.00%)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oQyx1oUjlHN-EHIb-9LJow.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*cCrQfXE1k93C1z8I_lk8Vw.png" /></figure><h3>Step 3: Raw Dashboard Design</h3><p>All the required charts are created and now we are ready to design the dashboard. Follow these steps:</p><ol><li>Create a new sheet in the workbook</li><li>Goto to page layout, and under the sheet options, uncheck the Gridlines view checkbox.</li><li>Next, click on Background and choose a background image. You can search for images on Google, Unsplash, or create a fresh dashboard layout in Canva.</li><li>Now, you can add the title and subtitles to the report by going to the insert tab and selecting the text box option at the right. You can also change the font color, text, and other text properties.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*AA-J7sM_KbCLXFPItDhd_A.png" /></figure><p>Will start with adding KPIs to the dashboard first and put them next to each other in 1st row. For each KPI, there will be total shapes you need to add which are arranged as shown below. By selecting all these 4 shapes together, you can create a group so it will be easy to move them all together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/276/1*peLwggkhgugwQm6SWVxZiA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*cUYjiE5FEqriSucf1sdzSA.png" /></figure><p>Similarly, keeps adding all other KPIs to their respective place and arranging them properly before creating a group with all five KPIs together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YDO985GBdSQnEXToQWYjkg.png" /></figure><p>After adding the background, title text, and KPIs it’s time to create the titled view of our dashboard. Insert a rectangle, fill the gradient fill color as you want, make it around 25% transparency, and remove the border colors. These boxes/tiles will be the base for our charts. Place them in an ordered collage manner. It would look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sbkXG3k0DDWakKOP4ZH3Ew.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*LCOanxle5u_BKWFGz-Xi3g.png" /></figure><h3>Step 4: Insert and Redesign Pivot Charts</h3><p>Now, to add the charts to their respective positions:</p><ol><li>Simply copy them from their pivot sheets and paste them into their tiles.</li><li>You will need to adjust the size according to the tile size or modify the tile size to accommodate the charts.</li></ol><p>For example, let’s add the first chart Sales and Profit Analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*HUEhhn3jqujDxqW1snmTNg.png" /></figure><p>For every chart to be in the same theme and immersive into the tiles made:</p><ol><li>You need to change the gradient color respective to the selected theme and the Border color to none. This can be done by navigating to the format tab.</li><li>Change all text colors to white.</li><li>Remove the unnecessary field buttons from charts by going to the PivotChart Analyse tab and then to the Field Buttons option to the right. Deselect all the choices there or choose the Hide all option.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*-eRHp5Fgb3-whoOG81Eoug.png" /></figure><p>Add the waterfall chart and donut chart to their respective shapes. There are a few format options available that you need to do for the donut chart like hole size, explosion, different shades of color per donut section, label formatting, etc. as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OhGczgnNSfsnSS9ejwp3xA.png" /></figure><p>The next one is Map Chart for Sales by State. Follow the same steps to add the chart and another formatting. Select a series of colors to make it more clear visualization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*XpKiq2KUIr2jxQMSpjWc9g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*o3Rf0zuhqvICQU83_c0Lqg.png" /></figure><p>Last chart remaining before we add slicers is the Top 5 Subcategory by Sales. Select show data labels from chart elements and format them to the inside end to save space as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*2r9sEO1z6aHnOXMEpy92oA.png" /></figure><p>The dashboard with all the charts placed, given title, and customizations applied should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FvHhBHY3ChVIxwX0BLcz9g.png" /></figure><h3>Step 5: Add Slicers for Interactivity</h3><p>Slicers are the magic component that will make our charts interactive and cross-dimensionally filterable. We insert a slicer for every dimension that we want to filter in and connect all slicers to every chart.</p><p>To achieve this, simply create a slicer for any of the charts placed.</p><ol><li>Select a chart</li><li>Navigate to the Insert tab</li><li>Click on the Slicers option in the Filters section</li><li>Select the desired columns/fields for which you want to filter the data</li></ol><p>Here, I have chosen a Waterfall Chart to create slicers and chosen Year, Segment, and Region so it will give three slicers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2bONPT2To4xm5TX6Na2pAA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*r8YWulv6VtPAPIcb7aaoBQ.png" /></figure><p>Add these slicers to the dashboard by simply copying and pasting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*1SNx2e-Zc3mN7VquHwk1Zg.png" /></figure><p>Now it’s time to format slicers……</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o51ewxN4twk44VkYW-xNdA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/1*3PkVECzjt9RljodOZEmFHg.png" /></figure><p>Now, for slicers to update other charts as well,</p><ol><li>Right-click on the slicer</li><li>Select Report Connections</li><li>Select/Check all the pivot tables checkboxes</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*33mlsvUf7yYx4WAVXOGfyQ.png" /></figure><h3>Final Dashboard in Excel</h3><p>And here is our final dashboard creation……</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K5qZem1UWoW_GDFnUmdROw.png" /></figure><p>Have another look for the dashboard as GIF to understand its interactivity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*97upbiFN62FTggySK6InUA.gif" /><figcaption>Interactive Dashboard GIF</figcaption></figure><h4>Conclusion:</h4><p>In this blog, I have explained how to create dashboards in excel. I have given screenshots with descriptions to create pivot tables, insert charts into the sheets, format options, create the layout of a dashboard, how to add all charts together on the dashboard, make the charts beautiful with correct and even theme, and how to connect all these charts to common slicers.</p><p>Thank you for taking the time to read our content. Appreciate your claps and comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fa74cb01d4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Demystify Septic Shock with Sepsis Data]]></title>
            <link>https://medium.com/@kavar.krishna/demystify-septic-shock-with-sepsis-data-b0761f88639a?source=rss-89c2cea159f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0761f88639a</guid>
            <dc:creator><![CDATA[Krishna Vidja]]></dc:creator>
            <pubDate>Mon, 28 Nov 2022 03:04:13 GMT</pubDate>
            <atom:updated>2022-12-13T03:50:09.311Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dq9oqjdXfej2PILJk0yJaQ.jpeg" /></figure><p>Imagine a condition that causes between 20 and 30 million deaths worldwide each year. However, many people have not heard of it, and even fewer understand what it is. I was one of them. The condition is called sepsis and it’s the reason many adults, children, and families, are grieving for their loved ones.</p><p>Our immune system protects our bodies from a variety of things, including viruses, bacteria, and toxins, so having a healthy one is important. Sometimes, however, an immune system can weaken or fail. It can even work against us, causing autoimmune disorders, which can put one at greater risk for sepsis and lead to septic shock.</p><h3>Sepsis and Progression of Sepsis</h3><p>Sepsis, also known as septicemia or blood poisoning, occurs when the body has a severe response to an infection. Instead of the immune system defending the body, it releases chemicals, potentially leading to mass inflammation and damage to the kidneys, lungs, liver, or other major organs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p2Z5H2mySeWSo4az49oRPw.jpeg" /><figcaption>Figure. 2 Sepsis Stages</figcaption></figure><p>Sepsis can be identified into four stages (figure 2):</p><h4>1. SIRS (Systematic Inflammatory Response Syndrome<strong>)</strong></h4><p>Sepsis can be hard to diagnose at its early stages because its symptoms are similar to many other conditions, but SIRS still helps at a certain level to identify.</p><p>Identifying <strong>SIRS</strong> in a patient includes the following criteria:</p><ul><li>Temperature &gt; 38.5ºC or &lt; 35ºC (body temperature alterations which are known as hyperthermia or hypothermia)</li><li>Heart rate &gt;90 beats/min (Tachycardia)</li><li>Respiratory rate &gt;20 breaths/min or PaCO2 &lt; 32 mmHg (Tachypnoea)</li><li>WBC &gt;12,000 cells/mm3 or &lt; 4000 cells/mm3, or &gt;10 percent immature (band) forms (leukocytosis or leukopenia)</li></ul><p>Finding <strong>two or more</strong> of any of these criteria in a patient indicates the possibility of sepsis.</p><h4>2. Sepsis</h4><p>An infection reaches the bloodstream and causes inflammation in the body.</p><h4>3. Severe Sepsis</h4><p>The infection is severe enough to affect organ function.</p><h4>4. Septic Shock</h4><p>There’s a significant drop in blood pressure that can lead to respiratory or heart failure, stroke, dysfunction of other organs, and possibly death.</p><h3>When Sepsis Becomes Septic Shock</h3><p>Sepsis treatment usually requires intravenous (IV) fluids and antibiotics. It is essential that the treatment begin as early as possible. The chance of sepsis progressing to severe sepsis and septic shock, causing death, rises by 4% to 9% for every hour treatment is delayed.</p><p>Severe sepsis occurs when one or more of your organs stop working effectively. For example, you could need a ventilator to help you breathe or dialysis to filter toxins from your blood. Any organ can be affected.</p><p>People with severe sepsis are already very ill, but if your blood pressure starts to drop, you become even sicker. You go into septic shock. The medical definition of “shock” is a drop or fall in blood pressure. When it is associated with sepsis, it is called septic shock.</p><p><strong>Severe Sepsis and Septic Shock:</strong></p><p>Both of these are conditions in which multiorgan dysfunction is due to INFECTION only.</p><ul><li>The only difference between these two is the presence of volume-resistant hypotension in septic shock.</li><li>The tendency to develop one (or both) of these conditions is NOT a function of the organism involved in the actual infectious process but rather, the degree of HOST RESPONSE.</li></ul><h3>Septic Shock Signs, Symptoms, &amp; Complications:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*RKbI1yGs63xg6bU4fHlM7Q.png" /><figcaption>Figure. 3 Septic Shock Signs, Symptoms, &amp; Complications</figcaption></figure><p>Septic shock is a severe drop in blood pressure that results in highly abnormal problems with how cells work and produce energy. Progression to septic shock increases the risk of death. Signs of progression to septic shock include:</p><ul><li>The need for medication to maintain systolic blood pressure ≥ 65 mmHg.</li><li>High levels of lactic acid in your blood (serum lactate). Having too much lactic acid in your blood means that your cells aren’t using oxygen properly.</li><li>Difficulty breathing with increasing oxygen requirement.</li><li>Lab abnormalities — kidney or liver dysfunction, blood count abnormalities.</li><li>Confusion or change in mental status.</li></ul><p>At this stage, immediate medical attention is critical.</p><p><strong>Septic Shock Symptoms:</strong></p><p>Depending on a patient’s progression through the phases of sepsis, symptoms range from mild to severe. The most common symptoms include:</p><ul><li>Low blood pressure (Hypotension)</li><li>Respiratory issues</li><li>Confusion</li><li>Temperature exceeding 101º F</li><li>Fever and chills</li><li>Increased heart rate</li><li>Organ failure</li><li>Urological issues</li></ul><p><strong>Septic Shock Complications:</strong></p><p>Septic shock is a very serious medical condition. It’s the most severe stage of sepsis. Septic shock can lead to:</p><ul><li>Brain damage.</li><li>Lung failure.</li><li>Heart failure.</li><li>Kidney failure.</li><li>Gangrene</li><li>Death.</li></ul><h3>Septic Shock Treatment:</h3><p>People who are in septic shock need urgent intensive care. The medical team has to approach treatment from different angles for it to be successful:</p><ul><li>IV fluids to raise blood pressure.</li><li>Treat the infection: Your doctors must find out what caused the infection that triggered the sepsis and give the appropriate antibiotics.</li><li>Oxygen, either by mask or nasal cannula or with a ventilator, helps raise oxygen levels in the blood.</li><li>Surgery may be necessary to remove the source of infection, such as gallstones or an inflamed appendix.</li></ul><h3>Analysis with Sepsis Data using Tableau:</h3><p>Let’s understand a bit of data….</p><p>The Sepsis dataset has 43 biomarkers which can broadly be classified into:</p><ul><li>Demographics</li><li>Vital Signs or Clinical</li><li>Laboratory values</li></ul><p>Just like biomarkers, patients can be categorized under 3 conditions:</p><ul><li>Patients without sepsis, on admission (Sepsis Label 0).</li><li>Patients without sepsis on admission, but later developed Sepsis in ICU (Sepsis Label 0 to 1). we can call them <strong>Onset Sepsis</strong> patients.</li><li>Patients with sepsis, on admission (Sepsis Label 1).</li></ul><h4>Part-I: SIRS Analysis</h4><p>SIRS Analysis part has already been done so I am not going to explain it here in detail. Below the table, I created in tableau based on SIRS symptoms (explain above) Trigger hour as well as an hour before the trigger hour gave name Previous hour. If any two of the SIRS conditions are satisfied that means the patient falls under the SIRS criteria, and they have the trigger started so we can compare it with the previous hour. We can see many patients who already started showing symptoms at least once and so with this and considering the other factors we can give priority to those patients who need more care or who need immediate care.</p><p>Color-coded was given based on SIRS conditions for the Trigger hour and the Previous hour.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q1sO0KgrJOjzSv3ehBB-Mw.png" /></figure><h4>Part II: Septic Shock Analysis</h4><p>The sepsis dataset has 40,336 total patients count. Out of that 98.02% of patients have no sepsis, and 1.98% of the patients have sepsis. Figure.5 shows the total patient counts for Sepsis, SIRS, and Septic Shock out of that total Patient counts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*22i5bDyCLMmfNf2K9s_T6A.png" /></figure><p>Severe sepsis with acute circulatory failure is characterized by persistent hypotension (SBP &lt;90 mm Hg, MAP &lt;60 mm Hg, or a decrease in SBP by &gt;40 mm Hg) despite adequate fluid resuscitation.</p><p>Identifying septic shock in a patient includes the following criteria:</p><ul><li><em>SBP&lt;90 mm Hg, MAP&lt;60 mm Hg or SBP&gt;40 mm Hg</em></li><li><em>Respiratory rate ≥ 22 breaths/mins</em></li><li><em>Lactate&gt;2 mmol/L</em></li></ul><p>The chance of sepsis progressing to severe sepsis and septic shock, causing death, rises by 4% to 9% with every hour of treatment delay. Laboratory tests can help assess organ dysfunction and contribute to the clinical diagnosis and appropriate medical management of sepsis, but lab results might take a little longer to get so for immediate pre-diagnose, the other 3 important vital signs (SBP, MAP, and RR) need to take into consideration.</p><p>The below visualization (figure. 6) helps doctors to know if patients are reaching the critical stage. Visualization contains Trigger hour, Previous hour, and biomarkers like SBP, MAP, Respiratory, and Lactate. Patients who satisfy septic shock conditions have either a sudden drop in blood pressure or a high respiratory rate or it can be both. The respiratory rate is high for all septic shock patients for their previous hour also, but they’re not many significant signs of BP drop in the previous hour, so doctors and nurses need to monitor sepsis patients continuously if the patient has a respiratory rate ≥22 with other imbalance vital signs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DHVzEslDr8zfQG94etGOxg.png" /><figcaption>Figure. 6 Hourly comparisons of biomarkers</figcaption></figure><p>High levels of lactic acid in your blood (serum lactate) is also important biomarker to diagnose if the patient identifies septic shock. Having too much lactic acid in your blood means that your cells aren’t using oxygen properly. In figure. 7, I highlighted lactate values that show high lactate (&gt;2) and very high lactate (&gt;4) with color codes for these septic shock patients. 9.3% of septic shock patients have high lactate in this data set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HUuSW-cjiSpYkK3QSKJrdg.png" /><figcaption>Figure. 7 Hourly Comparisons of biomarkers</figcaption></figure><p>From the below Sunburst chart (figure 8) we can see the number of patients who exhibits septic shock symptoms each hour. There is a total of 473 septic shock patients in this dataset which is 16.13% of sepsis patients.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*UMWXy_n3b6ZzA3xhD-TndQ.png" /><figcaption>Figure 8: Count of Patients with Septic Shock symptoms (Hourly)</figcaption></figure><p>Using the above comparison, we can see how patients quickly develop the symptoms of septic shock. Here in this dataset, there are a total of 9 patients who satisfy all four conditions together (Figure 9) on the higher side which shows these severe septic shock patients need urgent intensive care.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*5EKX8cMcxWYh7UQ2yzktKw.png" /><figcaption>Figure. 9 Severe Septic Shock Patients</figcaption></figure><h4>Conclusion:</h4><p>Chances of survival for severe sepsis and septic shock are greatly dependent on the infection source and how far along the infection has progressed, but the septic shock symptom recognition helps ensure to get urgent intensive care immediately, it can be survivable. Early treatment can and does save lives.</p><h4><strong>References:</strong></h4><p><a href="https://www.ncbi.nlm.nih.gov/books/NBK430939/">Septic Shock- National Library of Medicine- StatPearls</a></p><p><a href="http://pocketicu.com/index.php/2018/08/12/sepsis/">Sepsis and Septic shock — Pocket ICU</a></p><p><a href="https://www.sciencedirect.com/topics/nursing-and-health-professions/systemic-inflammatory-response-syndrome">https://www.sciencedirect.com/topics/nursing-and-health-professions/systemic-inflammatory-response-syndrome</a></p><p><a href="https://www.kaggle.com/code/namratakapoor1/sepsis-classification/data">https://www.kaggle.com/code/namratakapoor1/sepsis-classification/data</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0761f88639a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Art of Presenting Data Effectively]]></title>
            <link>https://medium.com/@kavar.krishna/art-of-presenting-data-effectively-f1b96f11cac1?source=rss-89c2cea159f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1b96f11cac1</guid>
            <dc:creator><![CDATA[Krishna Vidja]]></dc:creator>
            <pubDate>Fri, 25 Nov 2022 07:23:51 GMT</pubDate>
            <atom:updated>2022-12-02T01:34:33.469Z</atom:updated>
            <content:encoded><![CDATA[<p>Think for a moment, if someone handed you a sheet with raw data printed on it, how long would it be before you doze off because it was too much to absorb? This is where Data Visualization and Data Story Telling come across. Naturally, the human mind is designed in a way that it grasps graphic content better when compared to raw text. Studies have shown that <em>“Human brains process visuals </em><strong><em>60,000 times faster</em></strong><em> than they do text.”</em></p><p>I am working as a Data Analyst for the past few months, and it has been a wonderful experience analyzing data<em>. </em>My daily routine was spending half my time on Tableau and Excel to make sense of the data. This experience has really made me realize<strong> </strong>the importance of telling stories to employees using data.</p><p>These days you have a variety of tools and methods to build stunning reports or charts, from Excel to modern data visualization software like Tableau, and PowerBI. Be it numerical or textual qualitative big data, your presentation must be clear, easy to understand as well as beautiful, evidential, and persuasive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wca9rNPXkDZ80AYoN3QjbA.jpeg" /></figure><p>In this blog, I am going to share….</p><ul><li>Clever Tips on How to present data effectively.</li><li>Effective data presentation examples.</li></ul><h3>Clever Tips on How to present data effectively.</h3><p>How you present data can double its impact, so take note of these few ways to ensure that your data is doing its job.</p><h4>1. Choose the right visuals for the data</h4><p>Whenever you decide to create some data visualization, use these best practices to make it more straightforward and effective.</p><ul><li><strong>When doing a comparison among items:</strong> column chart, bar chart, bullet chart, radar chart, clustered column/bar chart, bar in a bar chart, etc.</li><li><strong>When doing comparison overtime:</strong> Line chart, multi-line chart, area chart, step chart, bump chart, etc.</li><li><strong>Composition (part to whole analysis):</strong> Pie, donut, waterfall, funnel, stacked bar/column, treemap, stacked area chart, etc.</li><li><strong>Correlation (relationship between variables):</strong> Scatter plot, bubble chart, etc.</li><li><strong>Distribution of data:</strong> Histogram, box and whisker plot, scatter plot.</li><li><strong>Location analysis:</strong> Heat map, bubble map, filled map, etc.</li><li><strong>Key performance indicators (KPIs):</strong> bullet chart, dial, thermometer, big number chart, gauge, etc.</li></ul><h4>2. Carefully choose the colors</h4><ul><li><strong>Consistency</strong>: As a general rule, you should always pick the same color to represent the same thing; be consistent with your color selection and what it represents in your visualizations. Humans naturally perceive color as a pattern, so when they are presented with color across multiple charts, they will assume it is a representation of the same object or entity.</li><li><strong>Don’t use too much color:</strong> It’s also important to not go overboard with your color selections; too many will simply be overwhelming. As a rule of thumb, the Data Visualization Society recommends limiting your palette size to 10 or fewer colors. Once you go beyond this threshold, your audience will tend to have trouble distinguishing between groups in your visualization.</li><li><strong>Choose a cohesive color scheme: </strong>It’s also important to note that you don’t use two light shades for both the background and text of your slide. To make your text stand out, you need to use contrasting colors. For example, you can make the background black and your text a bright shade of green to make it stand out, or vice versa. Just be sure that your text is easily readable.</li><li>I personally experience, one of the strongest visualization effects comes with the use of grey plus some kind of action color evergreen tells me.</li></ul><h4>3. Don’t leave a lot of room for words</h4><p>The key point in graphical data presentation is to tell the story using visuals and images, not words. Give your audience visual facts, not text. However, that doesn’t mean words have no importance.</p><p>As we don’t have a lot of room for wording, the little bits that we put into our data have to be really awesome.</p><h4>4. Focus most on the points your data illustrates</h4><p>Data slides or dashboards aren’t really about the data, but they are about the meaning of the data. It’s up to you to make that meaning clear before you click away. Otherwise, the audience won’t process.</p><p>When you connect data to the essential points it supports, the transition should be explicit and sound like this:</p><p>“This data shows…”</p><p>“This chart illustrates…”</p><p>“These numbers prove…”</p><p>These transitions can be as important as the conclusions themselves because you’re drawing the audience’s attention to those conclusions.</p><h4>5. Label chart components clearly</h4><p>While you have been working with the same chart for days or weeks, your audience will be exposed to it for seconds only. Give them the best chance of comprehending your data by using simple, clear, and complete language to identify X and Y axes, pie pieces, bars, and other diagrammatic elements. Try to avoid abbreviations that aren’t obvious, and don’t assume labeled components on one slide will be remembered on subsequent slides.</p><p>Some members of your audience are visual learners just like me. who process what they see much better than what they hear, so your chart’s visual clarity is crucial.</p><h4>6. Formatting: First impressions matter</h4><p>An audience will decide within the first few seconds whether or not they want to listen to what you’ve got to say. You might be the best at what you do, but if your body language and tone of voice don’t support your key message, you’re at risk of being dismissed. Formatting fits into this same category. Formatting and consistency of your presentation is an important support to your overall key message.</p><p>Formatting is equally important for slide presentations or any dashboard/story presentation. It shows care when presentations have good formatting. Even when you really do care about what you are talking about, poor formatting can give the opposite impression to your audience. Don’t let blurry images, the wrong brand colors, or misaligned text boxes undermine your key messages, etc. Pay close attention to the details to ensure every part of your presentation supports your overall message.</p><h3>Effective data presentation examples</h3><ol><li><strong>Team’s performances with a bar chart:</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*luW2Erxjy23VVV9XYF0Hdw.png" /><figcaption>Top 5 Team performances</figcaption></figure><p>The above graph shows the Top 5 Teams’ performances with their scores in different categories that help to understand which team is leading or losing for a particular category compared to other teams. Now it’s time to show the final score for all top 5 teams and below is the graph for that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nk-xLTCHr-IGO1E_3TjlUg.png" /><figcaption>Top 5 Teams with their total scores</figcaption></figure><p>These are one of the best examples of choosing a contrasting background gives a tremendous effect on visualization.</p><p><strong>2. Sub-Category wise Sales with Funnel Chart</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vb4upqBFkat178nsVaNhqw.png" /></figure><p>Here I have chosen a Funnel chart to show the Sub-Category wise Average sales. This is a very simple chart but an idea to show is formatting. If you notice, I have removed all background grid lines for rows and columns, given the border to the bar, showing the sheet title in bold letters, and the filter on the right corner shows all color codes for all sub-categories. These all techniques make your visualization clear to understand.</p><p><strong>3. BUN (blood urea nitrogen) analysis for sepsis Patients with Bubble Chart:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4w6iz7ZWXwaiRpchNywmCQ.png" /></figure><p>Here, I want to show how sepsis patients are affected by BUN ranges. The analysis I found is, the normal BUN range is 6–24 mg/dl and low levels of BUN can be a sign of malnutrition, lack of protein in the diet, and liver disease. Anything more than 60mg/dl, the BUN value is very high, this can be related to kidney problems. But elevated BUN can also be due to Dehydration, Heart failure, a high protein diet, and even with sepsis. BUN needs to be monitored every 2–4 hrs. till the patient is stable.</p><p>The filter on the side shows the BUN range with colors.</p><p><strong>4. Pareto Chart:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CxUjWOloHxCom2f-BESqeQ.png" /></figure><p>I have used the Pareto chart to show my analysis for sub-category-wise profit. This chart can now be used for insights such as the business’ three most profitable product Sub-Categories are causing about 50% of the total profit. Pareto Charts are an effective way to quickly highlight opportunities for improvement and provide a scale for how urgently a quality control problem should be treated.</p><p><strong>5. Interactive Dashboard with action filter:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kjMDIvYRvHPopy2rPPfAmg.png" /><figcaption>Interactive dashboard with action parameter</figcaption></figure><p>The dashboard is the one where we put all our required sheets together on one screen and give them a nice format to make it more effective. There is one more thing you can use here is, the action filter with parameters which helps to send information between sheets.</p><p>The above dashboard is my most appreciated visualization from one of the hackathon that I have organized. In that, I have all teams’ evaluations in detail with respect to all criteria. All you need to change is team numbers one by one to display their whole evaluation on one screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eyw-N27zz9-RInSqu4dsvA.gif" /></figure><p><strong>Conclusion</strong></p><p>The above data presentation examples aim to help you learn how to present data effectively and professionally. You surely have got the idea that graphical visualizations must be interesting, clear, and easy to digest.</p><p>Presenting data is not an easy task. But it is absolutely possible. What it takes is passion. Don’t think that you have a whole bunch of numbers and charts to show. Instead, present the information with passion, understanding, and dedication.</p><p>All the very best for your next presentation.</p><p>Thank you.</p><p>Appreciate your likes and comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1b96f11cac1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Organizing Compress Project — Hackathon]]></title>
            <link>https://medium.com/@kavar.krishna/organizing-compress-project-hackathon-aab40208e30?source=rss-89c2cea159f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/aab40208e30</guid>
            <dc:creator><![CDATA[Krishna Vidja]]></dc:creator>
            <pubDate>Mon, 12 Sep 2022 17:31:39 GMT</pubDate>
            <atom:updated>2022-09-13T17:49:31.926Z</atom:updated>
            <content:encoded><![CDATA[<h3>Organizing Compress Project — Hackathon</h3><p>Hello everyone,</p><p>Recently, I got a chance to be the leader in organizing a SQL hackathon for 26 teams and more than 100+ participants. The reason to write this blog is to share a few innovative ideas that I discovered during this hackathon. And I hope this can be useful to future organizers too.</p><p>Let’s first understand a bit about “Hackathon” …….</p><h3>What is Hackathon?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d2N9jBI6rknqpgqtIiRRZA.gif" /></figure><p>Initially, the word Hackathon comes from the word Marathon (a long or difficult activity in a short period) and Hack, here meant as exploratory programming.</p><p>During a Hackathon, you spend a short period of time building, creating, and delivering solutions for a given task. The idea is to collaboratively code in an extreme manner, to start from scratch, and end with a goal achieved with teamwork.</p><h3>What is the structure of a Hackathon?</h3><p>This hackathon was purely based on SQL only. SQL stands for Structured Query Language which is used to communicate with a database. We have used PostgreSQL with one of the healthcare dataset (Hospital data) for this hackathon.</p><p>It usually all starts with a Launch of the hackathon with guidelines like the kick-start date of the hackathon, team capacity, query documentation, submission date/time/file format, evaluation guidelines, etc.</p><p>This Hackathon went up for a week. So of course, for shorter Hackathons, there is more pressure. Adding to that competition, you can quickly remember the exam periods at university. Work, work, work, drink coffee, have a quick bite, sleep very few hours, work more. At least that’s what my exams period looked like!</p><p>After the work is done, now it’s time to present their work to the whole organization. In this case, the organizing team has to look at the presentation and all the queries submitted, and they will be in charge of choosing a winning team.</p><p>Still not 100% convinced that you should participate in a Hackathon? Well, wait till you read about the benefits.</p><h3>What are the benefits of Hackathon?</h3><ul><li>Kickstart careers</li><li>Meet new people</li><li>Inspire teamwork</li><li>Add value to your CV</li><li>Encourage diversity &amp; affect positive change</li><li>Innovation</li><li>Personal satisfaction</li></ul><h3>Efforts of the organizing team</h3><p>Let’s begin with the efforts that the organizing team including me has to put in, to run this hackathon. I have listed out all the efforts and divided them among the organizing team to work on.</p><ul><li>Database Creation with ERD (Entity relationship diagram) and required installation documents.</li><li>Prepared 150+ unique questions including a new set of expected output. Generated queries for all questions with optimization concept.</li><li>Introduced Trello board and guided the SMPO (Scrum Master Product Owner) members.</li><li>Addressing Participant’s doubts through slack and setting up zoom calls with the participants as required.</li><li>Total 2800+ Queries evaluated including extra queries attempted by each team.</li><li>The evaluation took 6 days including the final presentation in which we put in a minimum of 14 hours a day for completing the evaluation. Zoom call was kept open in order to work throughout the day.</li></ul><h3>Innovation in Challenges</h3><p>We always ask participants to innovate. However, innovation does not always mean the invention of something new. It can involve translation from another setting, of existing flow, or systematization of some existing good practices.</p><p>When existing evaluation tools, processes, methods, and systems are not enough to meet current challenges, you need to draw on innovations in evaluation.</p><p>Our organizing team had only 6 members. Think for a moment that 100+ participants, 2800+complex queries to check with the most optimized ones, and a number of new functions used in each query to markdown within 5 days. In these challenging days, I created one simple Evaluation sheet which made our evaluation easy and feasible.</p><h3>Evaluation Criteria</h3><p>We have taken the following criteria for the evaluation of the hackathon.</p><ul><li>Completion of all given queries</li><li>Generation of correct output</li><li>Query Optimization</li><li>New Functions</li><li>Extra queries apart from the given ones</li><li>Trello board (Agile methodology)</li><li>Documentation &amp; Presentation</li></ul><p>We have used relational marking for each criterion to make it fair for all participating teams. This evaluation sheet has all formulas set for required rows and columns.</p><p>Here is a glimpse of my creation of a simple evaluation sheet…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*rxDJug3cAMbpt6cM.png" /><figcaption>Mandatory Questions</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*YDMGtAxmaVCQyNam.png" /><figcaption>Extra Queries</figcaption></figure><p>Finally, with the help of the evaluation sheet, we have all team’s performance results in our hands and it’s time to present. I have created an interactive dashboard in Tableau using action filter parameters that contain,</p><ul><li>Team number series: selecting a team number will display everything about that particular team with their team’s name.</li><li>Horizontal bar Chart: it gives a count of each criterion for the selected team.</li><li>Donut charts: It displays points for each criterion score by the selected team.</li></ul><p>Out of 1000 points, the total point score by each team will decide their position in the hackathon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*pJBXp7rZLiokd8qB.gif" /><figcaption>Interactive Dashboard</figcaption></figure><p>Organizing a hackathon isn’t an easy feat, but the efforts you put into arranging and hosting the event will be worth it when you see how the event turns out. I hope the above ideas and resources are useful for you as you approach the different Hackathon Challenges. Please feel free to reach out to me with any further questions.</p><p>Let’s share if you come across any resources that would be helpful for other organizers while doing this challenging work. Let’s build knowledge about how to do evaluations better together.</p><p>Thanks to the organizing team and all the participants who trusted us and made this journey memorable.</p><p>Special thanks to my backbone organizers <a href="https://medium.com/u/7b4733c024e8">Durgalakshmi Penugonda</a> and @<a href="https://medium.com/u/8b803e2793d">V Ramasita</a> for being there day and night with me.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aab40208e30" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Types of KEYS in DBMS(Database Management)]]></title>
            <link>https://medium.com/@kavar.krishna/types-of-keys-in-dbms-database-management-25c725cb5bbf?source=rss-89c2cea159f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/25c725cb5bbf</guid>
            <dc:creator><![CDATA[Krishna Vidja]]></dc:creator>
            <pubDate>Sat, 30 Jul 2022 04:22:18 GMT</pubDate>
            <atom:updated>2022-07-31T02:14:05.495Z</atom:updated>
            <content:encoded><![CDATA[<h3>Types of KEYS in DBMS</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*Pu_0waL6NzV85QFG6yz0cg.png" /></figure><p>Most of us have come across various articles or documents that explain different types of DBMS keys. It always seems confusing as all keys are related to each other almost similar with slight differences which make it difficult to have a clear understanding. For that reason, I have prepared this article with simple explanations with examples, which also helps while preparing for designing your DBMS system efficiently.</p><h3>Table of Contents</h3><ul><li>What are the Keys in DBMS?</li><li>Why do we need Keys in DBMS?</li><li>Types of Keys in DBMS</li></ul><ol><li>Super key</li></ol><p>2. Candidate key</p><p>3. Primary key</p><p>4. Alternate key</p><p>5. Foreign key</p><p>6. Composite key</p><p>7. Surrogate key</p><h3>What is Key in DBMS?</h3><p>A key in DBMS is an attribute or a set of attributes that help to uniquely identify a row in a table (or in relation to another table). A row is sometimes also referred to as a record or a tuple. An attribute is a column in the table. Keys are also used to establish relationships between the different tables. Many times, keys are used to speed up access to a large database table. A value in the key field of a table is called a key value.</p><h3>Why do we need Keys in DBMS?</h3><p>We know that there are countless data in the real world. For storing the data in DBMS, a large number of tables are required. These tables may contain thousands of duplicates, sorted, and unsorted records. Now, to fetch any particular or specific record, without any constraints/ restrictions from these tables is a very difficult process. To overcome all the difficulties, a new concept of Keys arose. Keys ensure that there are no rows with duplicate records in a table.</p><h3>Types of Keys in DBMS</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*SunA7HV8V-lXgT9dJqbMWg.png" /></figure><ol><li>Super Key</li><li>Candidate Key</li><li>Primary Key</li><li>Alternate Key</li><li>Foreign Key</li><li>Composite Key</li><li>Surrogate Key</li></ol><p>For our understanding, I am going to consider the following table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*IInLbD9eZbnHfZQOMszAzQ.png" /></figure><h3>1. Super Key</h3><p>Super Key is a single attribute or combination of attributes that can be used to uniquely identify a row in a table. A single table can have multiple super keys. A candidate key and primary key can be a super key, but the reverse does not hold true.</p><p>Example:</p><p>In the above Order Table, we have chosen the Order ID, Customer ID, and Customer Contact ID to uniquely identify tuples. So, the super key set can be as follows:</p><ul><li>[Order ID]</li><li>[Customer ID]</li><li>[Customer Contact ID]</li><li>[Order ID, Customer ID]</li><li>[Customer Contact ID, Order ID]</li><li>[Customer ID, Customer Contact ID]</li><li>[Order ID, Customer ID, Customer Contact ID]</li></ul><p>Note: You may decide to use these keys along with other attributes to identify a particular row. <em>Example: </em>[Order ID, Order Date], [Customer ID, Product ID, Product Name], etc. However, in the above example same [Order Date] or [Product ID] and [Product Name] can be used by multiple order entries. So, it doesn’t make sense to use them as Super Keys.</p><h3>2. Candidate Key</h3><p>Candidate Keys are those attributes that uniquely identify rows of a table. The primary key of a table is decided based on one of the candidate keys. So, candidate keys have the same properties as the primary keys.</p><ul><li>A single table can have multiple candidate keys.</li><li>Unique values must be present in all columns, chosen as candidate keys.</li><li>They don’t contain any redundant attributes — in our Order Table example, we don’t specify [Order ID, Order Date]as a candidate key.</li></ul><p>Example:</p><p>[Order ID], [Customer ID], and [Customer Contact ID] can be chosen as the candidate keys from the Order Table.</p><p>Real-Life Examples:</p><ul><li>SSN</li><li>PAN No</li><li>Account No</li><li>Passport No</li></ul><h3>3. Primary Key</h3><p>The Primary Key is an attribute that can uniquely identify a table. A table can have only one primary key. Out of all the chosen candidate keys, one of the keys should be selected as the primary key.</p><ul><li>Unique values must be present in a column, chosen as a primary key.</li><li>A single table can have only one primary key.</li><li>No NULL value must be present in the column chosen as a primary key.</li><li>A new row cannot be inserted with an existing primary key.</li><li>Every primary key is the candidate key, but a candidate key may or may not be a primary key.</li></ul><p>Example:</p><p>[Order ID], [Customer ID], and [Customer Contact ID] can be chosen as the candidate keys from the Order Table. Any one of them can be chosen as a Primary key.</p><h3>4. Alternate Key</h3><p>All the candidate keys which are not selected as primary keys are known as the Alternate Key.</p><ul><li>Unique values must be present in all columns, chosen as an alternate key.</li><li>The alternate key is a part of the candidate key but is not connected to a primary key.</li><li>In case a table contains a single candidate key then it will be chosen as the primary key. In that case, there won’t be any alternate key.</li><li>Sometimes Secondary/Alternate key is required for the indexing, for better and faster searching.</li></ul><p>Example:</p><p>If the [Order ID] is selected as the Primary Key, then the [Customer ID]and the [Customer Contact ID] can be used as alternate keys.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*QarpYsYdtgXkJMvIL86lzw.png" /></figure><h3>5. Foreign Key</h3><p>Foreign Key is used to establish relationships between two tables.</p><ul><li>The relationship between two tables is known as referential integrity.</li><li>A single table can have multiple foreign keys.</li><li>A foreign key can have NULL values.</li><li>You can have duplicate values in foreign keys.</li><li>The table consisting of the foreign key is known as the CHILD table and the table that is referred to by the foreign key is called the PARENT table.</li></ul><p>Example:</p><p>[Student_ID] in the Student_Detail Table is referred to the [Student_ID] in the Student_Mark Table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*hgxxArN3BGK1jVJgFnvtmg.png" /></figure><h3>6. Composite Key</h3><p>As the name suggests a composite key is a combination of multiple columns that can uniquely identify tuples.</p><p>Sometimes single attribute fails to uniquely identify the rows/tuples in a table. However, when taken all together, they ensure uniqueness. The ‘concatenated key’ is another name for a composite key.</p><p>Real-Life Examples:</p><ol><li>Name (Sam Daniel Mccormick)</li></ol><ul><li>First_Name = Sam</li><li>Middle_Name = Daniel</li><li>Last_Name = Mccormick</li></ul><p>2. Vehicle License Number Plat (Georgia CDS7854)</p><ul><li>State_ID = Georgia</li><li>License Plat No. = CDS7854</li></ul><h3>7. Surrogate Key</h3><p>A Surrogate key is an artificial key that can distinctly identify every row in the table. It is unique, updatable, and can’t be NULL. Surrogate Keys of DBMS are allowed in certain cases when:</p><ul><li>The primary key is too big</li><li>Complicated Primary Key</li><li>Absence of key</li></ul><p>Example:</p><p>Below Anonymous Table doesn’t have any primary key. Thus, [SR_No.]is used as the Surrogate key. It is generated at the time of the insertion of the records in a table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*viRNSV04szfeHBnrjdAogg.png" /></figure><p>Real-Life Examples:</p><ul><li>Phone No.</li><li>Room No.</li><li>Batch No.</li></ul><p>I hope you find this blog informative and help to understand the concept of Keys in the DBMS world.</p><p>Thank You.</p><p>Appreciate your feedback and comment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25c725cb5bbf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>