[go: up one dir, main page]

0% found this document useful (0 votes)
9 views7 pages

Dbms

Uploaded by

rajkumarkus2004
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)
9 views7 pages

Dbms

Uploaded by

rajkumarkus2004
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/ 7

1. What is the full form of RDBMS?

RDBMS stands for Rela onal Database Management System. It is a database management
system that organizes data into structured formats using tables (rela ons) and establishes
rela onships between them to ensure efficient management.

2. What is the use of RDBMS?


RDBMS is widely used to:
 Store and Organize Data: Data is stored in tables with predefined rows and columns.
 Maintain Data Integrity: Enforces data consistency using constraints like Primary Keys
and Foreign Keys.
 Perform Complex Queries: Uses SQL to retrieve specific informa on.
 Support Mul -User Environments: Allows mul ple users to access and modify the
data simultaneously while maintaining security and integrity.

3. What is the purpose of PL-SQL?


PL-SQL (Procedural Language for SQL) is an extension of SQL used in Oracle databases. Its
purpose is to:
 Combine SQL’s data manipula on power with procedural programming constructs like
loops, condi ons, and func ons.
 Enable the development of complex business logic and database programs like stored
procedures, triggers, and func ons.
 Improve performance by reducing network traffic, as mul ple SQL statements can be
bundled and executed as a single block.

4. What is the use of MySQL so ware?


MySQL is an open-source RDBMS so ware used for:
 Web Development: Managing databases for websites and applica ons.
 Data Storage: Storing structured data for small to large-scale applica ons.
 Scalability: Handling simple to complex queries efficiently.
 Interoperability: Suppor ng mul ple pla orms and programming languages.
5. Name some common RDBMS so ware.
 Oracle Database: Enterprise-grade RDBMS with robust features.
 MySQL: Lightweight, fast, and widely used for web applica ons.
 Microso SQL Server: Popular in enterprise environments with seamless integra on
with Microso tools.
 PostgreSQL: Advanced, open-source RDBMS suppor ng complex queries and
extensibility.
 IBM Db2: High-performance database with AI and analy cs capabili es.
 SQLite: Lightweight RDBMS used in mobile apps and embedded systems.

6. What is the use of Foreign Key?


A Foreign Key is used to:
 Establish Rela onships: Links two tables by referencing the Primary Key of another
table.
 Enforce Referen al Integrity: Ensures that the referenced data exists before any
opera on on the foreign key table.
 Example: In a database, an Orders table may have a Foreign Key referencing the
Customers table to link orders to specific customers.

7. What is the use of DBMS?


A Database Management System (DBMS) is used to:
 Store and Manage Data: Organizes data efficiently for easy retrieval and updates.
 Ensure Security: Implements user authen ca on and access controls.
 Eliminate Redundancy: Minimizes data duplica on by maintaining rela onships.
 Support Query Execu on: Provides tools for complex data queries and analy cs.

8. What is the use of the INSERT statement?


The INSERT statement is used to:
 Add new rows (records) into a database table.
 Syntax Example:

 INSERT INTO employees (id, name, department) VALUES (101, 'John Doe', 'HR');
9. What is Foreign Key?
A Foreign Key is a constraint in RDBMS that:
 Links two tables by referencing the Primary Key in another table.
 Ensures data integrity by allowing only valid references.
Example: In a Courses table, Student_ID can act as a Foreign Key referencing the
Student_ID in the Students table.

10. What is the use of the diamond symbol in ER-Diagram?


In an En ty-Rela onship (ER) Diagram:
 A diamond represents rela onships between en es.
 Example: In a university database, the rela onship Enrolled between en es Student
and Course would be shown as:
[Student] --- (Enrolled) --- [Course]

11. What is the full form of DBMS?


DBMS stands for Database Management System.

12. What is the purpose of SQL?


SQL (Structured Query Language) is used for:
 Querying data from databases (SELECT statements).
 Modifying data (INSERT, UPDATE, DELETE).
 Defining database structure (CREATE, ALTER).
 Controlling access and permissions (GRANT, REVOKE).

13. What is the use of Oracle so ware?


Oracle Database is used for:
 Enterprise data management and large-scale applica ons.
 Handling transac ons with high availability and reliability.
 Performing advanced analy cs and data processing.
14. What is the use of Primary Key?
A Primary Key is used to:
 Uniquely iden fy each record in a table.
 Ensure data integrity and prevent duplicate entries.
Example: Student_ID in a Students table.

15. What is the use of the GRANT statement?


The GRANT statement is used to:
 Provide specific permissions to users or roles on database objects like tables, views,
and stored procedures.
 Example:
 GRANT SELECT, INSERT ON employees TO user123;

16. How is data stored in DBMS?


Data in DBMS is stored:
 In tables consis ng of rows (records) and columns (fields).
 Physically in files or blocks within the database storage system.

17. How is data inserted in a table in Oracle?


Data is inserted using the INSERT INTO statement:
INSERT INTO table_name (column1, column2) VALUES (value1, value2);

18. How is a table created in Oracle?


A table is created using the CREATE TABLE command:
CREATE TABLE employees (
employee_id NUMBER,
name VARCHAR2(50),
department VARCHAR2(30)
);
19. Why is data stored in tables in RDBMS?
Data is stored in tables because:
 It maintains a structured format, allowing rela onships between datasets.
 It simplifies querying and ensures consistency through constraints.
 Reduces data redundancy.
 Prevents anomalies (e.g., update, delete, or insertion anomalies).
 Breaks data into related tables, ensuring logical consistency.

20. Draw the ER diagram of a table rela ng students and their marks.
(Provide an ER diagram with en es "Students" and "Marks," connected via "Has," using
a ributes like Student_ID and Subject_ID.)

21. Write about the uses of Keys in RDBMS.


 Primary Key: Ensures unique record iden fica on.
 Foreign Key: Links tables and enforces referen al integrity.
 Unique Key: Prevents duplicate values in a column.
 Composite Key: Combines mul ple columns to create a unique iden fier.

22. What are the advantages of DBMS over tradi onal file systems?
 Reduced redundancy and inconsistency.
 Centralized data control.
 Improved security and access control.
 Concurrent access by mul ple users.

What are the advantages of using Primary Key and Foreign Key in RDBMS?

Advantages of Using a Primary Key

A Primary Key uniquely identifies each row in a table.

1. Uniqueness:
o Ensures that each record in a table can be uniquely identified.
o Prevents duplicate entries in the column(s) defined as the primary key.
2. Data Integrity:
o Guarantees that the key value is always unique and not null, maintaining data integrity.
3. Indexing for Fast Access:
o Most RDBMSs automatically create an index on the primary key column(s), improving query
performance when searching or retrieving specific records.
4. Referential Integrity:
o Enables other tables to establish relationships using foreign keys, ensuring consistent and
valid references between tables.
5. Easy Identification:
o Makes it easier to locate, update, or delete specific records without ambiguity.

Advantages of Using a Foreign Key

A Foreign Key establishes a relationship between two tables, linking a column in one table (child table) to a
primary key in another (parent table).

1. Enforces Referential Integrity:


o Ensures that values in the foreign key column must match a valid primary key value in the
parent table, preventing orphaned records.
2. Relationship Representation:
o Models real-world relationships between entities (e.g., orders and customers) directly in the
database schema.
3. Data Consistency:
o Prevents invalid data by ensuring that foreign key constraints are upheld (e.g., you cannot
delete a parent record referenced by a foreign key in a child table without handling it).
4. Cascading Actions:
o Supports cascading operations (e.g., ON DELETE CASCADE, ON UPDATE CASCADE), which automate
the propagation of changes in the parent table to the child table.
5. Normalization:
o Promotes normalization by allowing data to be divided into related tables, reducing
redundancy and improving storage efficiency.

What are tablespaces, and how are they used to store data?
Tablespaces are logical storage units in databases that:
 Store tables, indexes, and other database objects.
 Help op mize storage and simplify data management.

 Tablespaces are a logical layer of data storage in a database management system


(DBMS), used to group and manage physical storage structures such as data files. They
provide an abstrac on layer between the logical organiza on of database objects
(e.g., tables, indexes) and the underlying physical storage.

How Tablespaces Are Used


1. Data Storage and Management:
o Tablespaces store the data of tables, indexes, and other database objects.
o By dividing data across multiple tablespaces, databases can distribute and optimize storage.
2. Performance Optimization:
o Frequently accessed objects can be stored in separate tablespaces on faster disks (e.g.,
SSDs).
o Less critical data can reside on slower storage, improving cost-efficiency.
3. Backup and Recovery:
o Tablespaces allow selective backups and restores. For example, only certain tablespaces can
be restored instead of the entire database.
4. Quotas and Limits:
o Quotas can be set for users on specific tablespaces to limit the storage they can use.
5. Data Partitioning:
o Large tables or indexes can be partitioned across multiple tablespaces to improve
manageability and query performance.
6. Support for Multi-Tenant Applications:
o Each tenant in a multi-tenant application can have a dedicated tablespace, isolating their
data.

You might also like