<?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 Himantha Kaushalya on Medium]]></title>
        <description><![CDATA[Stories by Himantha Kaushalya on Medium]]></description>
        <link>https://medium.com/@plghkhimantha?source=rss-1db4dd297d32------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*FP5UGd3RmcufrfSl</url>
            <title>Stories by Himantha Kaushalya on Medium</title>
            <link>https://medium.com/@plghkhimantha?source=rss-1db4dd297d32------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 10:28:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@plghkhimantha/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 in DBMS]]></title>
            <link>https://medium.com/@plghkhimantha/keys-in-dbms-b6f48c8e9823?source=rss-1db4dd297d32------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6f48c8e9823</guid>
            <dc:creator><![CDATA[Himantha Kaushalya]]></dc:creator>
            <pubDate>Sun, 01 Oct 2023 17:15:10 GMT</pubDate>
            <atom:updated>2023-10-01T17:15:10.058Z</atom:updated>
            <content:encoded><![CDATA[<p>In a database management system (DBMS), keys are used to identify and establish relationships between data in database tables. They play a crucial role in ensuring data integrity, uniqueness, and efficient retrieval.</p><p>These keys are fundamental for maintaining data accuracy, enabling efficient data retrieval and manipulation, and ensuring data relationships are correctly established and maintained. Their proper use is essential for designing and managing effective database systems.</p><h3><strong>uses of keys</strong></h3><ol><li>Uniqueness Enforcement:</li></ol><ul><li>Primary keys and unique keys ensure that each row in a table has a unique value in the specified key column(s). This prevents duplicate records and enforces data integrity.</li></ul><p>2. Data Retrieval:</p><ul><li>Keys, particularly primary keys, are used to quickly locate and retrieve specific records in a table. Indexes are often built on key columns to improve query performance.</li></ul><p>3. Relationships Between Tables:</p><ul><li>Foreign keys are used to establish relationships between tables. They ensure that values in a column of one table match values in the primary key column of another table, enforcing referential integrity.</li></ul><p>4. Data Consistency:</p><ul><li>Foreign keys help maintain data consistency by ensuring that related data in different tables remains synchronized. They prevent actions that would leave orphaned or disconnected data.</li></ul><p>5. Joins and Querying:</p><ul><li>Keys, especially primary keys and foreign keys, are used in SQL queries to join tables together based on related columns. This allows for complex data retrieval and reporting.</li></ul><h3>Types of keys</h3><p><em>In database management systems (DBMS), there are several types of keys used to manage and organize data. The choice of which key to use depends on the specific requirements of the database schema and the nature of the data being stored.</em></p><p><em>These seven types of keys are essential components of database design, ensuring data integrity, enabling relationships between tables, and facilitating efficient data retrieval and management.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*oOnk7Slqq8fGJREXMOFKUw.jpeg" /><figcaption>7 types of keys</figcaption></figure><ol><li><strong>Candidate key</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*BKomnjRHlGpN_PsPYloh_A.jpeg" /></figure><p>In database management systems, a candidate key is a set of one or more attributes (columns) within a relation (table) that can uniquely identify each tuple (row) in that relation.</p><p>Candidate keys are important in the process of designing a database schema because they serve as potential choices for the primary key.</p><p><strong><em>Here are some key points about candidate keys.</em></strong></p><ol><li>Uniqueness:</li></ol><p>A candidate key must guarantee the uniqueness of its values across all rows in the table. This means that no two rows can have the same combination of values for the attributes that make up the candidate key.</p><p>2. Minimality:</p><p>Candidate keys should be minimal, meaning that no proper subset (a subset that excludes at least one attribute) of the candidate key attributes can uniquely identify rows in the table. Removing any attribute from a candidate key should result in a loss of uniqueness.</p><p>3. Primary Key Selection:</p><p>From the set of candidate keys, one is chosen as the primary key for the table. The primary key becomes the official means of uniquely identifying rows within the table, and any remaining candidate keys are referred to as alternate keys.</p><p>4. Multiple Candidate Keys:</p><p>It is possible for a table to have multiple candidate keys if there are different sets of attributes that can uniquely identify rows. In such cases, any of the candidate keys can be selected as the primary key.</p><p>5. Data Semantics:</p><p>The selection of the primary key, typically from the candidate keys, often depends on factors such as data semantics, efficiency, and simplicity. You may choose a candidate key that is most meaningful or one that performs well as an index.</p><p><strong>2. primary key</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9mExGgtyiPHon6l4HQ464w.jpeg" /></figure><p>A primary key is a special type of key that is used to uniquely identify each record (row) in a table.</p><p>It serves as a fundamental concept in database design and plays a crucial role in maintaining data integrity and enabling efficient data retrieval.</p><p><strong><em>Here are some key points about primary keys.</em></strong></p><ol><li>Uniqueness:</li></ol><p>A primary key enforces the uniqueness constraint, ensuring that each value in the primary key column (or set of columns) is unique across all records in the table. This means that no two rows can have the same primary key value.</p><p>2. Non-nullability:</p><p>A primary key column cannot contain null values. Every record in the table must have a valid and unique primary key value.</p><p>3. Identifier:</p><p>The primary key is the primary means of identifying and differentiating records within the table. It provides a unique identifier for each row.</p><p>4. Data Integrity:</p><p>By ensuring uniqueness and non-nullability, the primary key helps maintain the integrity of the data in the table, preventing duplicate or incomplete records.</p><p>5. Indexing:</p><p>DBMS systems often automatically create an index on the primary key column(s). This index greatly improves the speed of searching, sorting, and retrieving data from the table.</p><p><strong>3. unique keys</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*9_20ELmicvNld_OWiYmsoQ.jpeg" /></figure><p>A unique key is a constraint that ensures the uniqueness of values within one or more columns in a table.</p><p>Unique keys are used to enforce data integrity rules, specifically regarding the uniqueness of data in a particular column or combination of columns.</p><p><strong><em>Here are some key points about unique keys.</em></strong></p><ol><li>Uniqueness Constraint:</li></ol><p>Unique keys ensure that the values in the specified column(s) or combination of columns are unique across all rows in the table. This means that no two rows can have the same values for the unique key column(s).</p><p>2. Null Values:</p><p>Like primary keys, unique keys typically do not allow null values in the constrained columns. However, some DBMS systems may allow one null value since it does not violate the uniqueness constraint itself.</p><p>3. Usage:</p><p>Unique keys are used to enforce data integrity rules when you want to ensure that certain attributes in a table have distinct values. They are not necessarily used as primary identifiers for records, as primary keys are, but they are still important for data quality.</p><p>4. Multiple Unique Keys:</p><p>A table can have multiple unique keys, meaning you can enforce uniqueness on different sets of columns within the same table. Each unique key operates independently of the others.</p><p>5. Indexing:</p><p>DBMS systems often automatically create indexes on columns with unique keys. These indexes help improve the performance of data retrieval operations, such as searching and sorting, involving the unique key columns.</p><p><strong>4. Alternate keys</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mM5Ieq_hVaMrqDAvCF-efQ.jpeg" /></figure><p>Alternate keys in a DBMS are attributes or combinations of attributes in a table that could serve as primary keys but are not selected as such.</p><p>They enforce uniqueness and contribute to data integrity. While the primary key is chosen as the primary means of identifying records, alternate keys provide additional options for ensuring the uniqueness of specific attributes within the table.</p><p><strong><em>Here are some key points about alternate keys.</em></strong></p><ol><li>Consideration for Primary Key:</li></ol><p>Alternate keys are strong candidates for the primary key but are not chosen for various reasons, such as data semantics, efficiency, or simplicity. The primary key is typically selected from among the available alternate keys.</p><p>2. Data Integrity:</p><p>Alternate keys contribute to data integrity by preventing duplicate or non-unique data entries within the constrained columns. They help maintain the accuracy and consistency of the data.</p><p>3. Indexing:</p><p>In many DBMS systems, indexes may automatically be created on columns associated with alternate keys. This can improve the performance of queries that involve these columns.</p><p>4. Multiple Alternate Keys:</p><p>A table can have multiple alternate keys if there are different sets of attributes that could potentially serve as unique identifiers. Each alternate key operates independently of the others.</p><p>5. Relationships:</p><p>Alternate keys can also play a role in establishing relationships between tables. In a one-to-one or one-to-many relationship, an alternate key in one table may be referenced by a foreign key in another table to establish the relationship.</p><p><strong>5. Composite key</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0tCMXf6Sjqs5m59WnfDBOQ.jpeg" /></figure><p>A composite key is a type of key that consists of two or more columns (attributes) in a table, used together to uniquely identify each record (row) in that table.</p><p>Composite keys are used when a single column cannot guarantee uniqueness on its own, but the combination of multiple columns does.</p><p><strong><em>Here are some key points about composite keys.</em></strong></p><ol><li>Uniqueness Constraint:</li></ol><p>A composite key enforces the uniqueness constraint, ensuring that the combination of values in the specified columns is unique across all rows in the table. This means that no two rows can have the same combination of values for the composite key columns.</p><p>2. Combination of Attributes:</p><p>Composite keys are created by specifying two or more attributes as the key, typically enclosed within parentheses. For example, a composite key could be (EmployeeID, DepartmentID) in a table that records employee assignments.</p><p>3. Null Values:</p><p>Composite keys may or may not allow null values, depending on the database design. It is common for composite keys to allow null values in some of the constituent columns, but this depends on the specific requirements.</p><p>4. Primary Key or Alternate Key:</p><p>A composite key can serve as either the primary key (the main means of uniquely identifying records) or an alternate key (an additional unique identifier). The choice depends on the database designer’s decisions and the data’s characteristics.</p><p>5. Indexing:</p><p>DBMS systems often create indexes on composite key columns to improve the performance of data retrieval operations. These indexes allow for efficient searching and sorting based on the composite key.</p><p><strong>6. Super key</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vIosnEzHJ-8nzIARsXMzpw.jpeg" /></figure><p>A super key in a DBMS is a set of one or more attributes that can be used to uniquely identify records within a table.</p><p>It is a broader concept than candidate keys or primary keys and is mainly used for theoretical purposes and during the normalization process to ensure data integrity and eliminate redundancy in a database schema.</p><p><strong><em>Here are some key points about super keys.</em></strong></p><ol><li>Use Cases:</li></ol><p>Super keys are mainly used for theoretical and conceptual purposes in database design. They help in understanding the potential keys in a table and are essential in the normalization process to eliminate redundancy and ensure data integrity.</p><p>2. Efficiency:</p><p>While super keys provide a theoretical framework for understanding key attributes, they may not always be the most efficient choice for indexing and querying. In practice, primary keys and indexed attributes are used for optimal performance.</p><p>3. Uniqueness:</p><p>A super key enforces the uniqueness constraint, meaning that the combination of attribute values within the super key must be unique across all rows in the table.</p><p>4. Attributes:</p><p>A super key can include one or more attributes from the table. It may consist of a single attribute or a combination of attributes.</p><p>5. Minimality:</p><p>A super key can be minimal or non-minimal. A minimal super key is one in which no attribute can be removed while preserving uniqueness. Non-minimal super keys may include additional attributes that are not strictly necessary for uniqueness.</p><p><strong>7.Foreign key</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AUK64I5O8I3zuCWjcF1K6Q.jpeg" /></figure><p>Foreign keys in a DBMS are columns or sets of columns in one table that reference the primary key of another table.</p><p>They establish relationships between tables, enforce referential integrity, and are essential for maintaining data consistency in relational databases.</p><p><strong><em>Here are some key points about foreign keys.</em></strong></p><ol><li>Uniqueness Constraint:</li></ol><p>The values in the foreign key column(s) of the child table must match values in the primary key column(s) of the parent table. This ensures that the relationship is based on unique identifiers.</p><p>2. Actions on Update and Delete:</p><p>When records are updated or deleted in the parent table, foreign key constraints can specify actions to take in the child table. Common actions include cascading updates or deletes, setting null values, or restricting the operation.</p><p>3. Multiple Foreign Keys:</p><p>A table can have multiple foreign keys that reference different parent tables or the same parent table multiple times. Each foreign key establishes a different relationship.</p><p>4. Data Integrity and Consistency:</p><p>Foreign keys play a crucial role in maintaining data integrity and ensuring that the database contains consistent and accurate data.</p><p>5. Querying and Joins:</p><p>Foreign keys are used in SQL queries to join tables together based on related columns. This allows for the retrieval of data from multiple related tables efficiently.</p><p><em>These keys are fundamental to database design and management, playing various roles in ensuring data integrity, establishing relationships, and optimizing data retrieval. The choice of which key to use depends on the specific requirements of the database schema and the nature of the data being stored.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6f48c8e9823" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Modern Data Solutions.]]></title>
            <link>https://medium.com/@plghkhimantha/modern-data-solutions-f803df749eda?source=rss-1db4dd297d32------2</link>
            <guid isPermaLink="false">https://medium.com/p/f803df749eda</guid>
            <dc:creator><![CDATA[Himantha Kaushalya]]></dc:creator>
            <pubDate>Wed, 16 Aug 2023 09:03:32 GMT</pubDate>
            <atom:updated>2023-08-16T09:03:32.267Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In the world of data management, choosing the appropriate system for storing, retrieving, and managing data is crucial. Two prominent contenders in this space are Database Management Systems (DBMS) and Relational Database Management Systems (RDBMS). While these terms are often used interchangeably, they represent distinct approaches to handling data. In this article, we’ll dive into the differences between DBMS and RDBMS, shedding light on their key features, use cases, and the related topic of modern data management solutions.These terms are often used interchangeably, but beneath the surface, they represent distinct paradigms in handling data. In this article, we will delve deep into the contrasts between DBMS and RDBMS, highlighting their unique attributes, use cases, and the considerations that can guide your decision-making process.</p><p><strong>Understanding DBMS</strong></p><p>A Database Management System (DBMS) is a software application designed to efficiently store, organize, retrieve, and manipulate data. It serves as an intermediary between users or applications and the physical storage of data. One of the key features of a DBMS is its ability to provide a structured framework for data management, allowing users to define the data’s schema, relationships, and access permissions. DBMS handles tasks such as data insertion, updating, and deletion, ensuring data consistency, security, and integrity. It offers a user-friendly interface for interacting with databases, enabling users to perform complex queries and transactions without needing to have in-depth knowledge of the underlying data structures or storage mechanisms. In essence, a DBMS simplifies data management by providing a centralized and organized repository for various types of data.</p><p><strong>Understanding RDBMS</strong></p><p>A Relational Database Management System (RDBMS) is a specialized subset of a Database Management System (DBMS) that adheres to the principles of the relational model of data proposed by Edgar F. Codd. In an RDBMS, data is structured into tables with rows representing individual records and columns representing attributes or fields. The power of an RDBMS lies in its ability to establish relationships between these tables using keys and enforce data integrity through constraints like primary keys, foreign keys, and unique constraints. This ensures that data is organized, consistent, and accurate. RDBMSs excel in scenarios where structured data and well-defined relationships are paramount, making them particularly suitable for applications such as accounting systems, customer databases, and other situations where data integrity is crucial.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*YHz9OILVSM0TOv_dKqJ_LQ.jpeg" /></figure><p><strong>Key Differences</strong></p><p>1. <strong>Data Structure:</strong></p><p>· DBMS allows for more flexible data storage, accommodating various data types and structures.</p><p>· RDBMS enforces a rigid structure with predefined tables, columns, and relationships.</p><p>2. <strong>Data Integrity:</strong></p><p>· DBMS does not prioritize enforcing relationships or constraints, allowing for more relaxed data integrity.</p><p>· RDBMS enforces referential integrity through primary key and foreign key relationships, ensuring data accuracy and consistency.</p><p>3. <strong>Scalability:</strong></p><p>· DBMS can be more easily scaled horizontally, making it suitable for handling large volumes of unstructured data.</p><p>· RDBMS can be vertically scaled for specific workloads but might face challenges when dealing with extremely large datasets.</p><p><strong>DBMS Use Cases:</strong></p><ul><li>Content Management Systems (CMS)</li><li>Document Management Systems</li><li>Data Warehousing for unstructured and semi-structured data</li></ul><p><strong>RDBMS Use Cases:</strong></p><ul><li>Financial Systems (e.g., accounting, payroll)</li><li>Customer Relationship Management (CRM) systems</li><li>E-commerce platforms (product catalog, order management)</li></ul><p><strong>Modern Data Management Solutions</strong></p><p>As technology evolves, so do the requirements for data management. Today’s data-intensive applications demand more than what traditional DBMS and RDBMS can offer. This has led to the emergence of modern data management solutions that combine the strengths of both approaches while addressing their limitations.</p><ul><li><strong>NoSQL Databases:</strong> NoSQL databases provide flexibility for handling diverse and massive datasets. They are suitable for applications requiring high-speed data processing, such as real-time analytics and IoT platforms.</li><li><strong>NewSQL Databases:</strong> NewSQL databases aim to combine the scalability of NoSQL with the relational model of RDBMS. They are designed to handle large datasets while maintaining the benefits of ACID transactions and relational querying.</li></ul><h4><strong>Conclusion</strong></h4><p>In the realm of data management, the choice between DBMS and RDBMS depends on the nature of the data and the requirements of the application. While DBMS offers flexibility and adaptability, RDBMS excels in enforcing data integrity and relationships. Modern data management solutions like NoSQL and NewSQL databases have further expanded the options available, catering to the evolving needs of today’s data-driven applications. By understanding the differences between these approaches and considering the related topic of modern solutions, businesses can make informed decisions to efficiently manage their data.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f803df749eda" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>