<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: ranjit shah</title>
    <description>The latest articles on Forem by ranjit shah (@ranjitkshah).</description>
    <link>https://forem.com/ranjitkshah</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F464073%2Ffed048da-4389-43ba-ac3f-18967a530b1c.jpeg</url>
      <title>Forem: ranjit shah</title>
      <link>https://forem.com/ranjitkshah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ranjitkshah"/>
    <language>en</language>
    <item>
      <title>A Git beginner should learn these basic git commands</title>
      <dc:creator>ranjit shah</dc:creator>
      <pubDate>Thu, 19 Nov 2020 20:06:04 +0000</pubDate>
      <link>https://forem.com/ranjitkshah/a-git-beginner-should-learn-these-basic-commands-1ee5</link>
      <guid>https://forem.com/ranjitkshah/a-git-beginner-should-learn-these-basic-commands-1ee5</guid>
      <description>&lt;p&gt;Every developer at the beginning of his journey always faces issues with Git &amp;amp; GitHub and most organizations use Git as version control for their source code. In this blog, we will learn basic commands of git which are used by developers in their daily life.&lt;/p&gt;

&lt;p&gt;So, Lets Start&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Git Commands&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;to initialize a git repository
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;it adds the file to the staging. (adds the file to your project)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;it makes all the changes in the staging file on your local repository. (commits the changes in the file)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -m "&amp;lt;commit_message&amp;gt;"
ex:
git commit -m "first commit"

also, you can add and commit together by using this
git commit -a "first commit"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;command is used to upload local repository(local commits) content to a remote repository.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;same as push command "-u" here represents an upstream sign which means you can upload your local commits to selected remote/branch
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push -u &amp;lt;remote_name&amp;gt; &amp;lt;branch_name&amp;gt;
ex:
git push -u origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Don't use this command until you don't know its consequences.it forcibly pushes your local commits to the remote.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push -f
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;to update/fetch your local repository from remote ( your codebase now up to date with a remote repo)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git pull
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;to check all the branches
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;to change the branch or check out the branch
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git checkout &amp;lt;branch_name&amp;gt;
ex:
git checkout development
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;to cut new branch. always run this command from that branch you want to cut a new branch
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git checkout -b &amp;lt;new_branch_name&amp;gt;
ex:
git checkout -b newbranch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;it shows all the changing logs including ( commits, author, time, branch)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;to config git author which shows on remote repo who pushed the changes
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config user.name &amp;lt;git_username&amp;gt;
git config user.email &amp;lt;git_email&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;it shows the configuration list
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;to reset the changes in a specific branch
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reset
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;to merge changes with the specific branch. ( it merges changes on your local from remote )
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git merge &amp;lt;branch_name&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;it shows the remote URL of git on which remote repo it pushed or pulled
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;it sets the remote URL( from which you pull or update local with remote )
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote set-url &amp;lt;url_of_origin&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;in this file you add those file paths which you don't want to push on remote
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.gitignore
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;it reset a branch by 1 commit. means set back a branch by 1 commit. you can replace 1 by number (no. of commits revert)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reset --hard HEAD~1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;it rebases your branch with a named branch
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git rebase -i &amp;lt;branch&amp;gt;

for ex:
branch1: head
branch2: dev
git checkout dev
git rebase head

it looks like  head-&amp;gt;dev
now head added as a base in dev branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope, this blog helped you as a beginner. thank you for reading &lt;br&gt;
and all the best for the journey :)&lt;/p&gt;

</description>
      <category>github</category>
      <category>devops</category>
    </item>
    <item>
      <title>#2 DBMS ( FOR INTERVIEW PURPOSES )</title>
      <dc:creator>ranjit shah</dc:creator>
      <pubDate>Sun, 20 Sep 2020 14:35:53 +0000</pubDate>
      <link>https://forem.com/ranjitkshah/2-dbms-for-interview-purposes-7fh</link>
      <guid>https://forem.com/ranjitkshah/2-dbms-for-interview-purposes-7fh</guid>
      <description>&lt;p&gt;In this series of blogs, we will study all the database management ( DBMS ) topics for interview purposes. this blog gives you only the insights and working explanation of each topic, we will not go in-depth of the topic&lt;/p&gt;

&lt;p&gt;In the previous blog, we studied about Data structures and DBMS. So, now move on #2 topic&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;2) Difference Between Database and Database Management System?&lt;/strong&gt;
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Database :
&lt;/h2&gt;

&lt;p&gt;Database is a collection of well-organized data. In the database, data is stored in the form of tables and views, and these sets of data elements designed to store and manipulate data in the future.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Two type of Database&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Online transaction processing (OLTP)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;stores current data &amp;amp; used for transaction purpose ( stored in megabyte or gigabyte)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Online analysis processing (OLAP)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;stores historical data &amp;amp; used for analysis purpose ( stored in terabyte or petabyte )&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In a relational database, the structure of the table also known as &lt;strong&gt;schema&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  DBMS:
&lt;/h2&gt;

&lt;p&gt;DBMS is system software that is used to creating, managing, and retrieving data from the database as per the user requirement. it acts as an intermediator between user and database&lt;/p&gt;

&lt;p&gt;for more information about DBMS you can read the previous blog :&lt;br&gt;
Link :&lt;br&gt;
&lt;a href="https://dev.to/ranjitkshah/dbms-for-interview-purposes-2c0j"&gt;DBMS ( FOR INTERVIEW PURPOSES)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Examples of DBMS are MySQL, Oracle, PostgreSQL, etc.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;em&gt;Let's understand difference via example&lt;/em&gt;
&lt;/h4&gt;

&lt;p&gt;Excel is a database which can store your data but to extract the data you have to dig row by row manually&lt;/p&gt;

&lt;p&gt;similar to excel we have an oracle, MySQL that offers commands by which users can fetch any data as per the requirements.&lt;/p&gt;

&lt;h4&gt;
  
  
  MAIN MEMORY VS SECONDARY MEMORY
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Main memory is the primary memory or internal memory of the computer while secondary memory is the backup or auxiliary memory of the computer.&lt;/li&gt;
&lt;li&gt;Types of Main memory &amp;amp; Secondary memory&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LoFBFf6g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ulgofsrmvs5la2pngb2e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LoFBFf6g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ulgofsrmvs5la2pngb2e.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---1LenFaS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vswql07y6evunikvxvjm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---1LenFaS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vswql07y6evunikvxvjm.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Main memory is directly accessed by the processing unit whereas secondary memory cannot be. &lt;/li&gt;
&lt;li&gt;Main memory is both volatile &amp;amp; non-volatile whereas secondary memory is always non-volatile.&lt;/li&gt;
&lt;li&gt;Main memory holds the currently using data while secondary memory stores the substantial amount of data &amp;amp; information ( from 256gb to 1 terabyte ) &lt;/li&gt;
&lt;li&gt;Main Memory can be accessed by data buses while secondary memory is accessed by I/O channels&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Thank you for reading : )&lt;/p&gt;

</description>
      <category>database</category>
      <category>career</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>#1 DBMS ( FOR INTERVIEW  PURPOSES)</title>
      <dc:creator>ranjit shah</dc:creator>
      <pubDate>Sat, 05 Sep 2020 16:08:44 +0000</pubDate>
      <link>https://forem.com/ranjitkshah/dbms-for-interview-purposes-2c0j</link>
      <guid>https://forem.com/ranjitkshah/dbms-for-interview-purposes-2c0j</guid>
      <description>&lt;p&gt;In this series of blog, we will study all the database management ( DBMS ) topics for interview purposes. this blog gives you only the insights and working explanation of each topic, we will not go in-depth of the topic &lt;/p&gt;

&lt;p&gt;so let's start with #1 Topic &lt;/p&gt;

&lt;h1&gt;
  
  
  1) What is DBMS? How it is Different from Data Structures.
&lt;/h1&gt;

&lt;h2&gt;
  
  
  DBMS
&lt;/h2&gt;

&lt;p&gt;DBMS means Database Management System. DBMS is a software designed to store, retrieve, define, and manage data in a database.&lt;/p&gt;

&lt;p&gt;DBMS software mainly works as an interface between the end-user and the database.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yJ3jbDRl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8wxktlkan4jlfgsbb1z0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yJ3jbDRl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8wxktlkan4jlfgsbb1z0.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let see an example of how a company maintains a database. it contains files for employees, clients, products.&lt;/p&gt;

&lt;p&gt;The database is organized as these files:- &lt;/p&gt;

&lt;p&gt;1) EMPLOYEE file contains the employee details such as name, designation, salary, etc.&lt;/p&gt;

&lt;p&gt;2) CLIENT  file contains the client details such as user details, membership details, etc.&lt;/p&gt;

&lt;p&gt;3) PRODUCT file contains the product details such as product price, stock quantity, etc.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Types of DBMS&lt;/strong&gt;

&lt;ol&gt;
&lt;li&gt;Hierarchical database systems&lt;/li&gt;
&lt;li&gt;Network database systems&lt;/li&gt;
&lt;li&gt;Object-oriented database systems&lt;/li&gt;
&lt;li&gt;No-SQL or non-relational database systems&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  DATA STRUCTURES :
&lt;/h2&gt;

&lt;p&gt;Data structures are a way of organizing data in the computer memory in an efficient way by using optimal time and space complexity. using proper data structure will speed up the performance of the software&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Types of Data structures :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Linear&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Array&lt;/p&gt;

&lt;p&gt;Linked list&lt;/p&gt;

&lt;p&gt;Stack&lt;/p&gt;

&lt;p&gt;Queue&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Non-linear&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Tree&lt;/p&gt;

&lt;p&gt;Binary-tree&lt;/p&gt;

&lt;p&gt;Graph&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  DBMS VS DATA STRUCTURES
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;By definition, you can understand DBMS used for storing and accessing data while data structure is used for managing and organizing data in an optimal way&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DBMS stores data in permanent memory. Data structure stores data in temporary memory ( It is alive till the program is alive )&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;let's understand by example :&lt;br&gt;
we are running a company and have a list of employees. for storing a list of employees we use DBMS and for searching data of the specific employee, we use a data-structures so that it performs in an optimal way.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;thank you for reading : )&lt;/p&gt;

</description>
      <category>database</category>
      <category>computerscience</category>
      <category>career</category>
    </item>
  </channel>
</rss>
