{"id":3708,"date":"2025-05-29T16:57:40","date_gmt":"2025-05-29T16:57:40","guid":{"rendered":"https:\/\/w3buddy.com\/?post_type=cposts&#038;p=3708"},"modified":"2025-05-29T16:57:41","modified_gmt":"2025-05-29T16:57:41","slug":"database-storage-structures","status":"publish","type":"cposts","link":"https:\/\/w3buddy.com\/blog\/notes\/getting-started-with-oracle-dba\/database-storage-structures\/","title":{"rendered":"Database Storage Structures"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\ud83e\udde0 <strong>Introduction<\/strong><br>Ever wondered how Oracle actually <strong>stores your data<\/strong>?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s break it down \u2014 from big-picture storage like tablespaces, down to the tiniest data block.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Whether you&#8217;re using a <strong>CDB (Container Database)<\/strong> or <strong>PDB (Pluggable Database)<\/strong>, these layers apply.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83e\uddf1 <strong>Storage: Two Levels \u2013 Physical and Logical<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udd39 <strong>Physical Level<\/strong> \u2013 Where data is <em>actually<\/em> stored (on disk)<br>\ud83d\udd39 <strong>Logical Level<\/strong> \u2013 How Oracle <em>organizes<\/em> and <em>manages<\/em> that storage<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s look at each in detail \u2b07\ufe0f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\uddc2\ufe0f <strong>\ud83d\udd38 Physical Storage Options<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Oracle can store data files using three main mechanisms:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>File System<\/strong><br>\u27a4 Traditional OS-based file structure<br>\u27a4 Most Oracle DBs use this by default<\/li>\n\n\n\n<li><strong>Cluster File System<\/strong><br>\u27a4 Used in <strong>Oracle RAC (Real Application Clusters)<\/strong><br>\u27a4 Makes shared storage look like a single file system<br>\u27a4 Multiple servers can access the same data<\/li>\n\n\n\n<li><strong>Oracle ASM (Automatic Storage Management)<\/strong><br>\u27a4 Oracle-managed storage<br>\u27a4 Provides performance + reliability<br>\u27a4 Reduces manual storage management<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udccc <strong>Data files<\/strong> = The actual files that store your tables, indexes, etc.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83e\udde0 <strong>\ud83d\udd39 Logical Storage Structures (Inside Oracle)<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Layer<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><strong>Tablespace<\/strong><\/td><td>A logical container for data. Can hold multiple segments. Each <strong>PDB<\/strong> has its own set of tablespaces.<\/td><\/tr><tr><td><strong>Segment<\/strong><\/td><td>Set of <strong>extents<\/strong> used by a schema object (like a table or index). One object = one segment.<\/td><\/tr><tr><td><strong>Extent<\/strong><\/td><td>Set of <strong>contiguous data blocks<\/strong>. More extents are added as needed.<\/td><\/tr><tr><td><strong>Data Block<\/strong><\/td><td>Smallest unit of logical storage. Usually 2KB, 4KB, 8KB, etc. Stored in data files.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udd01 <strong>Flow of Storage:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>Tablespace \u2192 Segment \u2192 Extent \u2192 Data Block \u2192 Data File<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udce6 <strong>Tablespaces in Detail<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 <strong>USERS<\/strong> tablespace<br>\u27a4 Default location for user data<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 Custom Tablespaces<br>\u27a4 Can be created for separating system data, app-specific data, etc.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udccc <strong>One tablespace = many data files<\/strong><br>\ud83d\udccc <strong>One data file = belongs to one tablespace only<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udee0\ufe0f <strong>DBA Tip of the Day<\/strong><br>Understanding how Oracle organizes storage helps you optimize <strong>performance<\/strong> and <strong>space usage<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When things go wrong \u2014 like fragmentation or storage alerts \u2014 this is where you start debugging.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud83e\udde0 IntroductionEver wondered how Oracle actually stores your data? Let\u2019s break it down \u2014 from big-picture storage like tablespaces, down to the tiniest data block. Whether you&#8217;re using a CDB (Container Database) or PDB (Pluggable Database), these layers apply. \ud83e\uddf1 Storage: Two Levels \u2013 Physical and Logical \ud83d\udd39 Physical Level \u2013 Where data is actually [&hellip;]<\/p>\n","protected":false},"template":"","meta":{"googlesitekit_rrm_CAowu461DA:productID":""},"categories":[960,952],"class_list":["post-3708","cposts","type-cposts","status-publish","hentry","category-getting-started-with-oracle-dba","category-notes"],"_links":{"self":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/cposts\/3708","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/cposts"}],"about":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/types\/cposts"}],"wp:attachment":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/media?parent=3708"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/categories?post=3708"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}