<?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 Savindubandarigodage on Medium]]></title>
        <description><![CDATA[Stories by Savindubandarigodage on Medium]]></description>
        <link>https://medium.com/@savindubandarigoda?source=rss-beac968c9dbb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*etNYtupNuBbCvx-klKjvOQ.png</url>
            <title>Stories by Savindubandarigodage on Medium</title>
            <link>https://medium.com/@savindubandarigoda?source=rss-beac968c9dbb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 10:55:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@savindubandarigoda/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[Keys and their Types in DBMS]]></title>
            <link>https://medium.com/@savindubandarigoda/keys-and-their-types-in-dbms-b0abd0bb92df?source=rss-beac968c9dbb------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0abd0bb92df</guid>
            <category><![CDATA[dbms]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[keys-in-dbms]]></category>
            <category><![CDATA[types-of-keys-in-dbms]]></category>
            <dc:creator><![CDATA[Savindubandarigodage]]></dc:creator>
            <pubDate>Fri, 29 Sep 2023 06:11:09 GMT</pubDate>
            <atom:updated>2023-09-29T06:11:09.518Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EoTKsCGS3zQUzHV9Cyyklw.jpeg" /></figure><p>In the intricate realm of Database Management Systems (DBMS), keys serve as the fundamental building blocks that unlock the door to efficient data organization and retrieval. Understanding the various types of keys and their pivotal roles is essential for anyone navigating the world of databases. In this blog post, we’ll embark on a journey to explore the significance of keys in DBMS, shedding light on primary keys, foreign keys, and their critical functions in ensuring data integrity and relationships within a database. Whether you’re a seasoned database administrator or just starting your database journey, this guide will provide valuable insights into the key concepts of keys in DBMS.</p><p>Most students tend to get confused with the different types of keys, but I have got you covered! In this blog, we will be discussing everything you need to know about Keys. With my last blog post I discuss the topic about <a href="https://medium.com/@savindubandarigoda/dbms-vs-rdbms-5fcd4f562cdf">DBMS vs RDBMS</a>, You can check it also.</p><p>Before understanding Keys, we should be thoroughly familiar with the following terminologies,</p><p><strong>Entity — </strong>An entity can be a person, place, object, or a concept that is distinguishable from other entities, and about which we can store data in a database.</p><p><strong>Database — </strong>A database is an organized and self-described collection of data about the entities related to an organization. It is usually controlled by a DBMS.</p><p>A simple example of a database is a College database that stores information related to students, faculty, staff, and courses .</p><p>DBMS( Database Management System) is a software that consists of a collection of databases and related programs to create, manipulate, and display a database’s structure and content. It acts as a bridge between the user and the database, allowing users to,</p><p><strong>1.create</strong></p><p><strong>2.read</strong></p><p><strong>3.update</strong></p><p><strong>4.delete</strong></p><p>data in a database.</p><p>Examples of some popular DBMSs are <strong>MySQL, Microsoft Access, FoxPro, dBase, etc.</strong></p><p><strong>Attribute — </strong>Attribute refers to a group of elementary data that describes the characteristics of an entity.</p><p>For example, <strong>the student</strong> is an entity, and <strong>name</strong>, <strong>ID</strong>, <strong>registration number</strong>, <strong>section</strong>,<strong> and roll number</strong> are the different attributes of the <strong>student </strong>entity.</p><p><strong>Tuple — </strong>Any record or horizontal collection of data in a table or relation is called a tuple. A tuple is also known as a Record or Row.</p><h3>Keys</h3><p>A key is an attribute or set of attributes that help to uniquely identify a record or a row of data in a table(relation).</p><blockquote>Why do we need Keys?</blockquote><ol><li>Keys are used to establish and identify relationships between tables/relations.</li><li>They uniquely identify any record/row inside a table/relation.</li><li>They also ensure that data integrity is maintained.</li></ol><blockquote>Types of keys</blockquote><p>The different types of keys in DBMS/RDBMS are,</p><ol><li><strong>Super Key</strong></li><li><strong>Candidate Key</strong></li><li><strong>Primary Key</strong></li><li><strong>Alternate Key</strong></li><li><strong>Foreign Key</strong></li></ol><p>To understand the different types of keys better, let us consider the below table. In this <strong>‘Student’</strong> table, <strong>ID</strong>, <strong>Registration_No,</strong> and <strong>Name</strong> of students are given.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*X20FCTE3T8uk-jGmk4VDHA.png" /></figure><blockquote><strong>Super Key</strong></blockquote><p>If a set of one or more attributes can uniquely identify the entities of an entity set, then it is called a super key.</p><p>Example: In the above table the super keys are</p><p><strong>{ ID } , {Registration_No.} , { ID, Registration_No.} , {ID, Name} , {Registration_No. ,Name} , {ID, Registration_No., Name}</strong></p><p>#Important<strong> — {Name}</strong> is not a super key as there is more than one record/row with the same name.</p><blockquote><strong>Candidate Key</strong></blockquote><p>Candidate keys are selected from a set of super keys. If a super key has no unnecessary attributes, then such a minimal super key is called a candidate key. It is also termed as ‘Minimal Super Key’.</p><p>Example: In the student entity set <strong>{ID}</strong>, <strong>{Registration_No.}</strong>, <strong>{ID, Registration_No.}</strong> etc. are candidate keys. But<strong> {ID, Name}</strong> is not a candidate key, because<strong> {Name}</strong> is a redundant attribute.</p><blockquote><strong>Primary Key</strong></blockquote><p>Primary keys are selected from a set of candidate keys. It is a candidate key selected by the database designer to uniquely identify the records of a table.</p><ul><li>The primary key field of a table must be unique and cannot be null.</li><li>A table does not contain more than one primary key.</li></ul><blockquote><strong>Alternate Key</strong></blockquote><p>If a candidate key is not selected as a primary key then it is called an alternate key.</p><p>Example: If <strong>{ID}</strong> is selected as primary key, then <strong>{Registration_No.}</strong> can be selected as an alternate key</p><blockquote><strong>Foreign Key</strong></blockquote><p>If two relations or tables have a common attribute, which is the primary key in one table and a non-key attribute in another table, then such a non-key attribute is called a foreign key.</p><ul><li>A table can contain zero or more foreign keys.</li><li>It helps to combine the tuples of two tables during the join operation.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*09QWv0lAooiyzWzy7DT3Wg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*vnzd_rPOr32xlNQFElDDqg.png" /></figure><p>In the above table, <strong>{ID}</strong> is the primary key in <strong>‘Student’</strong> Table, but foreign key in the <strong>‘Marks’</strong> Table.</p><p>In this blog, we discussed Keys in DBMS. We saw why it is important in DBMS and also the different types of keys present. I hope you learned something new in this blog. If this blog interested to you, please share it with your friends. See you in the next blog &gt;&gt;</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0abd0bb92df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DBMS vs RDBMS]]></title>
            <link>https://medium.com/@savindubandarigoda/dbms-vs-rdbms-5fcd4f562cdf?source=rss-beac968c9dbb------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fcd4f562cdf</guid>
            <dc:creator><![CDATA[Savindubandarigodage]]></dc:creator>
            <pubDate>Wed, 16 Aug 2023 13:23:07 GMT</pubDate>
            <atom:updated>2023-08-16T13:23:07.328Z</atom:updated>
            <content:encoded><![CDATA[<p>In this blog section we will learn about the difference between DBMS and RDBMS. Although they sound to be similar, they have many differences.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*HBdAtsDLfn_bmE5Ew6w1aA.png" /></figure><blockquote><strong>Overview of DBMS and RDBMS</strong></blockquote><p>These databases are responsible for maintaining and managing a set of data. A structured format for the data is kept in the database. This makes it much easier for the database to manage, store, and retrieve data whenever necessary.</p><p>Over time, databases have proven to be essential solutions for all data storage needs, and they have since developed to offer a more reliable method of managing data. RDBMS and DBMS were introduced in this situation.</p><blockquote><strong>Database Management System (DBMS)</strong></blockquote><p>DBMS stands for database management systems, and it is specifically designed to store, manage, define, and retrieve data in a database. It primarily acts as an interface between the database and the end-user. At the same time, the software is able to manage the data, the database engine, and the database schema, making it easy to organize and manipulate the data stored in the database. There are several functions of DBMS,</p><blockquote><em>Functions of DBMS</em></blockquote><ol><li>It must give facility for defining the database structure also specifies access rights to authorized users.</li><li>The DBMS must-have functions like insertion of record into database updating of data, deletion of data, retrieval of data.</li><li>The DBMS must share data items for multiple users by maintaining consistency of data.</li><li>It must protect the database against unauthorized users.</li><li>If for any reason the system fails DBMS must facilitate database recovery.</li></ol><p>This is an University database example for DBMS,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z05e_me8Zr0WByK0ACahrw.png" /></figure><blockquote><strong>Relational Database Management System (RDBMS)</strong></blockquote><p>RDBMS stands for Relational Database Management System. It is an information management system that is oriented on a data model. Here all the information is properly stored as tables. RDBMS Example systems are SQL Server, Oracle, MySQL, MariaDB, and SQLite.</p><p>A relational database management system (RDBMS) is a database management system (DBMS) that uses relational techniques for storing and retrieving data. And also it is based on the relational model, which organizes data into rows and columns in tables.</p><blockquote><em>Advantages of RDBMS</em></blockquote><ul><li>Data is only stored once so multiple documentation changes are not required</li><li>Better safety measures</li><li>The table arrangement is straightforward and simple for database users to appreciate and use.</li><li>RDBMSs permit numerous database users to admittance a database concurrently.</li><li>RDBMS agree with the database manager to limit admission to certified users, and gift rights to entity users depending on the kinds of database work they do.</li><li>RDBMSs offer admission to the database via a server daemon, a dedicated software program that responds to requirements on a set of connections, and enables database users to connect and make use of the database.</li><li>RDBMSs feature safeguarding supply database managers with tools to without difficulty preserve analysis, revamp, and back up the data centers.</li><li>RDBMSs support SQL language.</li></ul><p>Now, lets us jump to the next section which is DBMS vs RDBMS,</p><blockquote><strong>Difference between DBMS and RDBMS</strong></blockquote><p>An RDBMS is a type of database management system (DBMS) that stores data in a row-based table structure which connects related data elements. An RDBMS includes functions that maintain the security, accuracy, integrity and consistency of the data. This is different than the file storage used in a DBMS. There are many differences in the DBMS vs RDBMS,</p><p><em>DBMS stores data as a file, while RDBMS stores data in the form of tables.</em></p><p><em>The DBMS only supports a single user, while the RDBMS supports multiple users.</em></p><p><em>The DBMS stores data which are not related to each other, while in the RDBMS, Data stored in tables are related via foreign keys.</em></p><p><em>In DBMS, Data fetching is slower for the complex and larger volumes of data, while in RDBMS, Data fetching is rapid because of the relational approach.</em></p><p><em>The DBMS does not support normalization, but the RDMS supports normalization.</em></p><p><em>The DBMS has no security, while the RDBMS has multiple levels of security.</em></p><p><em>Examples of RDBMS are File System, XML, MS Access and Window Registry.</em></p><p><em>Examples of RDBMS are My SQL, PostgreSQL, Oracle and SQL Server.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ly3ly1yGM4_40dkOepo10A.jpeg" /></figure><blockquote>Conclusion</blockquote><h4>After the brief discussion, this blog has tried to explore the difference between DBMS and RDBMS. Although both are used to store data in physical databases, there are some critical differences between them. However, there are several software products available today, which are compatible with both types.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fcd4f562cdf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>