0% found this document useful (0 votes)
10 views5 pages

DBMS 2

Uploaded by

pushkarwaykole73
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)
10 views5 pages

DBMS 2

Uploaded by

pushkarwaykole73
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
You are on page 1/ 5

1. What is DBMS and how does it differ from RDBMS?

DBMS manages data; RDBMS organizes data into related tables (PostgreSQL is RDBMS).

2. What are the ACID properties?

Atomicity: All-or-nothing.

Consistency: Data remains valid.

Isolation: Transactions don't interfere.

Durability: Committed data is permanent.

3. What is normalization?

Organizing data to reduce redundancy; 1NF (atomic data), 2NF (full dependency), 3NF
(no transitive dependency).

4. Primary vs. Foreign Key?

Primary: Unique identifier for a row.

Foreign: Refers to a primary key in another table.

5. What is a transaction?

A unit of work ensuring ACID properties; handled via COMMIT and ROLLBACK.

6. What are joins?

Combining data from multiple tables. Types: Inner, Left, Right, Full.

7. What is indexing?

A structure that improves query speed by reducing data retrieval time.

1. What is PostgreSQL?

Open-source RDBMS with advanced features like JSON, MVCC, and custom data types.
2. PostgreSQL features?

Extensibility, JSON/JSONB, MVCC, inheritance.

3. pgAdmin?

GUI tool for PostgreSQL database management.

4. psql?

Command-line interface for managing PostgreSQL databases.

5. CTE (Common Table Expression)?

A temporary result set used in complex queries.

6. Full-text search in PostgreSQL?

Uses tsvector and tsquery for searching text efficiently.

7. JSON vs. JSONB?

JSON stores raw text; JSONB stores data in binary for faster querying.

8. Roles and permissions?

Roles control access to database objects via GRANT and REVOKE.

1. What is a view?

Virtual table presenting data from other tables.

2. Stored procedure vs. function?

Procedure performs actions; function returns values.


3. What is a trigger?

Automatically executes SQL statements on table events.

4. Clustered vs. Non-clustered index?

Clustered: Sorts table data; Non-clustered: Separate structure.

5. DELETE vs. TRUNCATE vs. DROP?

DELETE: Removes rows.

TRUNCATE: Removes all rows.

DROP: Deletes the table.

6. OLTP vs. OLAP?

OLTP: Handles transactions.

OLAP: Analytical processing on large datasets.

7. Types of relationships?

1:1, 1:M, M:M (one-to-one, one-to-many, many-to-many).

8. What is referential integrity?

Ensures foreign keys match valid primary keys.

9. UNION vs. UNION ALL?

UNION removes duplicates; UNION ALL keeps all records.

10. What is a transaction log?

Records changes to help recover from failures.

11. What is sharding?


Distributing data across multiple servers for scalability.

12. Hierarchical vs. Network vs. Relational models?

Hierarchical: Tree.

Network: Graph.

Relational: Tables.

13. What is data redundancy?

Repeated data; normalization reduces it.

14. What is a composite key?

A combination of two or more columns that uniquely identifies a row.

15. What is a subquery?

A query within another query.

16. Correlated vs. Non-correlated subquery?

Correlated: Depends on the outer query.

Non-correlated: Independent.

17. What are constraints?

Rules for columns (e.g., primary key, foreign key, unique, not null).

18. What is deadlock?

Circular wait for resources; avoided by prevention, detection, or timeouts.

19. What is a materialized view?

Precomputed and stored result of a query.


20. What is RAID?

A method to improve storage reliability and performance through disk arrays (RAID 0, 1,
5).

You might also like