Question

In: Computer Science

1. How do indexes improve SQL query performance? 2. How can stored procedure design improve query...

1. How do indexes improve SQL query performance?

2. How can stored procedure design improve query times in a data mart?

3. Why/How does de-normalization of a data mart design improve performance of queries?

4. What is a different between Client-Servervs. Distributed Architecture?

5. What are some primary features of a 3-tier architecture design?

Solutions

Expert Solution

1. To search for an information in a database we need to search every row until we find it. But with indexing we can reduce the search time ,they are pointers from each record to the corresponding original record where data is actually lresent and they order the data on disk to give the search result fast. Now creating too many or too less index is also not good.

2. Stored procedures help in improving the query at data mart as we dont need to rewrite the same query again and again . We give a name to this query with the help of stored procedure and use this name in database whenever we need the query. This saves the time in rewriting and also the confusion.

3. We normalize the table to remove redundancy and get more space . As storing the same information we use up a lot of space. But denormalization is inportant when we need the result more frequently than any other . As joins on tables take much time we can denormalize the table to get fast results .

4. In distributed architecture as the name suggests the data is distributed on multiple servers . These servers have complete database but when a user asks a query they work together to give the result. This is important as many users can access the database at the same time and the distribution helps to fetch the results fast

In client server architecture there is only 1 server and all database is present there only. In case if ther server fails whole data is lost. Also only 1 user can access them at a time also they have slow speed.

5. The 3 tier architecture has 3 levels:-

i)Physical Level

ii) Conceptual Level

iii)External Level

Here one level that is conceptual is added more than that of 2 tier . This extra level ensures that the user can not access the databse directly

At physical level information about where the data is actually stored is present.

At conceptual level the data is present in the form of tables.

At external level is where the user interacts . They use application to get the data


Related Solutions

SQL Code: Write a script that creates and calls a stored procedure named test. This procedure...
SQL Code: Write a script that creates and calls a stored procedure named test. This procedure should identify all of the prime numbers less than 100. (A prime number is an integer that can't be divided by another integer other than 1 and itself.) Then, it should display a string variable that includes the prime numbers like this: 2 1 3 1 5 1 7 1 1 1 1 1 3 1 1 7 1 1 9 1 2 3...
How to write a query in SQL using the Group by function to decide if the...
How to write a query in SQL using the Group by function to decide if the results of the diet worked. There are 6 columns ID, Gender, treatment, start_weight_kg, end_weight_kg, and correct change (end weight minus start weight). With the information given write a SQL to determine if the the results(correct change) worked. Question is not incomplete.
What features of query cache or Data cache serve to improve RDBMS performance
What features of query cache or Data cache serve to improve RDBMS performance
SQL stored procedures Create 2 stored procedures: sp_AddNewUser and sp_AddNewRole. Use the ManyToMany script as your...
SQL stored procedures Create 2 stored procedures: sp_AddNewUser and sp_AddNewRole. Use the ManyToMany script as your base table structures. The stored procedure should accept the parameters needed to input the data for each table. NOTE: You do not need to input the UserID or RoleID. These are surrogate keys and the system automatically inserts them when you insert a row in the tables.   On execution, the stored procedure should check the database to see if the user exists, if so,...
Create a stored procedure that can be used to add a student to the school and...
Create a stored procedure that can be used to add a student to the school and a section of a course. 1. If the student already exists, then just add him to the section (do not update information like address). 2. The procedure will require the following arguments (see table definition for types): A. Salutation B. First Name C. Last Name D. Street Address (including City) E. ZIP Code F. Phone Number G. Employer Name (if any) H. Course Number...
Explain Step by step how to do the standard design procedure for a heat exchanger and...
Explain Step by step how to do the standard design procedure for a heat exchanger and how to critically assess the shortcomings of using a certain method.
Describe how government can use performance budgeting to improve government service.
Describe how government can use performance budgeting to improve government service.
Discuss how the breakeven point can be used to improve the performance of a factory operation
Discuss how the breakeven point can be used to improve the performance of a factory operation
1) Design a project to improve the natural resources of Puerto Rico 2) How protecting natural...
1) Design a project to improve the natural resources of Puerto Rico 2) How protecting natural resources helps the economy
1.Write an SQL query that retrieves all pairs of suppliers who supply the same product, along...
1.Write an SQL query that retrieves all pairs of suppliers who supply the same product, along with their product purchase price if applicable. 2.Create a view SUPPLIEROVERVIEW that retrieves, for each supplier, the supplier number, the supplier name, and the total amount of quantities ordered. Once created, query this view to retrieve suppliers for whom the total ordered quantity exceeds 30. 3.Write a nested SQL query to retrieve all purchase order numbers of purchase orders that contain either sparkling or...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT