Customizing the Tb_ location Access subclass

Source: Internet
Author: User
Tags insert

In many applications, a "eigenvalue" is often required to obtain a (or a set) of records that satisfy a constraint from a given data object (the foreground's dataset or a physical table in the background), and to implement a given subsequent function on this basis, "Tb_ location access" is to This series of continuous actions is implemented in the simplest operation and through a standardized package design.

4.3.1.1 Proposition

Access to the database is an essential implementation process in the implementation process, because the physical table may be a large collection of records, it is not easy to find a desired target record. It is generally through some known "eigenvalues" and form the appropriate logical expression, and then through the logical conditions to achieve the purpose of the record search. In the design process of the project, there are too many similar data azimuth requirements, so it is necessary to encapsulate a dedicated control class to support this ubiquitous mode of operation.

Because the target object may be different, the access mode is different, the attention to the speed is different, the processing mode after getting the data is different, we first need to analyze the demand in the application scene of the performance form and achieve the goal.

1 characteristic value and search method:

1. The use of the data meaning will be randomly changed, such as mnemonics, numbers, names, etc.;

2. There are different ways to perform a search, such as left matching, exact matching, fuzzy Lookup, and so on.

2 The requirements of the focus of attention vary:

1. Concerned about the speed of reflection, such as supermarket checkout system is more concerned about speed;

2. Care about the lookup range, which is more interested in the scope of recognition and the way it matches when the eigenvalues are ambiguous.

3 The possibility of the search results:

1. The corresponding record does not exist: may result in the duplication of the operation or change the operation logic and so on different consequences;

2. Record only: The purpose of operation is achieved;

3. More than one Recordset: typically results in the operation of a record selection, either from a select or from a group.

4) To achieve the purpose of data orientation:

1. The pointer is positioned to a record in the current dataset by a characteristic value and acts as an object of action;

2. Refreshes one or a group of controls on the screen with the data being accessed, providing the operator with a reference environment;

3. A data set that refreshes other possible associated relationships synchronously;

4. Overwrite another dataset with the resulting dataset or insert it into another dataset.

5 The data source objects are of different types:

1. localized dataset Datetabel;

2. Grid Data Container DataGridView.

Each of the issues raised here does not normally exist independently, so there is no smaller granularity of encapsulation because these requirements often appear in a related, contiguous combination form. Because the proposition involves a lot of change factors, so each problem needs to be "custom attribute" to meet the requirements of adaptability.

Hint: We can break down the above problem into two different levels, one level with "location access" to achieve the goal, it derived subclass "positioning insert" on this basis will provide a follow-up data processing process.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.