Tables, search and ordering

It's easy to think that all tables of information is the same and has the same needs, but as soon as you dive into the details many needs merge.

Main types

Lets start with these two types of getting records/rows/objects onto the user interface;

  1. You need to find and show a list of something out of tens of thousands in the database
  2. You need to show records related to something you already have on screen

For 1 you need to use SQL (oclPS) to find only as subset of rows and load only these into memory

For 2 you might be able to load all into the server memory, but it's often to many rows to send all of them to the client

Let's continue complicating the picture with search or filtering.

Search or Filter?

Search is when the user has written a search word.

Filter is when the user has selected a parameter to filter on, when the context suggests it or when a reduction is needed to make the result set manageble.

Ordering

Ordering is separate from searching and filtering

Ordering is obviously the order you present the rows found when searching och looking at something from a given context.

But, ordering complicated search when you work with only a partial result loaded into memory.

For example, let's say you have search for "Adam" in a customer database. There are a 1000 Adams' in the database, but we only load 100 and display on screen. Most likely you have ordered the persons on screen in order after the First name.

What needs to happen when the user wants to sort the table on screen in Last name order?

Your first thought might be: Just sort the rows on screen in the web browser

This page was edited 53 days ago on 03/26/2024. What links here