GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

We are a new travel website which offers exclusive discounts…

We are a new travel website which offers exclusive discounts from our partner resorts and tour groups to discerning clients that have a credit card with our parent corporation.  The number of offerings is not huge because we target only high end properties and exclusive tour groups for out clients.  We want to calculate the best index to make in our database to maximize performance for our customers who can assess the database through our website and view our travel offerings. Bookings are done in another systems once a customer is ready to book. We estimate that all of the database transaction for the table we are currently interested in can be placed into three query types. Q1: Queries that our clients execute that accesses information about travel destinations in a specific category (skiing, diving, adventure, luxury travel etc) Q2: Queries that our clients execute that access information about activities in a specific location which are broken down into either city or subcity sections depending on the city size (, Tokyo Ginza area, London Mayfair, Concord, Tampa etc) Q3: Queries that our sales team performs that add new resorts and tours organization to our partnership data base so the customers can discovery them.  Because we are new the addition of new clients has been rapid Assumptions about the data.  We have grown considerably and this table is currently 40 pages in length so if we have to access the entire database it required 40 pages reads. On average a location has 5 partner offerings and each category of offering is available in 20 different locations. Make the assumption that if we know the locations of each partner we still make 5 disk access for Q2 and if we know the locations of the offerings  in each category 20 disk access are required for Q1. One disk access is required to read any index we use and if we modify the database we must also modify the index (requiring both a read and a write (2 disk access)). We will also assume that if we modify the database we can find a blank page and will only require one disk access to read the page and one to write back the modified page. Given these assumptions would it be better to use no index, one index on locations, one index on offerings, or two indexes (both offerings and locations)? Action Frequency No index Index on offerings Index on Location Both index Q1: Category .30         Q2: Location .60         Q3: Update .10         Average           Calculate the average for each of the 4 options.  What is the lowest average (report to 1 decimal place e.g. XX.x)?

Read Details

The table “Department” was created with the specification be…

The table “Department” was created with the specification below.    CREATE TABLE Department ( Code TINYINT UNSIGNED, Name VARCHAR(20) UNIQUE, ManagerID SMALLINT, Appointment DATE, PRIMARY KEY (Code), UNIQUE (ManagerID, Appointment) );True or False that the two rows below violate the UNIQUE constraints on Department. (12, ‘Marketing’, 2538, ‘2019-11-22’) (99, ‘Marketing’, NULL, NULL)

Read Details

Consider table Worker(name,pay) where name is a key, and the…

Consider table Worker(name,pay) where name is a key, and the following two concurrent transactions.   T1:   Begin Transaction   S1: update Worker set pay = 2*pay where name = ‘Amy’   S2: update Worker set pay = 3*pay where name = ‘Amy’   Commit T2:   Begin Transaction   S3: update Worker set pay = pay-20 where name = ‘Amy’   S4: update Worker set pay = pay-10 where name = ‘Amy’   Commit Assume that the individual statements S1, S2, S3, and S4 always execute atomically. Let Amy’s pay be 50 before either transaction begins execution. Suppose both transactions T1 and T2 execute to completion with isolation level Read-Committed.  What are the possible values for Amy’s final pay?  

Read Details

A NULL value represents _________

A NULL value represents _________

Read Details

A _____ is a collection of values with no inherent order

A _____ is a collection of values with no inherent order

Read Details

Refer to the Product table. Which of the following would com…

Refer to the Product table. Which of the following would complete the SQL statement to select all products with sizes 0-3M, 3-6M, and 6-9M (Select all options that would work). SELECT ProductName, Quantity FROM Product WHERE Size _____ (‘0-3M’, ‘3-6M’, ‘6-9M’);

Read Details

Refer to the Product table. Complete the SQL statement to se…

Refer to the Product table. Complete the SQL statement to select the two set…… ‘Cosmic Encounters Expansion Set’ and ‘Terraforming Mars Expansion Set’. ProductID Product Name Price Quantity 012 Cosmic Encounters Expansion Set 95.99 12 011 Terraforming Mars 69.95 6 143 Mousetrap 56.95 12 214 Terraforming Mars Expansion Set 95.99 18 421 Cosmic Encounters Basic 49.95 6 129 Azul 44.99 24 SELECT ProductName, Quantity FROM Product WHERE ProductName LIKE _____;

Read Details

Which of the following is in SQL but is not a relational alg…

Which of the following is in SQL but is not a relational algebra operation?  

Read Details

Complete the ORDER BY clause to sort the Products by Product…

Complete the ORDER BY clause to sort the Products by ProductName alphabetically, then Quantity from the smallest to the largest. SELECT ProductName, Size, Quantity, SupplierId FROM Product ORDER BY _____ ;

Read Details

Refer to the following tables: Employee ID Name Salary…

Refer to the following tables: Employee ID Name Salary 4428 Amin Shah 42500 5993 Malia Tarkas 53000 Student ID Name Scholarship 1408 Indira 3000 5993 Malia Tarkas 7110 Jiho Chen 4500 How many rows are in the table defined by the following relational algebra expression?

Read Details

Posts pagination

Newer posts 1 … 7 8 9 10 11 … 80,924 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top