← Back to Patent Explorer
US5202982A Expired / Lapsed US ⏱️ 0.0 years remaining

Method and apparatus for the naming of database component files to avoid duplication of files

Assignee: Sun Microsystems Inc
•
Filing: 1990-03-27
•
Granted: 1993-04-13
•
Expires: 2010-03-27
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract In the method and apparatus of the present invention a file to be added to the database is given a unique name that is dependent upon the contents of the file such that, when the contents of the source file changes, the name of the database component file to be added to the database also changes. Conversely, if two files of the same name have the same information contained therein, the same file name will be generated and the duplication of information in the database is prevented by providing a simple test that checks for the existence of the name of the database file before the generation and addition of the new file to the database. If the file name exists in the database, information is already contained in the database and the file is not generated and added to the database information. Preferably the name of the file is generated by computing a hash value from the contents of the file concatenating the hash value to the name of the source file. Because the source file name is used in conjunction with the hash value to construct the database file name, the hash value does not have to be unique for all files but only for those source files having the same name.

Inventors

  • 👤 Wayne C. Gramlich
  • 👤 Soren J. Tirfing

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-10-25 20:45
CPC Classifications
G; G06; G06F; G06F16/00; G06F16/10; G06F16/16; G06F16/164; G06F16/17; G06F16/174; G06F16/1748; G06F16/176; G06F16/1767; G06F16/1774; G06F16/30; G06F16/31; G06F16/316; G06F16/319; Y; Y10; Y10S; Y10S707/00; Y10S707/99931; Y10S707/99932

Claims Analysis

Total Claims: 20
Claim 1
Independent Claim 238 words
In a computer system comprising a CPU, input/output means and memory containing a file system, said file system comprising at least one source file comprising text, a process for generating a database comprising at least one database component file derived from the source files such that one database component file is generated for each unique source file regardless of the number of copies of the source file occurring in a file system, said process comprising the steps of: generating a unique name for the database component file, said name generated by concatenating the source file name with a hash value computed according to the contents of the source file, whereby if the contents of the source file changes, the hash value changes and a different database component file name is generated; searching the file system for a database component file having the same name as the generated database component file name; if a database component file having the same name as the generated database component file does not exist in the file system, generating a database component file for the source file comprising a listing of symbols and line numbers in the source file where the symbol occurs; whereby if a database file having the same name as the generated database file exists, a database component file is not generated thereby eliminating the duplication of database component files and the system usage required to write the duplicate file.
Claim 2
Dependent Claim 238 words
In a computer system comprising a CPU, input/output means and memory containing a file system, said file system comprising at least one source file comprising text, a process for generating a database comprising at least one database component file derived from the source files such that one database component file is generated for each unique source file regardless of the number of copies of the source file occurring in a file system, said process comprising the steps of: generating a unique name for the database component file, said name generated by concatenating the source file name with a hash value computed according to the contents of the source file, whereby if the contents of the source file changes, the hash value changes and a different database component file name is generated; searching the file system for a database component file having the same name as the generated database component file name; if a database component file having the same name as the generated database component file does not exist in the file system, generating a database component file for the source file comprising a listing of symbols and line numbers in the source file where the symbol occurs; whereby if a database file having the same name as the generated database file exists, a database component file is not generated thereby eliminating the duplication of database component files and the system usage required to write the duplicate file.
Claim 3
Dependent Claim 42 words
The process according to claim 1, further comprising the step of: generating an index file for at least one database component file, said index file comprising a listing of symbols and the name of the database component file the symbol occurs in.
Claim 4
Dependent Claim 103 words
The process according to claim 2, further comprising the steps for performing a query for at least one symbol comprising: reading the index file for the occurrence of the symbol; if an occurrence of the symbol is found in the index file, reading the database component file, the index file specifies the symbol to be in, to identify the line number in each source file where symbol occurs; retrieving each line of text in each source file where the symbol occurs identified by reviewing the database component file and providing each line of text to the user as a response to the query.
Claim 5
Dependent Claim 202 words
In a computer system comprising a CPU, input/output means and memory containing a file system, said file system comprising at least one source file comprising text, an apparatus for generating a database comprising at least one database component file derived from the source files such that one database component file is generated for each unique source file regardless of the number of copies of the source file occurring in the file system, said apparatus comprising: means for generating a unique name for the database component file, said name generated by concatenating the source file name with a hash value computed according to the contents of the source file, whereby if the contents of the source file changes, the hash value changes and a different database component file name is generated; means for searching the file system for a database component file having the same name as the generated database component file name; if a database component file having the same name as the generated database component file name does not exist in the file system, means for generating a database component file for the source file comprising a listing of symbols and line numbers in the source file where the symbol occurs:
Claim 6
Dependent Claim 202 words
In a computer system comprising a CPU, input/output means and memory containing a file system, said file system comprising at least one source file comprising text, an apparatus for generating a database comprising at least one database component file derived from the source files such that one database component file is generated for each unique source file regardless of the number of copies of the source file occurring in the file system, said apparatus comprising: means for generating a unique name for the database component file, said name generated by concatenating the source file name with a hash value computed according to the contents of the source file, whereby if the contents of the source file changes, the hash value changes and a different database component file name is generated; means for searching the file system for a database component file having the same name as the generated database component file name; if a database component file having the same name as the generated database component file name does not exist in the file system, means for generating a database component file for the source file comprising a listing of symbols and line numbers in the source file where the symbol occurs:
Claim 7
Dependent Claim 41 words
The apparatus according to claim 4, further comprising: means for generating an index file for at least one database component file, said index file comprising a listing of symbols and the name of the database component files the symbol occurs in.
Claim 8
Dependent Claim 117 words
The apparatus according to claim 5, further comprising a means for performing a query for at least one symbol comprising: means for reading the index file for the occurrence of the symbol; if an occurrence of the symbol is found in the index file, means for reading the database component files that the index file specifies each symbol to be in, to identify each source file and line number in each source file where the symbol occurs; means for retrieving each line of text in each source file where the symbol occurs identified by the means for reviewing the database component file and providing each line of text to the user as a response to the query.
Claim 9
Dependent Claim 132 words
The apparatus according to claim 4, wherein the database component file further comprises: database component file information section comprising a source type ID, version of the database component file, line indicator status, case indicator, and name of language the source file is created in; source name section comprising the name of the source file; referenced file section comprising the names of the referenced files; symbol table section comprising a symbol tables of symbols contained in the source file and line number(s) of the source file where each symbol is located; semantic table section comprising a record type ID, line number and semantic tag for each line of text; and line identification section comprising the line number, line length, hash value and inactive indicator of each line of text in the source file.
Claim 10
Dependent Claim 45 words
The apparatus according to claim 4, wherein the means for searching the file system for a database component file will search a current working directory and any directories and sub-directories specified in a directory listing and provided to the means for searching the file system.
Claim 11
Dependent Claim 46 words
The apparatus according to claim 8, wherein the directory listing is located in a predetermined file, the means for searching the file system refers to when searching the file system for a database component file having the same name as the generated database component file name.
Claim 12
Dependent Claim 38 words
The apparatus according to claim 4, where in the database component file for a source file is located in a sub-directory of a directory where the source file is located and is identified by a pre-determined sub-directory name.
Claim 13
Dependent Claim 27 words
The apparatus according to claim 10, wherein the index file provides an index to the database component files located within the same sub-directory as the index file.
Claim 14
Dependent Claim 39 words
The apparatus according to claim 10, wherein said sub-directory comprising database component files is named, [current file directory]/.sb where [current file directory] is the directory path name for the directory containing the source and .sb is the sub-directory identifier.
Claim 15
Dependent Claim 30 words
The apparatus according to claim 5, wherein the database component file for a source file is located in a directory separate from a directory where the source file is located.
Claim 16
Dependent Claim 43 words
The apparatus according to claim 13, wherein the database component file is located in a directory specified in a second directory listing, said second directory listing comprising source file names and the location in the file system of corresponding database component file names.
Claim 17
Dependent Claim 26 words
The apparatus according to claim 14, wherein the second directory listing is located in a predetermined file referred to when a database component file is generated.
Claim 18
Dependent Claim 24 words
The apparatus according to claim 4, wherein the hash value is computed according to the sum of the bytes in the database component file.
Claim 19
Dependent Claim 210 words
The apparatus of claim 7, wherein said means for generating a hash value generates the hash value as the sum of: the hash value generated for the database component file information section comprising the sum of the first predetermined number of bytes in the database component file, source type ID, the major and minor version numbers of the file, line indicator and case indicator and each character comprising the name of the language the source is written in; the hash value generated for the source name section comprising the sum of the value of each character of the file name of the source file; the hash value generated for the referenced file section comprising the sum of the values of the names of the referenced files; the hash value generated for the symbol table section comprising the sum of the values of the characters comprising the symbols in the symbol table; the hash value generated for the semantic table section comprising the sum of the record type ID, line number and semantic tag for each symbol reference; and the hash value generated for the line identification section comprising the sum of the line number, line length, hash value and inactive indicator of each line of text in the source file.
Claim 20
Dependent Claim 174 words
The apparatus according to claim 5, said means for generating an index file further comprising a split function means comprising: means for determining the size of the index file and comparing the size of the index file to be generated to a maximum index file size; if the size of the index file is greater than or equal to the maximum index file size; means for establishing a first sub-directory comprising database component files which have not changed subsequent to a prior generation of the index file and the index file generated prior; means for establishing a second sub-directory comprising database component files which have changed subsequent to a prior generation of the index file; means to control said browser means to generate a new index file only for those source files which have changed subsequent to the prior generation of the index file; whereby the size of the index files generated are maintained below the maximum index file size thereby preventing decrease in processing speed due to the generation of large index files.

References Cited (Backward Citations)

US4611298A Cited
US4558413A Cited
US4792921A Cited
US5027316A Cited
US4967348A Cited

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 1996-04-12 1996-10-12 1997-04-13 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2000-04-12 2000-10-12 2001-04-13 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2004-04-12 2004-10-12 2005-04-13 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag