Software Development Exam  >  Software Development Notes  >  Database Management System (DBMS)  >  Assignment: DBMS Architecture

Assignment: DBMS Architecture | Database Management System (DBMS) - Software Development PDF Download

Multiple Choice Questions (MCQs)

Q.1. Which of the following is not a component of a DBMS architecture?
(a)
Query Language
(b) Storage Manager
(c) Transaction Manager
(d) Network Manager

Ans. (d)

Q.2. Which type of DBMS architecture allows the user to interact directly with the database files?
(a)
Hierarchical DBMS
(b) Network DBMS
(c) Relational DBMS
(d) Flat-file DBMS

Ans. (d)

Q.3. In a client-server DBMS architecture, which component is responsible for managing concurrency control and transaction management?
(a) 
Client
(b) Server
(c) Database Engine
(d) Operating System

Ans. (c)

Q.4. Which of the following is not a type of DBMS architecture?
(a) 
Centralized DBMS
(b) Distributed DBMS
(c) Parallel DBMS
(d) Hierarchical DBMS

Ans. (d)

Q.5. In a peer-to-peer DBMS architecture, which of the following is true?
(a)
There is no central coordination or control.
(b) All peers have equal capabilities and responsibilities.
(c) Peers can directly access each other's data.
(d) All of the above.

Ans. (d)

High Order Thinking Skills (HOTS)

Q.1. Explain the client-server DBMS architecture and discuss its advantages and disadvantages.

The client-server DBMS architecture consists of a server component that manages the database and a client component that interacts with the server to request and retrieve data. The server is responsible for managing concurrency control, transaction management, and data storage, while the client is responsible for displaying and manipulating data.

Advantages: Centralized control, efficient management of resources, improved security, and scalability.

Disadvantages: Dependency on the server, potential performance bottlenecks, increased network traffic, and higher implementation and maintenance costs.

Q.2. Compare and contrast centralized and distributed DBMS architectures. Discuss their advantages and disadvantages.

Centralized DBMS architecture stores all data on a single computer, which acts as a central point of control. It offers simplicity and easy management but can be a single point of failure. Distributed DBMS architecture distributes data across multiple computers connected through a network, providing fault tolerance and improved performance but introducing complexity and synchronization challenges.

Advantages of centralized architecture: Simplified management, easier backup and recovery, and lower network overhead.

Disadvantages of centralized architecture: Single point of failure, limited scalability, and potential performance bottlenecks.

Advantages of distributed architecture: Fault tolerance, improved performance, and scalability.

Disadvantages of distributed architecture: Complexity, data consistency challenges, and higher implementation and maintenance costs.

Q.3. Discuss the differences between hierarchical and relational DBMS architectures. Provide examples of use cases where each architecture is suitable.

Hierarchical DBMS architecture organizes data in a tree-like structure, with parent-child relationships between data elements. It is suitable for representing hierarchical relationships, such as organizational structures. Relational DBMS architecture organizes data in tables, using relations between tables to represent relationships. It is suitable for complex data with multiple interrelated entities.

Example use case for hierarchical architecture: Representing an organizational chart.

Example use case for relational architecture: Managing customer data in an e-commerce system, where customers can have orders and order items.

Q.4. What is meant by a parallel DBMS architecture? Explain its advantages and disadvantages.

Parallel DBMS architecture involves processing data simultaneously by multiple processors to increase performance. It allows for tasks to be divided among multiple processors and executed in parallel. Advantages include improved performance and scalability. However, it requires specialized hardware and software, and data partitioning and synchronization can be challenging, leading to potential bottlenecks and increased complexity.

Q.5. Explain the peer-to-peer DBMS architecture and discuss its advantages and challenges.

Peer-to-peer DBMS architecture allows multiple peers to directly access and share data without central coordination or control. Each peer has equal capabilities and responsibilities, and they can act as both clients and servers. Advantages include decentralized control, fault tolerance, and improved scalability. Challenges include data consistency, security, and maintaining synchronization between peers.

Fill in the Blanks

1. The ____________ component of a DBMS architecture manages the physical storage of data on disk.

Storage Manager

2. In a ____________ DBMS architecture, data is organized in a tree-like structure.

Hierarchical

3. A ____________ DBMS architecture allows the user to interact directly with the database files.

Flat-file

4. In a distributed DBMS architecture, data is stored across ____________ computers.

Multiple

5. In a parallel DBMS architecture, data is processed ____________ by multiple processors.

Simultaneously

True/False

1. In a centralized DBMS architecture, all data is stored on a single computer.

True

2. The client component of a DBMS architecture is responsible for managing concurrency control.

False

3. Relational DBMS architecture organizes data in a tree-like structure.

False

4. In a distributed DBMS architecture, data can be replicated on multiple computers for fault tolerance.

True

5. Parallel DBMS architecture allows for processing data in parallel, thereby increasing performance.

True

Hands-On Questions

Q.1. Write a SQL query to retrieve all customers from the "Customers" table whose age is greater than 30.

SELECT * FROM Customers WHERE age > 30;

Q.2. Given the following relational schema, write a SQL query to retrieve the names of all employees who work in the "Sales" department:
Employees (emp_id, emp_name, department)

SELECT emp_name FROM Employees WHERE department = 'Sales';

Q.3. Consider a distributed DBMS architecture with three database servers: Server A, Server B, and Server C. Each server stores a copy of the same data. Write a SQL query to retrieve the total number of customers from all servers.

SELECT SUM(customers) FROM ServerA.Customers UNION ALL SELECT SUM(customers) FROM ServerB.Customers UNION ALL SELECT SUM(customers) FROM ServerC.Customers;

Q.4. Implement a Python function that takes a list of numbers as input and returns the sum of all even numbers in the list.

def sum_of_even_numbers(numbers):

    sum = 0

    for num in numbers:

        if num % 2 == 0:

            sum += num

    return sum

Q.5. Write a Java code snippet to establish a connection to a MySQL database and retrieve all records from the "Employees" table.

import java.sql.*;


public class DatabaseConnection {

    public static void main(String[] args) {

        Connection connection = null;

        Statement statement = null;

        ResultSet resultSet = null;


        try {

            // Establish connection

            connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/database", "username", "password");


            // Create statement

            statement = connection.createStatement();


            // Execute query

            resultSet = statement.executeQuery("SELECT * FROM Employees");


            // Process result

            while (resultSet.next()) {

                int emp_id = resultSet.getInt("emp_id");

                String emp_name = resultSet.getString("emp_name");

                String department = resultSet.getString("department");


                System.out.println("Employee ID: " + emp_id);

                System.out.println("Employee Name: " + emp_name);

                System.out.println("Department: " + department);

                System.out.println("--------------------------");

            }

        } catch (SQLException e) {

            e.printStackTrace();

        } finally {

            // Close resources

            try {

                if (resultSet != null)

                    resultSet.close();

                if (statement != null)

                    statement.close();

                if (connection != null)

                    connection.close();

            } catch (SQLException e) {

                e.printStackTrace();

            }

        }

    }

}

The document Assignment: DBMS Architecture | Database Management System (DBMS) - Software Development is a part of the Software Development Course Database Management System (DBMS).
All you need of Software Development at this link: Software Development
75 videos|44 docs

Top Courses for Software Development

75 videos|44 docs
Download as PDF
Explore Courses for Software Development exam

Top Courses for Software Development

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Extra Questions

,

Viva Questions

,

Free

,

Semester Notes

,

Assignment: DBMS Architecture | Database Management System (DBMS) - Software Development

,

past year papers

,

pdf

,

mock tests for examination

,

study material

,

Assignment: DBMS Architecture | Database Management System (DBMS) - Software Development

,

MCQs

,

Summary

,

Objective type Questions

,

video lectures

,

Assignment: DBMS Architecture | Database Management System (DBMS) - Software Development

,

Previous Year Questions with Solutions

,

Sample Paper

,

ppt

,

Important questions

,

shortcuts and tricks

,

Exam

,

practice quizzes

;