Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS122B: Projects in Databases and Web Applications Winter 2019

Similar presentations


Presentation on theme: "CS122B: Projects in Databases and Web Applications Winter 2019"— Presentation transcript:

1 CS122B: Projects in Databases and Web Applications Winter 2019
Professor Chen Li Department of Computer Science UC Irvine Notes 05: Pagination, Caching, Sort, Search, Browse

2 Pagination Show results in different pages

3 SQL Support SELECT columns FROM table LIMIT 20 OFFSET 10

4 Embedding parameters in GET requests
Example:

5 Caching in Tomcat Store the query results as an object
Later requests can be served using the cache without querying the database

6 Caching in Tomcat Pros: Cons: Less traffic on DB Low response time
Memory overhead in web server Results may be obsolete

7 Searching/Browsing

8 Different queries Browsing: SELECT *
FROM Movies, genres, genres_in_movies WHERE genres.name = “action” Searching: SELECT * FROM Movies WHERE title LIKE “%term%”;

9 Same page of movie list Implement a Java Servlet program by taking a SQL query as a parameter Show the results of the query as a list of movies.

10 Sorting Frontend GET request includes a sorting parameter such as “DESC” and “ASCE”; Use “ORDER BY” in SQL to sort the results


Download ppt "CS122B: Projects in Databases and Web Applications Winter 2019"

Similar presentations


Ads by Google