{"id":192,"date":"2025-09-22T10:27:45","date_gmt":"2025-09-22T04:57:45","guid":{"rendered":"https:\/\/pickmyfuture.com\/?p=192"},"modified":"2025-09-22T10:27:47","modified_gmt":"2025-09-22T04:57:47","slug":"pickmyfuture-com-attributes-in-database","status":"publish","type":"post","link":"https:\/\/pickmyfuture.com\/hi\/pickmyfuture-com-attributes-in-database\/","title":{"rendered":"Attributes in Database"},"content":{"rendered":"<p>When you open any database table, the first thing you notice are the column names. Those columns are what we call attributes. In simple words, attributes are just the pieces of information that describe something. If we are storing student details, then the student\u2019s name, roll number, age, and course are all attributes.<\/p>\n\n\n\n<p>Without attributes, a table would just be a collection of rows with no meaning. Attributes give identity to the data and help us know what each value actually stands for.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u0935\u093f\u0937\u092f\u0938\u0942\u091a\u0940<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">\u091f\u0949\u0917\u0932<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/pickmyfuture.com\/hi\/pickmyfuture-com-attributes-in-database\/#Table_of_Contents\" >\u0935\u093f\u0937\u092f\u0938\u0942\u091a\u0940<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/pickmyfuture.com\/hi\/pickmyfuture-com-attributes-in-database\/#What_Are_Attributes_in_Database\" >What Are Attributes in Database?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/pickmyfuture.com\/hi\/pickmyfuture-com-attributes-in-database\/#Types_of_Attributes_in_Database\" >Types of Attributes in Database<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/pickmyfuture.com\/hi\/pickmyfuture-com-attributes-in-database\/#Why_Attributes_Matter_in_a_Database\" >Why Attributes Matter in a Database<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/pickmyfuture.com\/hi\/pickmyfuture-com-attributes-in-database\/#Example_Student_Database\" >Example: Student Database<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/pickmyfuture.com\/hi\/pickmyfuture-com-attributes-in-database\/#Attributes_in_Database_in_ER_Diagram\" >Attributes in Database in ER Diagram<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/pickmyfuture.com\/hi\/pickmyfuture-com-attributes-in-database\/#Practical_Example_You_Already_Know\" >Practical Example You Already Know<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/pickmyfuture.com\/hi\/pickmyfuture-com-attributes-in-database\/#Conclusion\" >\u0928\u093f\u0937\u094d\u0915\u0930\u094d\u0937<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Table_of_Contents\"><\/span>\u0935\u093f\u0937\u092f\u0938\u0942\u091a\u0940<span class=\"ez-toc-section-end\"><\/span><\/h2><nav><ul><li><a href=\"#what-are-attributes-in-database\">What Are Attributes in Database?<\/a><\/li><li><a href=\"#types-of-attributes-in-database\">Types of Attributes in Database<\/a><\/li><li><a href=\"#why-attributes-matter-in-a-database\">Why Attributes Matter in a Database<\/a><\/li><li><a href=\"#example-student-database\">Example: Student Database<\/a><\/li><li><a href=\"#attributes-in-database-in-er-diagram\">Attributes in Database in ER Diagram<\/a><\/li><li><a href=\"#practical-example-you-already-know\">Practical Example You Already Know<\/a><\/li><li><a href=\"#conclusion\">\u0928\u093f\u0937\u094d\u0915\u0930\u094d\u0937<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-are-attributes-in-database\"><span class=\"ez-toc-section\" id=\"What_Are_Attributes_in_Database\"><\/span>What Are Attributes in Database? <span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Attributes are basically the characteristics of an entity. If the entity is Employee, then Employee_ID, Name, Department, and Salary are the attributes. If the entity is Product, then Product_ID, Product_Name, and Price are the attributes.<\/p>\n\n\n\n<p>Every attribute stores some value. That value must belong to a particular type or domain. For example, an age attribute will always have a number. A name attribute will always be text. <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"700\" src=\"https:\/\/pickmyfuture.com\/wp-content\/uploads\/2025\/09\/Gemini_Generated_Image_wenlv6wenlv6wenl-e1758515859452.webp\" alt=\"Employee table showing attributes in database including Employee_ID, Name, and Email.\" class=\"wp-image-204\" style=\"width:421px;height:auto\" srcset=\"https:\/\/pickmyfuture.com\/wp-content\/uploads\/2025\/09\/Gemini_Generated_Image_wenlv6wenlv6wenl-e1758515859452.webp 1024w, https:\/\/pickmyfuture.com\/wp-content\/uploads\/2025\/09\/Gemini_Generated_Image_wenlv6wenlv6wenl-e1758515859452-300x205.webp 300w, https:\/\/pickmyfuture.com\/wp-content\/uploads\/2025\/09\/Gemini_Generated_Image_wenlv6wenlv6wenl-e1758515859452-768x525.webp 768w, https:\/\/pickmyfuture.com\/wp-content\/uploads\/2025\/09\/Gemini_Generated_Image_wenlv6wenlv6wenl-e1758515859452-150x103.webp 150w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">AI-generated employee table showing key attributes in database.<\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"types-of-attributes-in-database\"><span class=\"ez-toc-section\" id=\"Types_of_Attributes_in_Database\"><\/span>Types of Attributes in Database<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Now, not all attributes are alike. In databases, they are grouped into different categories:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Simple Attribute<\/strong> \u2013 Cannot be broken further. Example: Roll number.<\/li>\n\n\n\n<li><strong>Composite Attribute<\/strong> \u2013 Can be split into parts. Example: Full name \u2192 first name + last name.<\/li>\n\n\n\n<li><strong>Derived Attribute<\/strong> \u2013 Not stored directly but calculated. Example: Age (from date of birth).<\/li>\n\n\n\n<li><strong>Single-Valued Attribute<\/strong> \u2013 Holds only one value. Example: A person\u2019s date of birth.<\/li>\n\n\n\n<li><strong>Multi-Valued Attribute<\/strong> \u2013 Can store many values.   <\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"618\" src=\"https:\/\/pickmyfuture.com\/wp-content\/uploads\/2025\/09\/Gemini_Generated_Image_rimmlcrimmlcrimm-e1758515692106.webp\" alt=\"Diagram showing composite, stored, derived, and key attributes in database within an employee record system.\" class=\"wp-image-206\" style=\"width:505px;height:auto\" srcset=\"https:\/\/pickmyfuture.com\/wp-content\/uploads\/2025\/09\/Gemini_Generated_Image_rimmlcrimmlcrimm-e1758515692106.webp 1024w, https:\/\/pickmyfuture.com\/wp-content\/uploads\/2025\/09\/Gemini_Generated_Image_rimmlcrimmlcrimm-e1758515692106-300x181.webp 300w, https:\/\/pickmyfuture.com\/wp-content\/uploads\/2025\/09\/Gemini_Generated_Image_rimmlcrimmlcrimm-e1758515692106-768x464.webp 768w, https:\/\/pickmyfuture.com\/wp-content\/uploads\/2025\/09\/Gemini_Generated_Image_rimmlcrimmlcrimm-e1758515692106-150x91.webp 150w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">AI-generated visualization of attributes in database with employee example.<\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"why-attributes-matter-in-a-database\"><span class=\"ez-toc-section\" id=\"Why_Attributes_Matter_in_a_Database\"><\/span>Why Attributes Matter in a Database<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Attributes are basically what make a database useful. Without them, a table is just a collection of empty rows. They describe what each entry really means and give context to the stored values.<\/p>\n\n\n\n<p>For example, take a simple product table in an online shopping app. If it only showed \u201cProduct 1, Product 2,\u201d it wouldn\u2019t help anyone. Instead, when you add details like name, price, description, and stock availability, the table suddenly becomes meaningful. Those details are nothing but attributes.<\/p>\n\n\n\n<p>In a database, attributes aren\u2019t just labels on paper\u2014they actually decide how a table is built. They tell us what kind of information the table is supposed to carry, like names, numbers, or dates. Some attributes are more than just details. Take Employee_ID, for example\u2014it\u2019s the one thing that stops two employees from being treated as the same person. If we didn\u2019t have attributes like this, a database table would just look like rows and columns with no real sense behind them. They let us filter, search, and sort information in useful ways.<\/p>\n\n\n\n<p>Think about a student database. You wouldn\u2019t just write \u201cStudent 1, Student 2.\u201d Instead, you would add attributes like name, roll number, age, and course. If the system also needs to allow more than one phone number for a student, that attribute becomes multi-valued. And if the roll number is used to identify each student uniquely, then that attribute is treated as a key. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"example-student-database\"><span class=\"ez-toc-section\" id=\"Example_Student_Database\"><\/span>Example: Student Database<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Student_ID<\/strong> (Key attribute)<\/li>\n\n\n\n<li><strong>Name<\/strong> (Simple attribute)<\/li>\n\n\n\n<li><strong>Address<\/strong> (Composite \u2192 Street, City, State, Pin)<\/li>\n\n\n\n<li><strong>Date_of_Birth<\/strong> (Simple attribute)<\/li>\n\n\n\n<li><strong>Age<\/strong> (Derived attribute)<\/li>\n\n\n\n<li><strong>Phone_Number<\/strong> (Multi-valued attribute)<\/li>\n\n\n\n<li><strong>Course<\/strong> (Simple attribute)<\/li>\n<\/ul>\n\n\n\n<p>Now if you think about it, these attributes together paint a complete picture of the student. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"attributes-in-database-in-er-diagram\"><span class=\"ez-toc-section\" id=\"Attributes_in_Database_in_ER_Diagram\"><\/span><a href=\"https:\/\/www.geeksforgeeks.org\/dbms\/attributes-in-dbms\/\" target=\"_blank\" rel=\"noopener\">Attributes in Database in ER Diagram<\/a><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>When we draw ER diagrams, attributes are usually shown as ovals connected to the entity. A simple attribute is a single oval, composite ones break down into smaller ovals, multi-valued ones are drawn with double ovals, and key attributes are underlined.<\/p>\n\n\n\n<p>This way, before even creating the actual database, we can see how data will be structured. <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"787\" src=\"https:\/\/pickmyfuture.com\/wp-content\/uploads\/2025\/09\/Gemini_Generated_Image_k7aa7mk7aa7mk7aa-e1758515782727.webp\" alt=\"Entity-relationship diagram of employee attributes in database including name, salary, phone number, and last name.\" class=\"wp-image-205\" style=\"width:417px;height:auto\" srcset=\"https:\/\/pickmyfuture.com\/wp-content\/uploads\/2025\/09\/Gemini_Generated_Image_k7aa7mk7aa7mk7aa-e1758515782727.webp 1024w, https:\/\/pickmyfuture.com\/wp-content\/uploads\/2025\/09\/Gemini_Generated_Image_k7aa7mk7aa7mk7aa-e1758515782727-300x231.webp 300w, https:\/\/pickmyfuture.com\/wp-content\/uploads\/2025\/09\/Gemini_Generated_Image_k7aa7mk7aa7mk7aa-e1758515782727-768x590.webp 768w, https:\/\/pickmyfuture.com\/wp-content\/uploads\/2025\/09\/Gemini_Generated_Image_k7aa7mk7aa7mk7aa-e1758515782727-150x115.webp 150w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">AI-generated diagram of employee attributes in database structure.<\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"practical-example-you-already-know\"><span class=\"ez-toc-section\" id=\"Practical_Example_You_Already_Know\"><\/span>Practical Example You Already Know <span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here\u2019s a simple example you probably use every day\u2014your phone contacts. Each person you save is like an entity in a database. The stuff you type in for them\u2014their name, phone number, maybe an email or birthday\u2014is basically the attributes. It\u2019s exactly the same idea as in a database, just in a way you see and use every day.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Some attributes are unique. For example, the phone number usually belongs to only one person.<\/li>\n\n\n\n<li>Some attributes can repeat. A person might have two or three different email IDs.<\/li>\n\n\n\n<li>And some attributes are not directly written but can be calculated. Say you\u2019ve got a birthday stored in your database. You don\u2019t need to type in the person\u2019s age separately\u2014you can just calculate it whenever you need. So the date of birth becomes the actual stored attribute, while age is something you can work out from it.<\/li>\n<\/ul>\n\n\n\n<p>Think about when you save a new contact on your phone. You type in their name, number, maybe an email or birthday. That\u2019s basically what attributes are in a database. We use them all the time, even if we don\u2019t call them by that name. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>\u0928\u093f\u0937\u094d\u0915\u0930\u094d\u0937<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Attributes are basically the pieces of information that give meaning to the data in a database. Imagine you just have a number in your table\u2014it doesn\u2019t tell you much on its own. But if you tag it as \u2018age\u2019 or \u2018phone number,\u2019 suddenly it makes sense. Without those little labels, all the rows in your table would just be a jumble of numbers and text.<\/p>\n\n\n\n<p>Picking the right kind of attributes\u2014like whether it\u2019s simple, has multiple values, or acts as a key\u2014helps keep the database neat and easier to work with.<\/p>\n\n\n\n<p>So, when you\u2019re building a database, it\u2019s worth spending a bit of time thinking about which attributes you really need. Getting this right makes the database not just correct, but actually useful in real life. <\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Lec-15: Types of Attributes in ER Model | Full Concept | DBMS in Hindi\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/WEo3g6Ir-vA?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>Want to dive deeper? Check out our detailed guide on <a href=\"https:\/\/pickmyfuture.com\/hi\/data-structures-algorithms-dsa-dynamic-programming-explained-step-by-step\/\">Data Structures and Algorithm<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>When you open any database table, the first thing you notice are the column names. Those columns are what we call attributes. In simple words, attributes are just the pieces of information that describe something. If we are storing student details, then the student\u2019s name, roll number, age, and course are all attributes. Without attributes,&#8230;<\/p>","protected":false},"author":1,"featured_media":206,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[34,38,36,43,42,39,40,37,41,35],"class_list":["post-192","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-attributes-in-database","tag-composite-attributes","tag-database-attributes","tag-database-basics","tag-database-concepts","tag-dbms-tutorial","tag-derived-attributes","tag-key-attributes-in-database","tag-stored-attributes","tag-types-of-attributes-in-dbms"],"_links":{"self":[{"href":"https:\/\/pickmyfuture.com\/hi\/wp-json\/wp\/v2\/posts\/192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pickmyfuture.com\/hi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pickmyfuture.com\/hi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pickmyfuture.com\/hi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pickmyfuture.com\/hi\/wp-json\/wp\/v2\/comments?post=192"}],"version-history":[{"count":2,"href":"https:\/\/pickmyfuture.com\/hi\/wp-json\/wp\/v2\/posts\/192\/revisions"}],"predecessor-version":[{"id":208,"href":"https:\/\/pickmyfuture.com\/hi\/wp-json\/wp\/v2\/posts\/192\/revisions\/208"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pickmyfuture.com\/hi\/wp-json\/wp\/v2\/media\/206"}],"wp:attachment":[{"href":"https:\/\/pickmyfuture.com\/hi\/wp-json\/wp\/v2\/media?parent=192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pickmyfuture.com\/hi\/wp-json\/wp\/v2\/categories?post=192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pickmyfuture.com\/hi\/wp-json\/wp\/v2\/tags?post=192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}