[go: up one dir, main page]

CN101901269B - Real-time library foreign key reference display method - Google Patents

Real-time library foreign key reference display method Download PDF

Info

Publication number
CN101901269B
CN101901269B CN2010102448014A CN201010244801A CN101901269B CN 101901269 B CN101901269 B CN 101901269B CN 2010102448014 A CN2010102448014 A CN 2010102448014A CN 201010244801 A CN201010244801 A CN 201010244801A CN 101901269 B CN101901269 B CN 101901269B
Authority
CN
China
Prior art keywords
real
foreign key
string
reference display
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN2010102448014A
Other languages
Chinese (zh)
Other versions
CN101901269A (en
Inventor
王瑾
侯勇
彭晖
孙云枫
刘孟觉
杨志宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NARI Technology Co Ltd
NARI Tech Nanjing Control System Co Ltd
Original Assignee
NARI Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NARI Technology Co Ltd filed Critical NARI Technology Co Ltd
Priority to CN2010102448014A priority Critical patent/CN101901269B/en
Publication of CN101901269A publication Critical patent/CN101901269A/en
Application granted granted Critical
Publication of CN101901269B publication Critical patent/CN101901269B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)
  • Input From Keyboards Or The Like (AREA)

Abstract

本发明公开了一种实时库外键引用显示方法,其特征在于,包括以下步骤:1)为实时数据库中的每张表每个域提供一个“是否引用显示”的属性,将每个域的“是否引用显示”属性选择“是”或“否”;2)提供接口将数值型关键字转化为对应记录的字符串描述信息:根据给定关键字取出该条记录的全部“引用显示域”的值拼成字符串;3)外键数据自动调用上述接口,将字符串描述信息展示在实时库人机界面。利用本发明的方法,用户可根据不同表不同作用的域选择哪些域需要引用显示,外键域在展示时显示为描述字符串,便于用户维护和查找。

Figure 201010244801

The present invention discloses a real-time database foreign key reference display method, which is characterized by comprising the following steps: 1) providing a "reference display" attribute for each table and each domain in the real-time database, and selecting "yes" or "no" for the "reference display" attribute of each domain; 2) providing an interface to convert a numerical keyword into a string description information of a corresponding record: taking out the values of all "reference display domains" of the record according to a given keyword and composing them into a string; 3) the foreign key data automatically calls the above interface to display the string description information on the real-time database human-computer interface. Using the method of the present invention, users can select which domains need to be referenced and displayed according to domains with different functions in different tables, and the foreign key domain is displayed as a description string when displayed, which is convenient for users to maintain and search.

Figure 201010244801

Description

实时库外键引用显示方法Real-time library foreign key reference display method

技术领域 technical field

本发明涉及一种将实时数据库中的数值型关键字或者外键根据其对应的记录的部分域值转化成字符串的方法,属于实时数据库技术应用领域。The invention relates to a method for converting numerical keywords or foreign keys in a real-time database into character strings according to part of the field values of corresponding records, and belongs to the technical application field of real-time databases.

背景技术 Background technique

外键是关系型实时库中不可缺少的域属性,可以用来描述不同表之间的层次关系。实时库通常运行在内存环境中,关键字通常为整型数值或者长整型数值,这么做可以节省内存空间。但这样做就带来一个问题,记录的外键域在内存存储中是一个数字,可读性差。如果将描述该外键的描述信息也加到该表中,这样做不仅会增大数据冗余性,而且不满足数据库第二范式的要求,会给后续维护带来困难,甚至出现描述不匹配的情况。Foreign key is an indispensable domain attribute in relational real-time database, which can be used to describe the hierarchical relationship between different tables. The real-time library usually runs in the memory environment, and the keywords are usually integer values or long integer values, which can save memory space. But doing so brings a problem. The foreign key field of the record is a number in memory storage, which is poor in readability. If the description information describing the foreign key is also added to the table, this will not only increase data redundancy, but also fail to meet the requirements of the second normal form of the database, which will bring difficulties to subsequent maintenance and even cause description mismatches Case.

发明内容 Contents of the invention

为解决现有方法的不足,本发明的目的是提供一种方法,将数值型关键字根据其记录的各个域的内容,形成一个该关键字的描述信息并显示,提高其直观性、可读性。In order to solve the deficiencies of the existing methods, the purpose of the present invention is to provide a method that forms and displays a descriptive information of the keyword according to the content of each field recorded by the numerical keyword, so as to improve its intuitiveness and readability. sex.

为解决上述技术问题,本发明提供一种实时库外键引用显示方法,其特征在于,包括以下步骤:In order to solve the above technical problems, the present invention provides a method for displaying real-time database foreign key references, which is characterized in that it includes the following steps:

1)为实时数据库中的每张表每个域提供一个“是否引用显示”的属性,将每个域的“是否引用显示”属性选择“是”或“否”;1) For each field in each table in the real-time database, provide an attribute of "whether to quote and display", and select "yes" or "no" for the "whether to quote and display" attribute of each field;

2)提供接口将数值型关键字转化为对应记录的字符串描述信息:根据给定关键字取出该条记录的全部“引用显示域”的值拼成字符串;2) Provide an interface to convert numerical keywords into string description information of the corresponding record: take out all the values of the "reference display field" of the record according to the given keyword and form a string;

3)外键数据自动调用上述接口,将字符串描述信息展示在实时库人机界面。3) The foreign key data automatically invokes the above interface, and displays the string description information on the real-time library man-machine interface.

前述的实时库外键引用显示方法,其特征在于:在所述步骤2)中,所述接口入参是数值型关键字,即主键ID或者外键ID,出参是描述字符串。The aforementioned real-time library foreign key reference display method is characterized in that: in the step 2), the interface input parameter is a numerical keyword, that is, a primary key ID or a foreign key ID, and the output parameter is a description string.

前述的实时库外键引用显示方法,其特征在于:所述接口包括多种重载形式:The aforementioned real-time library foreign key reference display method is characterized in that: the interface includes multiple overloaded forms:

单个关键字取单个描述字符串;A single keyword takes a single description string;

多个关键字取多个描述字符串;Multiple keywords take multiple description strings;

从本地实时库取描述字符串;Get the description string from the local real-time library;

从指定的网络实时库取描述字符串。Get the description string from the specified network real-time library.

本发明所达到的有益效果:The beneficial effect that the present invention reaches:

1、用户可根据不同表不同作用的域选择哪些域需要引用显示;2、外键域在展示时显示为描述字符串,便于用户维护和查找;3、外键域在存储时仍然按照数值型存储,节省内存空间;4、提供多种重载类型的接口,适合各种应用的需要;5、可移植性高,适用于各个操作系统平台。1. The user can select which fields need to be referenced and displayed according to the fields with different functions in different tables; 2. The foreign key field is displayed as a description string when displayed, which is convenient for users to maintain and search; 3. The foreign key field is still stored as a numeric value storage, saving memory space; 4. Provide a variety of overloaded interfaces, suitable for various application needs; 5. High portability, suitable for various operating system platforms.

附图说明 Description of drawings

图1为根据引用显示域拼接描述字符串流程;Figure 1 shows the process of splicing description strings according to the reference display domain;

图2为引用显示接口处理流程。Figure 2 shows the process flow of the reference display interface.

具体实施方式 Detailed ways

以下结合附图对本发明作进一步详细的介绍。The present invention will be described in further detail below in conjunction with the accompanying drawings.

本发明首先为每张表每个域提供一个“是否引用显示”的属性。对于实时库的每张表,除关键字域之外,必然还有多个非关键字域,这些域有的是中文名称、英文名称这样的描述域,有的是所属区域、所属类型之类的外键域,有的是实际值、最大值、最小值之类的值域。用户可以事先从这些域中选出一些能够描述该记录大致内容的域,将这些域的“是否引用显示”属性选择“是”,这就意味着,给定该表的一个关键字,就会根据这些“引用显示域”的值得到该条记录的描述信息。The present invention firstly provides an attribute of "whether reference display" for each field of each table. For each table in the real-time library, in addition to the key field, there must be multiple non-key fields. Some of these fields are description fields such as Chinese names and English names, and some are foreign key fields such as the region and type. , and some are value domains such as actual value, maximum value, and minimum value. Users can select some fields that can describe the general content of the record from these fields in advance, and select "Yes" for the "whether reference display" attribute of these fields, which means that given a keyword in the table, it will Get the description information of this record according to the values of these "reference display fields".

假设实时库库中有区域表,结构如下:Assuming that there is a region table in the real-time library, the structure is as follows:

区域ID(主键),一级区域名称(引用显示),区域类型,二级区域名称(引用显示),…Region ID (primary key), first-level region name (reference display), region type, second-level region name (reference display), ...

表内容如下:The contents of the table are as follows:

 区域ID Region ID   一级区域名称 First-level area name   区域类型 Region Type   二级区域名称 Secondary area name  201000001 201000001   华东 East China   1 1   江苏 Jiangsu  201000002 201000002   华东 East China   1 1   浙江 Zhejiang

则给定关键字201000001,根据引用显示域拼接描述字符串流程如图1所示,所得描述字符串为:Then given the keyword 201000001, the process of splicing the description string according to the reference display domain is shown in Figure 1, and the resulting description string is:

华东江苏East China Jiangsu

本发明提供一类接口将数值型关键字根据事先定好的“引用显示域”转化为对应记录的描述信息。这类接口的入参是数值型关键字,出参是描述字符串,有多种重载形式,支持单个关键字取单个描述字符串,也支持多个关键字取多个描述字符串;支持从本地实时库取描述字符串,也支持从指定的网络实时库取描述字符串。接口在工作时,根据给定关键字取出该条记录的全部“引用显示域”的值拼成字符串。The present invention provides a type of interface to convert numerical keywords into descriptive information of corresponding records according to the pre-determined "reference display field". The input parameter of this type of interface is a numeric keyword, and the output parameter is a description string. There are multiple overloaded forms. It supports a single keyword to take a single description string, and also supports multiple keywords to take multiple description strings; support Get the description string from the local real-time library, and also support getting the description string from the specified network real-time library. When the interface is working, all the values of the "reference display field" of the record are taken out according to the given keyword and combined into a string.

使用本机制的实时库人机界面在展示数据时,对外键数据会自动调用上述接口,将描述字符串展示在界面中。When the real-time library human-machine interface using this mechanism displays data, the foreign key data will automatically call the above interface, and the description string will be displayed on the interface.

本发明涉及的实时库外键引用显示机制是结合工作在应用层的自主开发的实时库上实现,不依赖于具体的操作系统,适用于各种操作系统。本发明的实时库外键引用显示机制保证了可移植性,能够随着实时库系统安全、稳定地运行在IBM AIX、Sun Solaris、Alpha Tru64、HPUX、Linux、Windows等操作系统平台上;系统编程语言采用ANSI C/C++,并符合IEEE POSIX.2标准。The real-time library foreign key reference display mechanism involved in the present invention is realized on the self-developed real-time library of the application layer in combination with work, does not depend on specific operating systems, and is applicable to various operating systems. The real-time library foreign key reference display mechanism of the present invention guarantees portability, and can run safely and stably on operating system platforms such as IBM AIX, Sun Solaris, Alpha Tru64, HPUX, Linux, and Windows along with the real-time library system; system programming The language adopts ANSI C/C++ and complies with IEEE POSIX.2 standard.

上述实施例不以任何形式限制本发明,凡采用等同替换或等效变换的方式所获得的技术方案,均落在本发明的保护范围内。The above embodiments do not limit the present invention in any form, and all technical solutions obtained by means of equivalent replacement or equivalent transformation fall within the protection scope of the present invention.

Claims (3)

1.一种实时库外键引用显示方法,其特征在于,包括以下步骤:1. A method for displaying real-time library foreign key references, comprising the following steps: 1)为实时数据库中的每张表每个域提供一个“是否引用显示”的属性,将每个域的“是否引用显示”属性选择“是”或“否”;1) For each field in each table in the real-time database, provide an attribute of "whether to quote and display", and select "yes" or "no" for the "whether to quote and display" attribute of each field; 2)提供接口将数值型关键字转化为对应记录的字符串描述信息:根据给定关键字取出该条记录的全部“引用显示域”的值拼成字符串;2) Provide an interface to convert numerical keywords into string description information of the corresponding record: take out all the values of the "reference display field" of the record according to the given keyword and form a string; 3)对外键数据自动调用上述接口,将字符串描述信息展示在实时库人机界面。3) The above interface is automatically invoked for the foreign key data, and the string description information is displayed on the real-time library man-machine interface. 2.根据权利要求1所述的实时库外键引用显示方法,其特征在于:在所述步骤2)中,所述接口入参是数值型关键字,即主键ID或者外键ID,出参是描述字符串。2. The real-time library foreign key reference display method according to claim 1, characterized in that: in said step 2), said interface input parameter is a numerical keyword, i.e. primary key ID or foreign key ID, and output parameter is the description string. 3.根据权利要求2所述的实时库外键引用显示方法,其特征在于:所述接口包括多种重载形式:3. The real-time library foreign key reference display method according to claim 2, characterized in that: the interface includes multiple overloaded forms: 单个关键字取单个描述字符串;A single keyword takes a single description string; 多个关键字取多个描述字符串。Multiple keywords take multiple description strings.
CN2010102448014A 2010-08-04 2010-08-04 Real-time library foreign key reference display method Active CN101901269B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010102448014A CN101901269B (en) 2010-08-04 2010-08-04 Real-time library foreign key reference display method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010102448014A CN101901269B (en) 2010-08-04 2010-08-04 Real-time library foreign key reference display method

Publications (2)

Publication Number Publication Date
CN101901269A CN101901269A (en) 2010-12-01
CN101901269B true CN101901269B (en) 2012-05-23

Family

ID=43226803

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010102448014A Active CN101901269B (en) 2010-08-04 2010-08-04 Real-time library foreign key reference display method

Country Status (1)

Country Link
CN (1) CN101901269B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102968485A (en) * 2012-11-26 2013-03-13 国电南瑞科技股份有限公司 Method for displaying real-time database menu item based on virtual domain

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102014101710A1 (en) * 2014-02-12 2015-08-13 Uniscon Universal Identity Control Gmbh Method and system for backing up database relations against unauthorized access
CN105095522B (en) * 2015-09-22 2018-09-25 南开大学 Relation table set external key recognition methods based on nearest neighbor search

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7962495B2 (en) * 2006-11-20 2011-06-14 Palantir Technologies, Inc. Creating data in a data store using a dynamic ontology
CN101452441A (en) * 2008-12-05 2009-06-10 山东浪潮齐鲁软件产业股份有限公司 Electronic table general-purpose data parsing and leading-in method
US9141663B2 (en) * 2008-12-15 2015-09-22 Rockwell Automation Technologies, Inc. User interface and methods for building structural queries

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102968485A (en) * 2012-11-26 2013-03-13 国电南瑞科技股份有限公司 Method for displaying real-time database menu item based on virtual domain
CN102968485B (en) * 2012-11-26 2016-08-10 国电南瑞科技股份有限公司 A kind of real-time data base menu item methods of exhibiting based on virtual Domain

Also Published As

Publication number Publication date
CN101901269A (en) 2010-12-01

Similar Documents

Publication Publication Date Title
US11782981B2 (en) Method, apparatus, server, and storage medium for incorporating structured entity
CN107480198B (en) Distributed NewSQL database system and full-text retrieval method
Jayram et al. Avatar information extraction system.
CN104021198B (en) The relational database information search method and device indexed based on Ontology
US8516011B2 (en) Generating data models
CN104750681B (en) A kind of processing method and processing device of mass data
CN100579153C (en) An information management system and an information management method
CN110297872A (en) A kind of building, querying method and the system of sciemtifec and technical sphere knowledge mapping
CN108027833A (en) The natural language interface of database
WO2020233345A1 (en) Natural language processing-based data chart generation method and related device
CN106202207A (en) A kind of index based on HBase ORM and searching system
CN111553556A (en) Business data analysis method, device, computer equipment and storage medium
CN109902117B (en) Business system analysis method and device
CN105975458A (en) Fine-granularity dependence relationship-based method for calculating Chinese long sentence similarity
CN115757810A (en) A method for constructing knowledge graph standard ontology
CN107992608A (en) A kind of SPARQL query statement automatic generation methods based on keyword context
CN112885352A (en) Corpus construction method and device, computer equipment and storage medium
CN107341080A (en) A kind of test case management system and method
CN105045933B (en) Mapping method between apparel maintenance support information relationship database schema and body
CN101901269B (en) Real-time library foreign key reference display method
CN104899207A (en) Visualized structured query language (SQL) condition tree establishing method and device
CN113609100B (en) Data storage method, data query method, device and electronic equipment
CN120296031A (en) Query statement generation method, data analysis method, device, medium and product
CN102968485B (en) A kind of real-time data base menu item methods of exhibiting based on virtual Domain
Pan et al. Natural language aided visual query building for complex data access

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: NARI NANJING CONTROL SYSTEM LTD.

Effective date: 20141202

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20141202

Address after: High road high tech Development Zone Nanjing city Jiangsu province 210061 No. 20

Patentee after: NARI Technology Development Co., Ltd.

Patentee after: SGCC NARI Nanjing Control System Co., Ltd.

Address before: High road high tech Development Zone Nanjing city Jiangsu province 210061 No. 20

Patentee before: NARI Technology Development Co., Ltd.