A method and device for identifying primary and foreign key fields between tables based on Bloom filter
A Bloom filter and recognition table technology, which is applied in the fields of instruments, electronic digital data processing, digital data information retrieval, etc., can solve the problems of database modeling analysis and processing difficulties, increasing labor costs and resource inputs, etc.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0045] Such as figure 1 As shown, the present invention can better solve the problem that the database lacks primary and foreign key metadata between tables, which makes database modeling analysis and processing difficult, and reduces a large amount of labor costs for data exploration and manual determination of primary and foreign keys between tables during project implementation. And resource input, greatly increase the speed of product development, shorten the project cycle, improve product competitiveness, and expand product market share; the specific steps are as follows:
[0046] Step 1, select a field a from database table A, and select a field b from database table B;
[0047] Step 2: Determine whether the data content in field a and field b in step 1 all meet the primary key requirements of "no NULL value" and "unique value" and "data volume greater than 1". If yes, execute the next step, otherwise restart Select field a and field b, and judge again whether they meet...
Embodiment 2
[0054] A device for identifying primary and foreign key fields between tables based on a Bloom filter includes a memory: used to store executable instructions; a processor: used to execute the executable instructions stored in the memory, and implement a Bloom filter-based A method for identifying primary and foreign key fields between tables.
Embodiment 3
[0056] This embodiment is to realize some function codes of this scheme:
[0057] list tableNames = DBInfoTool. readTableNames(source);
[0058] int recordCount = DBInfoTool. readTableRecordCount(tableName, source);
[0059] if (recordCount > 1) {
[0060] list fields = DBInfoTool. readFields(tableName, recordCount, source);
[0061] Field field = null;
[0062] for (Field fieldInList : fields) {
[0063] if (fieldInList. getName(). equals(fieldName)) {
[0064] field = fieldInList;
[0065] break;
[0066] }
[0067] }
[0068] if (field != null) {
[0069] DataTypeEnum dataType = field. getDataType();
[0070] SizeStatResult sizeStat = SizeStatResult.load(sizeFilePath);
[0071] String bloomFilterPath = BloomfilterPathTool. getBloomFilterPath(tableName, fieldName);
[0072] BloomFilter bloomFilter = BloomFilterTool. load(bloomFilterPath, dataType);
[0073] if (bloomFilter != null) {
[0074] for (int j = 0; j < tableNames. size(); ...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com