Question

In: Computer Science

1. A travel agency would like to track the destination of each flight. Given the following...

1.

A travel agency would like to track the destination of each flight. Given the following business rule, what constraint(s) can you apply to the flight table, given there is also a destination table?

"A flight must be associated with a destination".

Question 1 options:

Referential integrity

Check constraint

Nullability

Default constraint

2.

Constraint applied to a one-to-many relationship when a referenced record (on the 1 side) is deleted, then the referencing records (on the Many side) should also be deleted.

Question 2 options:

Set-to-Null on Delete

Set-to-Default on Delete

Restrict Delete

Cascade Delete

3.

Which of the following is the most appropriate data type for a column named "State" that stores abbreviated names of the states in USA like "TN", "VA" etc.

Question 3 options:

CHAR(3)

VARCHAR2(2)

VARCHAR2(3)

CHAR(2)

4.

How can database performance be improved without changing the logical design of the database? Check all that apply.

Question 4 options:

Combining tables that are in 1:1 relationships

Adding indexes & views

Horizontal Partitioning

Denormalization

Vertical Partitioning

5.

Which of the following statements best describe an index?

Question 5 options:

A mechanism for splitting a table into smaller ones

A database construct that provides direct access to specific fields in a table thus speeding up queries

A database construct that stores the values of all the attributes in a table

A mechanism for improving the design or structure of the database

Solutions

Expert Solution

1)Referential integrity

Explaination:

Here we have to apply the referential integrity to get the required result. Referential integrity is used to uniquely identify a row or a record in another table. It connects one table to another using foreign key. In the given situation, here it connects the flight table to destination table and gives us the result required by the travel agency that is destination of each flight.

2)Cascade Delete

Explaination:

A foreign key with cascade delete means that if a record in the parent table is deleted, then the corresponding records in the child table will automatically be deleted. This is called a cascade delete in SQL Server. Using Cascade Delete we can delete the referencing records will be deleted if it is one to many relationship record.

3) CHAR(2)

Explaination:

CHAR(2) is the most appropriate data type for a column name "state" that stores abbreviated names of the states in USA like "TN", "VA" etc. as these names of states are having only letters char is enough and given state names are having 2 letters each. So that it is CHAR(2).

4)Combining tables that are in 1:1 relationships

   Adding indexes and views

   Horizontal partitioning

Explaination:

The above will improve the performance of database without changing the logical design of the database. Combinaing two tables will help us to avoid redundancy. By adding indexes and views, we can able to access data in a simple manner and it will be fast. Horizontal partitioning divides a table into multiple tables that contain the same number of columns, but fewer rows.

Why i didn't select the vertical partitioning and denormalization is becuase of these 2 we have redundancy in the tables that leads to increase the memory to store the data which decreses the performance of the database.

5)A database construct that provides direct access to specific fields in a table thus speeding up queries

Explaination:

Index is used to create a separate table that stores the address of the data in tables and that leads to get back our data quickly while retriving when we needed. It speedsup the queries that we give for the data that is required.

                      Hope the above is helpful. Please feel free to comment if any queries in the

                                 comment section. I will try to solve them as soon as possible.

                                            Do an up vote. Thank you...


Related Solutions

An online travel agency would like to test the hypothesis that the proportion of a particular​...
An online travel agency would like to test the hypothesis that the proportion of a particular​ airline's flights that arrive​ on-time is less than 0.90. A random sample of 140 such flights found that 119 arrived​ on-time. The agency would like to set α=0.05. This is A) Upper tail test, B) lower tail or C) two-tail test
public class Flight extends java.lang.Object This class represents a single flight within the travel agency system....
public class Flight extends java.lang.Object This class represents a single flight within the travel agency system. Constructor Summary Constructors Constructor and Description Flight(java.lang.String airline, int flightNum, java.lang.String from, java.lang.String to, java.util.Calendar leavesAt, java.util.Calendar arrives, double price) Creates a new flight leg in the system. Method Summary All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double getPrice() Retrieves the price of this flight. java.lang.String toString() Retrieves a formatted string summarizing this Flight. Methods inherited from class java.lang.Object...
On April 1, Jiro Nozomi created a new travel agency, Adventure Travel. The following transactions occurred...
On April 1, Jiro Nozomi created a new travel agency, Adventure Travel. The following transactions occurred during the company’s first month. April 1 Nozomi invested $41,000 cash and computer equipment worth $35,000 in the company in exchange for common stock. 2 The company rented furnished office space by paying $2,700 cash for the first month’s (April) rent. 3 The company purchased $1,500 of office supplies for cash. 10 The company paid $2,300 cash for the premium on a 12-month insurance...
On April 1, 2017, Jiro Nozomi created a new travel agency, Adventure Travel. The following transactions...
On April 1, 2017, Jiro Nozomi created a new travel agency, Adventure Travel. The following transactions occurred during the company’s first month. April 1 Nozomi invested $40,000 cash and computer equipment worth $30,000 in the company. 2 The company rented furnished office space by paying $2,700 cash for the first month’s (April) rent. 3 The company purchased $1,700 of office supplies for cash. 10 The company paid $2,300 cash for the premium on a 12-month insurance policy. Coverage begins on...
On April 1, 2017, Jiro Nozomi created a new travel agency, Adventure Travel. The following transactions...
On April 1, 2017, Jiro Nozomi created a new travel agency, Adventure Travel. The following transactions occurred during the company’s first month. April 1 Nozomi invested $40,000 cash and computer equipment worth $30,000 in the company. 2 The company rented furnished office space by paying $2,700 cash for the first month’s (April) rent. 3 The company purchased $1,700 of office supplies for cash. 10 The company paid $2,300 cash for the premium on a 12-month insurance policy. Coverage begins on...
On April 1, 2017, Jiro Nozomi created a new travel agency, Adventure Travel. The following transactions...
On April 1, 2017, Jiro Nozomi created a new travel agency, Adventure Travel. The following transactions occurred during the company’s first month. April 1 Nozomi invested $40,000 cash and computer equipment worth $30,000 in the company. 2 The company rented furnished office space by paying $2,700 cash for the first month’s (April) rent. 3 The company purchased $1,700 of office supplies for cash. 10 The company paid $2,300 cash for the premium on a 12-month insurance policy. Coverage begins on...
On April 1, 2017, Jiro Nozomi created a new travel agency, Adventure Travel. The following transactions...
On April 1, 2017, Jiro Nozomi created a new travel agency, Adventure Travel. The following transactions occurred during the company’s first month. April 1 Nozomi invested $39,000 cash and computer equipment worth $35,000 in the company in exchange for common stock. 2 The company rented furnished office space by paying $1,800 cash for the first month’s (April) rent. 3 The company purchased $1,000 of office supplies for cash. 10 The company paid $2,400 cash for the premium on a 12-month...
On April 1, 2017, Jiro Nozomi created a new travel agency, Adventure Travel. The following transactions...
On April 1, 2017, Jiro Nozomi created a new travel agency, Adventure Travel. The following transactions occurred during the company’s first month. April 1 Nozomi invested $46,000 cash and computer equipment worth $25,000 in the company in exchange for common stock. 2 The company rented furnished office space by paying $1,500 cash for the first month’s (April) rent. 3 The company purchased $1,300 of office supplies for cash. 10 The company paid $2,300 cash for the premium on a 12-month...
On April 1, Jiro Nozomi created a new travel agency, Adventure Travel. The following transactions occurred...
On April 1, Jiro Nozomi created a new travel agency, Adventure Travel. The following transactions occurred during the company’s first month. April 1 Nozomi invested $30,000 cash and computer equipment worth $35,000 in the company in exchange for common stock. 2 The company rented furnished office space by paying $2,700 cash for the first month’s (April) rent. 3 The company purchased $1,300 of office supplies for cash. 10 The company paid $2,300 cash for the premium on a 12-month insurance...
On April 1, Jiro Nozomi created a new travel agency, Adventure Travel. The following transactions occurred...
On April 1, Jiro Nozomi created a new travel agency, Adventure Travel. The following transactions occurred during the company’s first month. April 1 Nozomi invested $44,000 cash and computer equipment worth $35,000 in the company. 2 The company rented furnished office space by paying $1,500 cash for the first month’s (April) rent. 3 The company purchased $1,100 of office supplies for cash. 10 The company paid $2,900 cash for the premium on a 12-month insurance policy. Coverage begins on April...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT