Looking for Course 1823 test answers and solutions? Browse our comprehensive collection of verified answers for Course 1823 at moodle.polytechnic.bh.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
A web application retrieves product data from a database and then sorts the results before displaying them. Currently, the database returns all 50,000 products (no index, full table scan), and the application sorts them using a method where doubling the input quadruples the work. Two changes are proposed:
Which change addresses the larger source of wasted energy?
An IoT platform stores sensor data in a single large table containing 90 days of readings. Most queries filter on a specific date range (such as retrieving data from the last 24 hours). A database administrator proposes partitioning the table by day, creating 90 separate daily segments. How does this reduce query energy for date-filtered queries?
A university database uses a normalised schema with separate Students, Majors, and Departments tables. A report query joins all three tables. The IT department proposes denormalising by copying the major name and department building directly into the Students table. Which statement correctly describes the trade-off?
A
A company operates four microservices, all written in Python. The figure shows how each service divides its request time between CPU processing and waiting for external I/O. The company can afford to rewrite only one service in a compiled language. Which service would benefit most from the rewrite, and why?
A messaging application checks the server for new messages every 10 seconds, regardless of whether any messages have arrived. An alternative design uses push notifications, where the server notifies the application only when a new message exists. Both designs deliver messages to the user. Why does the push-based design consume significantly less energy?
A program searches for an item across 10 databases sequentially. The program checks all 10 databases regardless of whether the item is found in the first one. If the item exists in the second database, how many databases are searched unnecessarily?
A query uses SELECT * to retrieve all 20 columns from a table, but the application only displays 3 of those columns. Which of the following correctly describes why this pattern increases energy consumption?
A compiled language translates the operation a = b + c into a single processor ADD instruction. An interpreted language performs the same operation by looking up variable names in a table, checking their types, selecting the appropriate addition operation, performing the addition, and storing the result. What category of overhead does this represent?
A database table stores 100,000 student records. A query searches for all students in a specific major. Without an index, the database reads every page of the table. With an index on the major column, the database reads only the pages containing matching rows. What is the mechanism that allows the index to skip irrelevant pages?
A system searches for a specific record in a dataset of 50,000 entries. The data is maintained in sorted order, so each comparison eliminates half of the remaining candidates. Which structural property of the data makes this possible?