0% found this document useful (0 votes)
31 views4 pages

DBMS & RDBMS Complete Study Guide

Uploaded by

schaubey200
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views4 pages

DBMS & RDBMS Complete Study Guide

Uploaded by

schaubey200
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

■ DBMS & RDBMS Complete Notes — STET Oriented

■ 1. DBMS Definition:
DBMS (Database Management System) is software that stores, manages, retrieves, and
manipulates data efficiently. Purpose: Avoid redundancy, maintain consistency, provide
easy access. Example: School database for Student, Teacher, Class tables.

■ 2. Components of DBMS:
Hardware: Physical devices (Server, Storage)
Software: DBMS software (MySQL, Oracle)
Data: Raw facts (Name, Roll, Marks)
Users: DBA, End Users, Programmers

■ 3. Advantages of DBMS:
Reduces data redundancy, Maintains consistency, Provides security, Multi-user access,
Backup & Recovery.

■ 4. Types of DBMS:
Hierarchical (Tree) - IMS
Network (Graph) - IDMS
Relational (Tables) - MySQL, Oracle
Object-Oriented (Objects) - OODBMS

■ 5. RDBMS:
Stores data in tables (relations) with rows (tuples) and columns (attributes). Features:
Primary key, Foreign key, SQL support, Data integrity, Relationships.
Example: Student Table(Roll, Name, ClassID).

■ 6. ER Model:
Diagrammatic representation of entities, attributes, and relationships.
Entities: Student, Teacher, Class
Attributes: Name, RollNo, Age
Relationships: Student ENROLLED_IN Class (1:N)
Weak Entity: Marks depends on Student
Symbols: Rectangle=Entity, Oval=Attribute, Diamond=Relationship

■ 7. Three Schema Architecture:


Internal/Physical: How data is stored
Conceptual/Logical: Logical structure of DB
External/View: User perspective

■ 8. Keys:
Primary Key, Foreign Key, Composite Key, Candidate Key, Super Key.

■ 9. Normalization:
1NF: Atomic values, no repeating groups
2NF: No partial dependency (remove attributes dependent on part of composite key)
3NF: No transitive dependency (non-key depends only on key)
BCNF: Every determinant is a candidate key

■ 10. Relational Algebra Basics:


Selection σ, Projection π, Union ∪, Set Difference −, Cartesian Product ×, Join ■, Rename
ρ
Example: σ(Class='5')(Student) → Students of class 5

■ 11. SQL Basics:


SELECT: Fetch columns
INSERT: Add record
UPDATE: Modify record
DELETE: Remove record

SQL JOINs:
INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN

Aggregate Functions:
COUNT(), SUM(), AVG(), MIN(), MAX()
Example: SELECT COUNT(*) FROM Student;

■ 12. Transactions & ACID:


Atomicity, Consistency, Isolation, Durability

■ 13. DBMS vs File System:


Redundancy: High vs Low
Consistency: Low vs High
Security: Weak vs Strong
Concurrent Access: Hard vs Supported
Backup: Manual vs Built-in

■ 14. Real-Life Example:


School DB: Student Table, Class Table, Teacher Table
Query: SELECT Name FROM Student WHERE Class='5';
Insert, Update, Delete operations
■ 15. Quick Revision Notes:
- DBMS = Store + Manage + Retrieve data efficiently
- RDBMS = Tables + Rows + Columns + Keys
- ER Model = Blueprint / Diagram for DB design
- Normalization: 1NF → 2NF → 3NF → BCNF
- SQL basics: SELECT, JOIN, Aggregate functions
- ACID properties for transactions
- 3-Schema Architecture: Internal, Conceptual, External
- DBMS vs File System differences
- Focus for STET: Relational DBMS, Keys, SQL queries, Normalization, ACID, ER
diagrams.

■ STET Most Expected DBMS/RDBMS MCQs:

1■■ DBMS full form → Database Management System


2■■ RDBMS stores data in → Tables (Relations)
3■■ Primary Key uniquely identifies → Row in table
4■■ Foreign Key → Links tables
5■■ 1NF rule → Atomic values only
6■■ 2NF removes → Partial dependency
7■■ 3NF removes → Transitive dependency
8■■ BCNF → Determinant must be candidate key
9■■ ER Entity → Real-world object
■ ER Weak Entity → Cannot exist without parent
11■■ SQL SELECT → Fetch columns
12■■ SQL INSERT → Add new record
13■■ SQL UPDATE → Modify record
14■■ SQL DELETE → Remove record
15■■ SQL INNER JOIN → Only matching rows
16■■ LEFT JOIN → All left + matching right
17■■ Aggregate function COUNT() → Count rows
18■■ SUM() → Sum column
19■■ AVG() → Average
20■■ MIN() → Minimum
21■■ MAX() → Maximum
22■■ ACID 'A' → Atomicity
23■■ ACID 'C' → Consistency
24■■ ACID 'I' → Isolation
25■■ ACID 'D' → Durability
26■■ DBMS vs File System → Redundancy (High vs Low)
27■■ DBMS vs File System → Security (Weak vs Strong)
28■■ 3-Schema Architecture → Internal, Conceptual, External
29■■ Relational Algebra σ → Selection
30■■ Relational Algebra π → Projection

Common questions

Powered by AI

SQL's JOIN operations facilitate complex data retrieval by allowing rows from multiple tables to be combined based on a related column. An INNER JOIN returns only the rows with matching values in both tables. A LEFT JOIN, on the other hand, returns all rows from the left table and the matched rows from the right table; unmatched rows will contain NULL in the right side. FULL JOIN returns all rows when there is a match in either left or right table records, placing NULL where there is no match. These operations enable complex queries involving multiple tables, crucial for comprehensive data analysis .

Normalization improves database consistency and efficiency by minimizing redundancy, ensuring data integrity, and making updates easier. 1NF requires atomic values and the absence of repeating groups, meaning each column must store a single value per record. 2NF eliminates partial dependency by ensuring that non-prime attributes are fully functionally dependent on the primary key, thus removing any dependency on a part of a composite key. 3NF removes transitive dependency, ensuring that non-key fields depend only on the primary key, and not indirectly through another non-key attribute .

The main characteristic that distinguishes RDBMS from DBMS is the use of tables (relations) with rows (tuples) and columns (attributes) in RDBMS to define and enforce data relationships and access. DBMS stores data without relations between datasets and focuses on reducing redundancy and maintaining consistency independently. RDBMS supports SQL, keys (primary and foreign), and integrity constraints to ensure data interactions across tables, whereas DBMS might not explicitly manage these relational aspects .

Keys in RDBMS are critical for enforcing data integrity and establishing relationships between tables. The primary key uniquely identifies each record in a table, ensuring no duplicate rows. A foreign key links a column from one table to the primary key of another, maintaining referential integrity between tables. Composite keys consist of multiple attributes to uniquely identify a record, while candidate keys are a set of attributes that can uniquely identify a row within a table. Super keys are a superset of candidate keys, and a primary key is a specific candidate key chosen to ensure row uniqueness .

In a DBMS environment, the components include hardware (servers, storage devices), software (DBMS software like MySQL, Oracle), data (raw facts), and users (Database Administrators, End Users, Programmers). The users interact with the DBMS software to store, retrieve, and manage data. DBAs configure, tune, and maintain the system's integrity and security, while end users execute CRUD operations through applications. Programmers develop and maintain application interfaces and manage complex queries and transactions .

The ER model serves as a blueprint for database design by providing a diagrammatic representation of the database structure, clarifying the entities involved, their attributes, and how they relate to one another. Entities represent real-world objects or concepts (e.g., Students, Teachers) that have attributes (e.g., Name, Age). Relationships define how entities are connected (e.g., Students enrolled in Classes), demonstrating inter-entity dependencies. The model aids in visualizing database architecture, guiding physical database creation by specifying how data is stored and accessed, which ensures efficient and logical organization .

Relational algebra provides a theoretical foundation for SQL queries by defining a set of operations that manipulate relations (tables) to produce a new relation. These operations include selection (σ), projection (π), union (∪), set difference (−), Cartesian product (×), and join operations. Each operation corresponds to specific SQL functions and clauses, allowing structured query syntax to retrieve and manipulate data within an RDBMS effectively .

ACID properties are crucial in transaction management to ensure reliability and consistency within a database system. 'Atomicity' guarantees that a series of operations within a transaction are completed fully or not at all. 'Consistency' ensures that each transaction moves the database from one valid state to another, abiding by all predefined rules and constraints. 'Isolation' ensures that concurrent transactions do not interfere with each other, maintaining individual transaction integrity until they complete. 'Durability' ensures that once a transaction is committed, it remains persistent even in the event of system failures .

The three-schema architecture improves the database management process by providing a clear separation between the physical storage, the logical database structure, and the user interface views. This architecture includes three levels: the internal/physical schema, which details how data is physically stored; the conceptual/logical schema, which describes the logical structure and relationships of the data; and the external/view schema, which presents data to users in customized perspectives. This separation allows DBAs to alter the physical storage without affecting user views, hence supporting data abstraction and independence .

Redundancy, consistency, and security differences between DBMS and file systems significantly affect data management capabilities. In a DBMS, redundancy is low due to data being stored in a centralized database with relations that optimize data storage; in contrast, file systems often have high redundancy as files are independently managed, increasing chances of data duplication. Consistency is high in a DBMS because it enforces integrity constraints and transactional rules, whereas file systems lack these mechanisms, leading to inconsistency across files. DBMS also offers robust security features (access controls, encryption) compared to weaker security in file systems, which are more prone to unauthorized access .

You might also like