Base tables and views In DBMS In Hindi

Base tables and views In DBMS In Hindi

Base Tables:

  • Kya hai? Base tables woh main storage hote hain jahan asli data database mein rakha jata hai.
  • Kya karte hain? Yeh rows aur columns ke saath raw data ko store karte hain, jahan har row ek record ko represent karta hai (jaise library mein ek book), aur har column us record ke bare mein information deti hai (jaise book ka title, author, etc.).
  • Kyun important hain? Base tables mein ki gayi changes seedhe stored data ko prabhavit karti hain. Yeh database ka backbone hai jo data ko organized aur accurate rakhta hai.

Characteristics of Base tables In DBMS In Hindi

  • Base tables contain rows and columns, where each row represents a record, and each column represents a field or attribute.
  • Data in base tables is typically normalized to reduce redundancy and improve data integrity.
  • Changes in base tables directly affect the stored data, and they are crucial for the consistency and accuracy of the database.

Udaharan: Sochiye ek library database mein ek base table hai jiska naam “Books” hai. Yeh details store karta hai jaise book ka title, author, ISBN, aur quantity.

CREATE TABLE Books ( BookID INT PRIMARY KEY, Title VARCHAR(255), Author VARCHAR(255), ISBN VARCHAR(13), Quantity INT );

Views In DBMS In Hindi

Views:

  • Kya hai? Views woh custom windows hote hain jo base tables se specific data ko dikhate hain.
  • Kya karte hain? Yeh khud data store nahi karte, lekin base tables se data ka specific hissa dikhane ka tareeka provide karte hain.
  • Kyun useful hain? Views complex queries ko simplify karne, limited access ke zariye security provide karne, aur base tables se sirf specific columns ya rows dikhane mein madad karte hain.

Characteristics of Views In DBMS In Hindi

  • Views are created to simplify complex queries, provide a layer of abstraction, and limit access to certain columns or rows.
  • Changes made to the data through views affect the underlying base tables, and views are dynamically generated based on the current data in the base tables.
  • Views are often used for security purposes, allowing users to access a predefined subset of data without exposing the entire structure of the underlying tables.

Udaharan: Maan lijiye aapne ek view banaya hai jiska naam “AvailableBooks” hai, jo sirf un books ko dikhata hai jinke quantity 0 se zyada hai.

CREATE VIEW AvailableBooks AS SELECT * FROM Books WHERE Quantity > 0;

Ab, users AvailableBooks view ko dekh kar current available books ki list dekh sakte hain bina seedhe base Books table ke saare details ke saath deal kare.

Ek shabd mein, base tables asli data ko store karte hain, aur views data ko dekhne ya interact karne ka ek tailor-made tareeka offer karte hain.

Advantages of Base tables and views In DBMS In Hindi:-

Base Tables (Mool Table):

  1. Data Storage:
    • Ye tables hain jo asli data ko store karte hain. Yeh raw aur original data ko structured format mein rakhte hain.
  2. Data Integrity:
    • Base tables data integrity constraints ko enforce karte hain jaise ki primary key, unique key, aur foreign key constraints.
    • Inse data ki accuracy aur consistency ensure hoti hai.
  3. Direct Access:
    • Applications base tables mein se data ko seedhe query aur modify kar sakte hain.
    • Seedha access data ko tezi se retrieve karne mein madad karta hai.
  4. Normalization:
    • Base tables normalization process ko support karte hain jisme data ko chhote tables mein organize kiya jata hai taki redundancy aur dependency kam ho.
  5. Security:
    • Base table level par security measures lagayi ja sakti hain, jo sensitive data tak pahunchne ko rokta hai.
    • Permissions aur privileges set karke user actions ko restrict kiya ja sakta hai.

Views (Drishti):

  1. Data Abstraction:
    • Views ek layer provide karte hain jisme users sirf kuch specific data ko dekhte hain, pure database ki complexity se bach ke.
    • Users ko underlying tables ke complexity se bachakar relevant information par focus karne mein madad karta hai.
  2. Simplified Queries:
    • Views complex queries ko simplify kar sakte hain kyunki yeh predefined joins, filters, aur aggregations ko allow karte hain.

Disadvantages of Base tables and views In DBMS In Hindi:-

Base Tables (Mool Tables) ki Disadvantages:

  1. Complex Queries:
    • Complex queries ko execute karna base tables par depend karta hai, jo kabhi-kabhi challenging ho sakta hai.
  2. Data Redundancy:
    • Kabhi-kabhi base tables mein data redundancy ho sakti hai, especially jab unko normalize nahi kiya gaya hai.
  3. Security Overhead:
    • Security measures implement karna base table level par complexity badha sakta hai, aur maintenance ko difficult bana sakta hai.

Views (Drishti) ki Disadvantages:

  1. Performance Overhead:
    • Views ke use mein performance overhead ho sakta hai kyunki yeh real-time data access ko impact kar sakta hai.
  2. Limited Updateability:
    • Kuch views update ke liye limit ho sakti hain, especially jab woh multiple tables se derive hoti hain.
  3. Dependency on Base Tables:
    • Views base tables par depend karti hain, aur agar base tables mein kuch changes hote hain, to views ko bhi update karna pad sakta hai.
  4. Complexity for Users:
    • Views use karne wale users ke liye yeh complex ho sakta hai kyunki unhe asli database structure ke sath deal nahi karna padta.

Har situation mein, base tables aur views ke advantages aur disadvantages ko consider karna important hai, aur inka sahi istemal depend karta hai database design aur use case par.

Leave a Comment