<?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 Hashan Kogul Yogendran on Medium]]></title>
        <description><![CDATA[Stories by Hashan Kogul Yogendran on Medium]]></description>
        <link>https://medium.com/@Hashan_Kogul?source=rss-f8f2da3eae67------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*IKbq4hlUpp8zFzMxkMCD3A.jpeg</url>
            <title>Stories by Hashan Kogul Yogendran on Medium</title>
            <link>https://medium.com/@Hashan_Kogul?source=rss-f8f2da3eae67------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 10:52:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Hashan_Kogul/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[Software Design Patterns]]></title>
            <link>https://medium.com/@Hashan_Kogul/software-design-patterns-b73d80cc177a?source=rss-f8f2da3eae67------2</link>
            <guid isPermaLink="false">https://medium.com/p/b73d80cc177a</guid>
            <dc:creator><![CDATA[Hashan Kogul Yogendran]]></dc:creator>
            <pubDate>Mon, 28 Aug 2023 13:55:41 GMT</pubDate>
            <atom:updated>2023-08-28T13:55:41.742Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*iGnDP3sJBudLXohCNuhXlA.png" /></figure><h3>Introduction</h3><blockquote><em>A Software Design Pattern is a general, reusable solution to a commonly occurring problem within a given context in software design.</em></blockquote><blockquote><em>It is not a finished design that can be transformed directly into source or machine code. Rather, it is a description or template for how to solve a problem that can be used in many different situations.</em></blockquote><blockquote><em>Design patterns are formalized best practices that the programmer can use to solve common problems when designing an application or system.</em></blockquote><blockquote>Design patterns are templates to solve common problems in Software engineering. They provide repeatable solutions, which you can apply to some of the common problems you come across.</blockquote><blockquote>Design patterns are not finished solution or a code or a class or a library that you can import in your project. They are a generic solution for solving a problem. Each project will have a slightly different way to solve it.</blockquote><h4>Why should you learn Design patterns?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*bAutYGHS3uSrubZPxwYl-Q.jpeg" /></figure><p>Why would you even consider learning Design patterns? You can write codes even without them. I can give you a few reasons why</p><ul><li><strong>Something you need to know to be a better Software Engineer</strong> — Design patterns can help you be a better Software Engineer. In computer programs, very often some of the complex problems can be solved easily and elegantly by the use of Design patterns. Just by knowing about the Design patterns and knowing how to apply one, you can save a lot of time and improve the overall quality of code you deliver. All of this will help us grow and become a better Software engineer.</li><li><strong>Solutions already exist</strong> — Most of the problems you might encounter in your life, writing codes are not new. There has already been a bunch of people who have seen that problem, worked on it for days and came up with a solution and most likely written about it somewhere. You can use their knowledge and experience. You do not need to build the solution from scratch. You only have to learn to identify them.</li><li><strong>Improve communication of idea using common vocabulary</strong> — You can easily convey your idea by just using the Design pattern name instead of describing all the technical details. It helps you in communicating the idea clearly.</li><li><strong>The standard way to solve a problem</strong> — Design patterns provide a tried and tested way to solve a problem. Using these tried and tested approach to solve a problem will speed up your overall development process. Using a design pattern in your project will also help you uncover issues which you might not have uncovered until very late had you not used it.</li><li><strong>Code readability</strong> — Design patterns also improves code readability amongst the people familiar with the Design patterns.</li></ul><h4>Types of Design Patterns</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*u3C-5IEYRBCQyge8c_Uf5g.png" /></figure><p><strong>1. Creational Patterns</strong></p><p>Creational patterns focus on object creation mechanisms, abstracting the instantiation process and promoting decoupling between clients and the types of objects they create. Let’s explore some prominent creational patterns:</p><ul><li><strong>Singleton Pattern</strong>: This pattern ensures a class has only one instance and provides a global point of access to that instance. It’s often used for settings, logging, and database connections.</li><li><strong>Factory Method Pattern</strong>: The factory method pattern defines an interface for creating objects but allows subclasses to decide which class to instantiate. This promotes flexibility and extensibility in object creation.</li><li><strong>Abstract Factory Pattern</strong>: Building on the factory method pattern, the abstract factory pattern provides an interface for creating families of related or dependent objects. It’s suitable for situations where multiple object types need to be created together.</li><li><strong>Builder Pattern</strong>: When constructing complex objects step by step, the builder pattern separates the construction process from the actual representation, allowing different representations to be created using the same construction process.</li><li><strong>Prototype Pattern</strong>: This pattern involves creating new objects by copying an existing object, known as the prototype. It’s useful when object creation is expensive, and multiple similar instances are required.</li></ul><p><strong>2. Structural Patterns</strong></p><p>Structural patterns focus on the composition of classes and objects to form larger structures while keeping these structures flexible and efficient. Let’s explore a few key structural patterns:</p><ul><li><strong>Adapter Pattern</strong>: The adapter pattern allows incompatible interfaces to work together. It converts the interface of one class into another interface clients expect, facilitating collaboration between different components.</li><li><strong>Decorator Pattern</strong>: This pattern dynamically adds responsibilities to objects without altering their structure. It’s like adding layers of functionality to an object, making it highly adaptable and extensible.</li><li><strong>Facade Pattern</strong>: The facade pattern provides a unified interface to a set of interfaces in a subsystem. It simplifies complex systems by offering a high-level interface that hides the underlying complexity.</li><li><strong>Bridge Pattern</strong>: The bridge pattern separates abstraction from implementation. It allows both to evolve independently while maintaining a connection between them. This is particularly useful when changes in one aspect should not affect the other.</li><li><strong>Composite Pattern</strong>: This pattern composes objects into tree structures to represent part-whole hierarchies. It allows clients to treat individual objects and compositions of objects uniformly.</li><li><strong>Flyweight Pattern</strong>: When dealing with a large number of objects with shared characteristics, the flyweight pattern reduces memory usage by sharing common state between objects.</li></ul><p><strong>3. Behavioral Patterns</strong></p><p>Behavioral patterns focus on communication between objects, defining how they collaborate and interact. Let’s explore a selection of behavioral patterns:</p><ul><li><strong>Observer Pattern</strong>: This pattern establishes a dependency between objects so that when one object changes state, its dependents are notified and updated automatically. It’s commonly used in event handling.</li><li><strong>Strategy Pattern</strong>: The strategy pattern defines a family of interchangeable algorithms and allows them to be selected and used at runtime. It promotes flexibility by enabling dynamic algorithm selection.</li><li><strong>Command Pattern</strong>: This pattern turns a request into a stand-alone object containing all the information about the request. This decouples sender and receiver, allowing for parameterized and delayed method invocation.</li><li><strong>Chain of Responsibility Pattern</strong>: When multiple objects might handle a request, the chain of responsibility pattern creates a chain of handler objects, each passing the request along the chain until it’s handled or reaches the end.</li><li><strong>State Pattern</strong>: This pattern allows an object to change its behavior when its internal state changes. It’s particularly useful for implementing state machines.</li><li><strong>Interpreter Pattern</strong>: When dealing with a language or grammar, the interpreter pattern defines a representation for the grammar and provides an interpreter to interpret sentences in the language.</li><li><strong>Visitor Pattern</strong>: The visitor pattern lets you add further operations to objects without having to modify them. It separates operations from the objects they operate on.</li><li><strong>Mediator Pattern</strong>: When objects need to communicate through a central mediator, the mediator pattern defines an object that encapsulates how objects interact, promoting loose coupling.</li></ul><h4><strong>Real-World Applications</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*F4oxyS4wwNJ6ihE4EBEDsA.jpeg" /></figure><p>Let’s explore some real-world scenarios where software design patterns shine :)</p><ul><li><strong>E-commerce Platform</strong>: The abstract factory pattern could be employed to create families of related objects such as different payment gateways and corresponding UI components.</li><li><strong>Text Editor</strong>: The command pattern could be used to implement undo and redo functionalities, allowing users to revert changes and navigate through their editing history.</li><li><strong>Game Development</strong>: The observer pattern could be applied to implement event handling, notifying game components about changes in game state.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*Q9I-wrmv8-hL3JJqTSEVoA.png" /><figcaption>Real World Example — Factory System</figcaption></figure><h4>Commonly used Design Patterns</h4><ul><li><strong>Singleton Pattern</strong> — There can only be one instance of a given class. This is one of the most used/common design patterns. Singleton solves the problem of ensuring only one instance of a class. This pattern is generally used with other patterns like Facade, Factory &amp; etc. Because we want only one instance of those classes.</li><li><strong>Strategy Pattern</strong> — This design pattern allows you to select algorithm/logic at runtime. For example, your program needs to pick the kind of Sorting algorithm it needs to use based on some logic.</li><li><strong>Adapter Pattern</strong> — This design pattern works to connect two incompatible interfaces, that cannot be connected. It wraps an existing class in a new interface to make it compatible with client interface.</li><li><strong>Factory Pattern</strong> — This pattern allows the creation of objects without having to specify the exact class of the object.</li><li><strong>Proxy Pattern</strong> — In the Proxy pattern, a class functions as an interface to ‘something’. This ‘something’ could be a network request to get JSON response from a REST API or could be getting the JSON response from the locally cached Database.</li></ul><h4>There are several reasons why design pattern will be beneficial to you.</h4><p><strong>Simply put, design patterns are used to make the task easier.</strong></p><p><strong><em>— For instance,</em></strong><em> when writing a program, the primary rule of an object is that all attributes must be private and cannot be accessed by other classes. So, how can we make our code more readable and adaptable? You can utilize the Creational Design Pattern to clean up your code.</em></p><p><strong><em>— Another reason</em></strong><em> is that design patterns establish a </em><strong><em>shared vocabulary</em></strong><em> that you and your colleagues may use to communicate more effectively. You can remark, “Oh, just use a Singleton for it, though,” and everyone will comprehend your advice. If you already know the pattern and its name, there’s no need to explain what being a singleton is.</em></p><p>I have researched many design patterns, and I’ve used some of them in personal and work projects.</p><p>So, in this piece, I’ll share my <strong><em>top three design pattern recommendations,</em></strong> all of which are simple to learn and use in your work/personal projects.</p><p>So, get a cup of coffee and enjoy reading!</p><blockquote><strong>3 Design Patterns Every Developer Should Learn</strong></blockquote><h4>1. Strategy Design Pattern</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*K79ni2R42izwKlx61PHcjg.png" /></figure><p>This pattern enables you to switch between techniques for a specific task at runtime without the client knowing it. Rather than implementing a single method directly, the code is given runtime instructions that tell it which of the group of algorithms to run.</p><p>The “<strong><em>Open-Closed design principle</em>,</strong>” which argues that base code should be open for extension but closed for modification, was one of the vital principles I learned about in my fourth year of university (which I’m sure many of you have heard of).</p><p>One way to achieve the open-closed principle is to use the strategy pattern.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*Q2RM3ZDRRZAJcVAfCA20JA.jpeg" /></figure><p>When numerous algorithms for a given strategy (interface) are required, this pattern comes in handy. This pattern’s implementation necessitates four elements, including the client:</p><blockquote><em>— Client -&gt; This is the place when the context is used.</em></blockquote><blockquote><em>— Context -&gt; the situation in which an algorithm is chosen at runtime.</em></blockquote><blockquote><em>— interface -&gt; strategy</em></blockquote><blockquote><em>— Algorithms -&gt; real-world applications</em></blockquote><p><strong><em>Let’s have a look at an example.</em></strong></p><p>Assume you’ve created an app for a business that allows you to mail packages to nearby clients. The app’s first edition included bike delivery, which proved to be a huge hit. Delivery by bike is no longer a flimsy alternative when your company expands across the city.</p><p><em>The business has now requested that you create a function that allows package delivery by car. That was just the start.</em></p><p>You were later instructed to add rail and, later still, air. The Package delivery class grows in size and gets more challenging to manage as new algorithms are added. Any minor flaw in the class can jeopardize the functional code, necessitating re-testing of the entire app, even if the problem was only with one of the algorithms.</p><p>As a result, the strategy pattern comes to the rescue, stating that these algorithms should be separated into independent classes called strategies. So, you won’t have to change the main course the next time you wish to add a ship as an option.</p><p><strong><em>The pseudocode below shows how the main class employs these tactics to transmit packages in various ways.</em></strong></p><pre>interface process PackageStrategy has <br>  method processPackage(package); <br><br>//These strategies implement the algorithm by implementing the interface above. <br>class SendByRail implements process PackageStrategy has <br> method processPackage(package) { <br>   //process the package that will be sent by Rail and return something <br> }<br>class SendByBike implements process PackageStrategy has <br> method processPackage(package) { <br>  //  process and return something <br> }<br>//strategies used by the context class <br>class Context { <br>  private strategy: processPackageStrategy<br>  <br>  method setStrategy(processPackageStrategy Strategy) does                  <br>  this.strategy= strategy; <br><br>  method executeStrategy(Package package) does <br>    return strategy.processPackage();<br>}<br><br>// read that strategy from user (UI or Api) <br>class App { <br> create a new context instance; <br> get package info; <br> read the desired user choice<br>  <br> if (choice is rail) then <br>  context.setStrategy(new SendByRail()) <br><br> if (choice is bike) then <br>  context.setStrategy(new SendByBike()) <br><br> response = context.executeStrategy(package) <br> //do something with response.</pre><h4>2. Singleton Design Pattern</h4><p><strong><em>There is only one instance of a class.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sD_QGgD20vIKAkUwaan5mg.png" /></figure><p>The singleton pattern is used when only one instance of a class is required. The primary motive for limiting the instantiation of a class is to maintain control over shared resources such as databases, stores, and files. With this technique, we construct a class instance and give that instance global access.</p><p>For anything launched with an API key, I’ve used a singleton as the source of configuration settings for a client-side web app, as well as for holding data in memory in a client-side web application using flux.</p><p>Because singletons do not need a state, they are used to implement comparators. Because we are just constructing a single model, we can conserve memory.</p><p><strong><em>To give you an idea, here’s a JavaScript snippet of code I wrote as an example:</em></strong></p><pre>class Store {<br>    static instance;<br>    constructor() {<br>        if (!Store.instance) {<br>            this._state = [];<br>            Store.instance = this;<br>        }<br>        return Store.instance;<br>    }<br>    add(stuff) {<br>        this._state.push(stuff);<br>    }<br>}<br><br>const instance = new Store();<br>Object.freeze(instance);<br><br>export default instance;<br><br>// In other files<br>const a = new Store();<br>a.add(&quot;phone&quot;);<br><br>const b = new Store();<br>console.log(b._state) // outputs [&quot;phone&quot;] - shared state</pre><p><strong>Many of us and many of you may have been limiting the instantiation of a class to one for various reasons and have only now realized that it was a design pattern all along!</strong></p><h4>3.Observer Design Pattern</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*koLEQWLz_5WceLfLfXfFyA.jpeg" /></figure><p><strong>I’ll give you a bird’s-eye view of this pattern!</strong></p><p>The one-to-many relationship between the numerous objects is the basis for this design pattern. It enables you to set up a subscription mechanism that permits other entities to be alerted of each occurrence on the entity to which you are subscribed</p><p>Kafka, RabbitMQ, Amazon SNS, and NATS are some real-world examples of pub/sub systems that implement the publisher/subscriber pattern (a variant of the Observer!).</p><p><strong><em>The following are some examples of this pattern:</em></strong></p><p><strong><em>— </em></strong><em>In the world of web development, particularly with React, you’ve heard of Redux for managing your application’s state. Redux is the implementation of the Observer pattern.When you attach an action to update the state in the store, components listening to the change will adjust their representations accordingly.</em></p><p><strong><em>— </em></strong><em>If code were contributed to a remote repository, a CI environment would monitor it for changes and execute a build.</em></p><p><strong><em>— </em></strong><em>The event-driven procedural programming is used to mimic the Observer design pattern. Like other design patterns, this pattern allows us to define loosely linked systems. We can develop maintainable and modular software using this technique. We can also achieve obvious segmentation between distinct actors in an event-driven system.</em></p><blockquote><strong>These are some of the commonly used ones. GoF came up with 23 design patterns in total in their book. Following is the complete list as categorized by them.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*hEapASVKGdO6BP0j9bGeGA.png" /></figure><h4>Is using design patterns always a good idea?</h4><p>Although the design patterns are widely acknowledged to provide considerable advantages. When it is overused, however, it has undesirable side effects.</p><p>Therefore, developers should consider whether using design patterns is efficient and appropriate for the project, and look for alternative solutions and compare them to design patterns. Nonetheless, every software engineer should know about design patterns, their many forms, and the most popular ones.</p><h4>Design Patterns’ Beginnings!</h4><blockquote>If you’re curious about the origins of design patterns, this section is for you. So keep reading!</blockquote><p>Architect Christopher Alexander pioneered the idea of design patterns, which he discussed in his book <strong><em>“The Timeless Way of Building.”</em></strong> If you want to know what’s going on, I recommend reading it straight from the source. It was followed by “<strong><em>A Pattern Language,”</em></strong> an excellent guide to how patterns should be designed. Please don’t take my word for it; look it up for yourself.</p><p>These ideas picked up steam over the next few years. <strong>In 1994, the Crew of Four </strong>(<em>Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides</em>), a group of software engineering researchers, published Design Patterns: <strong><em>Elements of Reusable Object-Oriented Software</em></strong>, which is still on several software engineer’s bookshelves.</p><p>This book is widely regarded as the <em>“public debut” </em>of design patterns in the software development community, and it has influenced the progress of design patterns ever since.</p><blockquote><strong>Conclusion</strong></blockquote><p>Software design patterns arise as guiding lights of organization and beauty in the dynamic world of software development, where problems are as varied as the solutions. In addition to offering solutions to common design issues, these patterns help to build a community of best practices that are independent of time and technology. You have gained a glance into the toolbox of the architect, a toolkit full of techniques for developing software that withstands the test of time, as you have traveled through the world of creational, structural, and behavioral patterns.</p><blockquote><strong>Thank you</strong></blockquote><p>Thank you for embarking on this exploration of software design patterns. Your dedication to enhancing your software craftsmanship is a testament to your passion for excellence. As you continue your software development journey, armed with the knowledge of these patterns, may you find joy in the art of creating, and may your code resonate with the wisdom of the patterns that have shaped our digital landscape.</p><p><em>Happy coding, and may your software always be a masterpiece of ingenuity and innovation.</em></p><p><em>With gratitude,</em></p><p><strong>Hashan Kogul Yogendran</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b73d80cc177a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Keys In Database Management System]]></title>
            <link>https://medium.com/@Hashan_Kogul/keys-in-database-management-system-fefd63524e05?source=rss-f8f2da3eae67------2</link>
            <guid isPermaLink="false">https://medium.com/p/fefd63524e05</guid>
            <dc:creator><![CDATA[Hashan Kogul Yogendran]]></dc:creator>
            <pubDate>Thu, 01 Sep 2022 15:38:42 GMT</pubDate>
            <atom:updated>2022-09-01T15:50:17.099Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*kfaCXwJq_7GLnfHI-6BFeg.jpeg" /><figcaption>Keys in DBMS</figcaption></figure><blockquote>What is key in database management system?</blockquote><p>A key in DBMS is an attribute or a set of attributes that help to uniquely identify a tuple (or row) in a relation (or table). Keys are also used to establish relationships between the different tables and columns of a relational database. Individual values in a key are called key values.</p><blockquote>Why are the Keys Required?</blockquote><p>A key is used in the definitions of various kinds of integrity constraints. A table in a database represents a collection of records or events for a particular relation. Now there can be thousands and thousands of such records, some of which may be duplicated. There should be a way to identify each record separately and uniquely, i.e. no duplicates. Keys allow us to be free from this hassle.</p><blockquote>Types of Keys in DBMS</blockquote><ol><li>Primary Key</li><li>Candidate Key</li><li>Super Key</li><li>Foreign Key</li><li>Composite Key</li><li>Alternate Key</li><li>Unique Key</li></ol><blockquote>1. Primary Key</blockquote><p>If you’re wondering what is primary key in DBMS, primary key is a column of a table or a set of columns that helps to identify every record present in that table uniquely. There can be only one primary Key in a table. Also, the primary Key cannot have the same values repeating for any row. Every value of the primary key must be different with no repetitions. Amid many details, a primary key is the most significant one to understand what are keys and what is primary key in DBMS.</p><p>The PRIMARY KEY (PK) constraint put on a column or set of columns will not allow them to have any null values or any duplicates. One table can have only one primary key constraint. Any value in the primary key cannot be changed by any foreign keys (explained below) which refer to it.</p><blockquote>2. Super Key</blockquote><p>Super Key is the set of all the keys which help to identify rows in a table uniquely. This means that all those columns of a table than capable of identifying the other columns of that table uniquely will all be considered super keys.</p><p>Super Key is the superset of a candidate key (explained below). The Primary Key of a table is picked from the super key set to be made the table’s identity attribute.</p><blockquote>3. Candidate Key</blockquote><p>Candidate keys are those attributes that uniquely identify rows of a table. The Primary Key of a table is selected from one of the candidate keys. So, candidate keys have the same properties as the primary keys explained above. There can be more than one candidate keys in a table.</p><p>There can be more candidate keys than just one for any table, but they can never be empty. Every candidate key carries unique information and value. Besides these characteristics, a combination of attributes also works as a set of candidate keys.</p><blockquote>4. Alternate Key</blockquote><p>As stated above, a table can have multiple choices for a primary key; however, it can choose only one. So, all the keys which did not become the primary Key are called alternate keys.</p><blockquote>5. Foreign Key</blockquote><p>Foreign Key is used to establish relationships between two tables. A foreign key will require each value in a column or set of columns to match the Primary Key of the referential table. Foreign keys help to maintain data and referential integrity.</p><p>Foreign keys are essential for maintaining a difference between two entities that might be linked with the same information but do not share similar information. In such cases, the tables are linked to maintaining a connection but do not entirely work as a replacement for each other. For instance, any individual working for the marketing department might have marketing department information in its employee table, but that does not mean the table can be similar to the department table held by the marketing department.</p><blockquote>6. Composite Key</blockquote><p>A composite Key is a set of two or more attributes that help identify each tuple in a table uniquely. The attributes in the set may not be unique when considered separately. However, when taken all together, they will ensure uniqueness. The ‘concatenated key’ is another name for a composite key.</p><blockquote>7. Unique Key</blockquote><p>Unique Key is a column or set of columns that uniquely identify each record in a table. All values will have to be unique in this Key. A unique Key differs from a primary key because it can have only one null value, whereas a primary Key cannot have any null values.</p><blockquote><strong><em>NOTE</em></strong></blockquote><p>Among the seven types of keys available in the DBMS, a few other types of keys in SQL are also accessible. The key type is called Artificial Keys. An artificial has no relevance or meaning to the business but is often used to tackle conflicting data management situations. For example, if there is no attribute that comprises all required primary key properties or if the primary keys are complex.</p><p><strong><em>I hope after reading this blog, you have a better understanding of keys in database management system.</em></strong></p><p><strong><em>Thank you.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fefd63524e05" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Evolution of Data Base Management System]]></title>
            <link>https://medium.com/@Hashan_Kogul/evolution-of-data-base-management-system-81825997d2a6?source=rss-f8f2da3eae67------2</link>
            <guid isPermaLink="false">https://medium.com/p/81825997d2a6</guid>
            <dc:creator><![CDATA[Hashan Kogul Yogendran]]></dc:creator>
            <pubDate>Thu, 21 Jul 2022 11:33:03 GMT</pubDate>
            <atom:updated>2022-07-21T11:35:37.300Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*pQbUoTKuWaQl34zzobDTSg.png" /></figure><p>The main objective of the database is to ensure that data can be stored and retrieved easily and effectively. It is a compilation of data (records) in a structured way. In a database, the information is stored in a tabular form where data may or may not interlinked. Hence we cam say that basically database is a compilation of database files and each database file is further a collection of records.</p><blockquote><strong>The chronological order of the development of DBMS is as follows</strong></blockquote><ol><li><strong>Flat Files (1970s-1990s)</strong></li><li><strong>Hierarchical (1970s-1990s)</strong></li><li><strong>Network database (1970s -1990s)</strong></li><li><strong>Relational database (1980s-present)</strong></li><li><strong>Object — oriented database (1990s -present)</strong></li><li><strong>Object- relationship database (1990s-present)</strong></li><li><strong>NoSQL Database (2000s-present)</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*MPiNdF9A9i4Qo5sqrBDvcg.jpeg" /></figure><blockquote><strong>Flat Files (1970s-1990s)</strong></blockquote><p>Flat files database is a database that stores information in a single file or table. In text file, every line contains one record where fields either have fixed length or they are separated by commas, whitespaces, tabs or any records and they cannot contain multiple tables as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7W7dOrPYAwXGlJtCEsScIA.png" /><figcaption>Flat File System</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*5q7Jxa76tYkbWfgvywDnsQ.jpeg" /><figcaption>Advantage and Limitations of Flat File Database System</figcaption></figure><blockquote><strong>Hierarchical (1970s-1990s)</strong></blockquote><p>As the name indicates, hierarchical database contains data in a hierarchically-arranged data. More Perceptively it can parent can have many children but one child can only have one parent i. e.,; one-to-many relationship. Its hierarchical structure contains levels or segments which are equivalent to the file system’s record type. All attributes of a specific record are listed under the entity type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K4-SDs9id2LeRaNZAHyTqA.png" /><figcaption>Hierarchical Database</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*yHZK-vIpQ38iMNj2Ivr73A.jpeg" /><figcaption>Advantage and Limitations of Hierarchical Database System</figcaption></figure><blockquote><strong>Network database (1970s -1990s)</strong></blockquote><p>The inventor of network model is Charles Bachmann. Unlike hierarchical database model, network database allows multiple parent and child relationships i. e., it maintains many-to many relationship. Network database is basically a graph structure. The network database model was created to achieve three main objectives: <strong>. </strong>To represent complex data relationship more effectively. To improve the performance of the database. <strong>. </strong>To improve a database standard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*5_UnFhqXCxw3Ap6xKmVhmA.png" /><figcaption>Network Database</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*D91sliphHpZn4CnKNxHvwA.png" /><figcaption>Advantage and Limitations of Network Database System</figcaption></figure><blockquote><strong>Relational database (1980s-present)</strong></blockquote><p>Relationship database model was proposed by E. F. Codd. After the hierarchical and network model the birth of this model was huge step ahead. It allows the entities to be related through a common attribute. In the table there are alternative keys. This property makes this model extremely flexible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*75piauM-CGr1N8cyWu9QnA.png" /><figcaption>Relational Database System</figcaption></figure><blockquote><strong>Object — oriented database (1990s -present)</strong></blockquote><p>Object-Oriented database management system is that database system in which the data or information is presented in the form of objects, much like in object-Oriented programming language. Furthermore, object oriented DBMS also facilitate the user by offering transportation support, language for various queries, and indexing options. Also, these database systems have the ability to handle data efficiently over multiple servers. Unlike relationship database object-oriented database works in the framework of real programming language like JAVA or C++.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*aZiZlC7HgORQ89QQnGUF1w.png" /><figcaption>Object-Oriented Database System</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*91gku173qVHbjqzwRhf-nA.jpeg" /><figcaption>Advantage and Limitations of Object-Oriented Database System</figcaption></figure><blockquote><strong>Object- relationship database (1990s-present)</strong></blockquote><p>Defined in simple teams, an object relationship database management system displays a modified object- oriented user- display over the already implemented relationship database management system. When various software interact with this modified- database management system, they will customarily operate in a manner such that data is assumed to be saved as objects. The basic working of this database management system is that is translated the useful data into organized tables distributed in rows and columns, and from then onwards, it manages data the same way done in s relational database system. Similarly, when the data is to be accessed by the user, it is again translated from processed to complex form.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*AMKYEOXedFdVbfdAG-JgUQ.png" /><figcaption>Object-Relationship Database System</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*na_INnCXoSRUTc9GPgEwfg.jpeg" /><figcaption>Advantage and Limitations of Object-Relationship Database System</figcaption></figure><blockquote><strong>NoSQL Database (2000s-present)</strong></blockquote><p>NoSQL databases (“not only SQL”) are non-tabular databases and store data differently than relational tables. NoSQL databases come in a variety of types based on their data model. The main types are document, key-value, wide-column, and graph. They provide flexible schemas and scale easily with large amounts of data and high user loads.</p><p><strong>Features of NoSQL Database System</strong></p><ol><li>Flexible Schema</li><li>Horizontal Scaling</li><li>Fast queries due to the data model</li><li>Ease of use for developers</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZHXmep3XXr5trRWXOa_Yxw.png" /><figcaption>NoSQL Database System</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*du6oUwEvplKMnsEqswBVTA.png" /><figcaption>Summary of NoSQL</figcaption></figure><blockquote><strong>Summary</strong></blockquote><p>The database evolution happened in five “Waves”</p><ul><li>The first wave consisted of network, hierarchical, inverted list, and (in the 1990’s) object-oriented DBMSs, it took place from roughly 1960 to 1999.</li><li>The relational wave introduced all of the SQL products (and a few non-SQL) around 1990 and began to lose users around 2008.</li><li>The decision support wave introduced Online Analytical Processing (OLAP) and specialized DBMSs around 1990, and is still in full force today.</li><li>The graph wave began with The Semantic Web stack from the Worldwide Web Consortium in 1999, with property graphs appearing around 2008</li><li>The NoSQL wave includes big data and much more, it began in 2008.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*jxwl766t_UzDiA4oUf0JcQ.png" /><figcaption>Evolution of DBMS</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81825997d2a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[File System Vs Data Base Management System]]></title>
            <link>https://medium.com/@Hashan_Kogul/file-system-vs-data-base-management-system-8e0d933ec00e?source=rss-f8f2da3eae67------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e0d933ec00e</guid>
            <dc:creator><![CDATA[Hashan Kogul Yogendran]]></dc:creator>
            <pubDate>Wed, 06 Jul 2022 09:53:28 GMT</pubDate>
            <atom:updated>2022-07-06T12:25:41.326Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*hEBWbtb_YU4-A-4TWnnczA.jpeg" /><figcaption>File System Vs Data Base Management System</figcaption></figure><blockquote><strong>File System</strong></blockquote><p><strong>What is File System ?</strong></p><p>A “file system” is the structure and logic rules that are used to organize groups of data and their names. Files can be collectively present inside a directory. Directories can again be present inside another directory giving it a hierarchical structure. Although Windows supports a variety of file systems, NTFS is the most popular in today’s world. Because files are commonly organized in a hierarchy, the file system allows you to browse the files in the current directory.</p><p><strong>Following are some of the examples of File Systems :-</strong></p><p><strong>FAT — </strong>FAT is a file system designed specifically for hard drives. File Allocation Table (FAT) was first introduced in 1977. It helps Microsoft operating systems manage files on hard disks and other physical media devices. It is also commonly found in devices such as digital cameras, flash memory, and other portable devices, where it is used to store file information. It also helps to extend the life of a hard drive by reducing hard drive wear and tear.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*uAzyCzhLPTU4z4r6v7O2Jg.jpeg" /><figcaption>FAT File System</figcaption></figure><p><strong>HFS — </strong>On a Macintosh computer, HFS (Hierarchical file system) is the file system that is used to create a directory when a hard disk is formatted. Its primary role is to organize and store files on a Macintosh hard disk. Since the release of OS X, Apple does not support writing to or formatting HFS disks. Furthermore, because HFS is a Macintosh format, Windows systems do not recognize HFS-formatted drives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J7K_7ugVtvV-QsYJ9lPt-g.png" /><figcaption>HFS File System</figcaption></figure><p><strong>NTFS — </strong>NTFS is a file system that saves and retrieves files on the Windows NT operating system as well as other Windows versions such as Windows 2000, Windows XP, Windows 7, and Windows 10. The New Technology File System is another name for it. It offers superior ways of file recovery and data protection than the FAT and HPFS file systems, as well as a variety of improvements in terms of extendibility, security, and performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*dhvd-IePCRQyjSLkJ3jTvQ.jpeg" /><figcaption>NTFS File System</figcaption></figure><p><strong>Features of File System</strong></p><ol><li><strong>Space Management</strong> -File systems allot space on a device in variable block sizes, usually several physical units.</li><li><strong>Hierarchical Data Management</strong> -Directories in file systems allow users to organize files into different groupings.</li><li><strong>Metadata Management</strong> -Some extra information pertaining to each file is stored in a file system.</li><li><strong>Integrity Management</strong> -One of a file system’s most important responsibilities is to ensure that the file system structures in secondary storage stay consistent regardless of how programs access the file system.</li><li><strong>Restricting Access to Files</strong> -To control data access, file systems employ a number of approaches.</li></ol><p><strong>Advantage Of File System</strong></p><ol><li><em>Backup</em></li><li><em>Compactness</em></li><li><em>Data Retrieval</em></li><li><em>Editing</em></li><li><em>File Sharing</em></li></ol><p><strong>Disadvantage Of File System</strong></p><ol><li><em>Data Redundancy</em></li><li><em>Data Inconsistency</em></li><li><em>Accessing Data Is Difficult</em></li><li><em>Limited Data Sharing</em></li><li><em>Atomicity Problem</em></li></ol><blockquote><strong>Data Base Management System</strong></blockquote><p><strong>What is Data Base Management System ?</strong></p><p>A database management system is a software application that manages databases (A database is a collection of interconnected data that is used to efficiently retrieve, insert, and delete data. It’s also used to arrange data into tables, schemas, views, and reports, among other things.). MySQL, Oracle, and other commercial databases, for example, are widely utilized in a variety of applications. It provides an interface for doing tasks such as building a database, saving data in it, updating data, and creating a table in the database, among others. It ensures the database’s safety and security. It also ensures data consistency when there are multiple users.</p><p><strong>Types of Databases</strong></p><ol><li><strong>Centralized Database</strong> -It’s a database that stores information in a centralized database system. It allows users to access stored data from a variety of locations using a variety of applications. ‘<a href="https://cdn-images-1.medium.com/max/800/1*iG5YpbrBGguvoNF1Eeg5iw.png"><em>Ex- Figure 01</em></a><em>’</em></li><li><strong>Distributed Database</strong> -In contrast to a centralized database system, data in distributed systems is spread over multiple database systems within an organization. ‘<a href="https://cdn-images-1.medium.com/max/800/1*7TUOHShmX7EOlXBYgTaFIw.png"><em>Ex- Figure 02</em></a>’</li><li><strong>Relational Database</strong> -This database uses the relational data model, which stores data in the form of rows (tuples) and columns (attributes), which are combined to make a table (relation). ‘<a href="https://cdn-images-1.medium.com/max/800/1*j1l4s8viFmnfRogBgGYtYw.png"><em>Ex- Figure 03</em></a>’</li></ol><figure><img alt="Centralized Database" src="https://cdn-images-1.medium.com/max/680/1*iG5YpbrBGguvoNF1Eeg5iw.png" /><figcaption>Figure 01</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*7TUOHShmX7EOlXBYgTaFIw.png" /><figcaption>Figure 02</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j1l4s8viFmnfRogBgGYtYw.png" /><figcaption>Figure 03</figcaption></figure><p><strong>Features of DBMS</strong></p><ol><li><strong>Improves File Consistency -</strong>Organizations can build a standardized way to handle files and assure data consistency with other systems and applications by implementing a database management system.</li><li><strong>Enhanced Security -</strong>When dealing with enormous amounts of data, security becomes a primary priority for all companies.</li><li><strong>Reduces Repetition and Redundancy -</strong>Because multiple users access the same database, the risks of data duplication are quite significant.</li><li><strong>Provides a multi-user environment -</strong>A multi-user environment is a feature of database management software that allows multiple users to access and operate on data at the same time.</li></ol><p><strong>Advantages of DBMS</strong></p><ol><li><em>Better Data Transfer</em></li><li><em>Better Data Security</em></li><li><em>Data inconsistency is minimized</em></li><li><em>Better decision-making</em></li><li><em>Increased end-user productivity</em></li><li><em>Simple</em></li><li><em>Faster data access</em></li></ol><p><strong>Disadvantages of DBMS</strong></p><ol><li><em>Staff Training Expenses</em></li><li><em>Data Migration Costs</em></li><li><em>Database System Maintenance</em></li><li><em>Performance</em></li></ol><p><strong><em>File System vs DBMS : Full Difference</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*hwuoPL1C5uA-xbJLCl1oDw.png" /><figcaption>Table</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e0d933ec00e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>