SQL Server Performance

Special query question

Discussion in 'ALL SQL SERVER QUESTIONS' started by Gilles Brule, Mar 10, 2012.

  1. Gilles Brule New Member

    I wish to create a virtual library for everything that I have been accumulating in countless folder and sub folder and cannot remember over time where it is. I wish to eliminate all folders except for and index of keyword and the document address. To do this I want to place all the item (document, article, book, etc) in one memory bank entered in random while mainting a single index with key words. The index table has three collums. ID, name of the document and key words. The ID provide a different number for each row, i.e. each entry. For the document it could have from 1 to 1000 keywords. A keywords could be found in many document. I wish to search 1 keyword get all the related document. From these documents do a second keyword search and get a shorter list. If the list is short enough I can start looking for what I really want get. What is important to remember is that I am seeking something that I know is in their because these are my personal filles but do not remember exactly where it is because it could have been store their 5 years ago and because there is to much data.

    in my example doc# are random number of documents, paper, drawing etc
    in my example the letters of the alphabet are keyword that I have associated to the document when I have saved them in my virtual library.

    doc#1 - keyword a,b,c,d,e,f,g,h,i
    doc#2 - keyword a,c,e,g,i,l,m,n,o,p
    doc#3 - keyword a,d,h,k,n,r,s,t
    doc#4 - keyword a,c,l,m,p,z
    doc#n - keyword ...........

    The table look like:

    ID Docdument Keyword
    1 doc#1 a
    2 doc#1 b
    9 doc#1 i
    10 doc#2 a
    19 doc#2 p
    20 doc#3 a
    n doc#n last keyword

    So if I search c, I get doc# 1,2,4

    From those document, I want to search m, I get doc# 2,4

    I can search one more time or open the document and browes through them.

    How can I set up a Query that goes by elimination.

    Second Qestion. I would like to put a 4th column that would be a link to the actual document so that I do not have to got into a second table, like in an excel file, do a Vlookup on doc#2 which would provide me the link into my virtual library to pull out the document.

    I can only write simple Database program and I am approaching this with a spreadsheet knowledge. I would like to resolve this problem without becoming an expert in Database system. I have been try to ask many people on how to do this. I refer to it like this. Transfer the report of the first query into a second table; then do a query on the second table. Transfer the report of the second query into a third table; then do a query on the third table until I find the document that I know is in there but cannot remember where.

    Thank you very much to everyone who will reflect on this and many thanks to those who can guide me in accomplish this challenge.


Share This Page