This is a little difficult for me to explain but I will try my best to explain to you guys in short. Iam designing a search engine for a relational database. I want this to be independant of the structure of the database i.e it can run on any database provided. I want that when the user inserts a string such as two names 'abc xyz' ,it displays all the rows containing both the names 'abc xyz' in them and if there are no such rows then it should display rows with name 'abc' and rows with name 'xyz' and show the relationship between the two. For example 'abc' is friends with 'mno' which in turn is friends with 'jkf' which in turn is friends with 'xyz'. So i want to show this relationship as well.This is just an example of the thing i want my application to do. I want it to search all such relationships , if they exist and display them. I know this example is a bit vague compared to the complexity of the application but any ideas are appreciated.
Note: I know about neo4j and orientdb Dbms which uses graph databases but i dont wanna use them. I believe a graphical approach for finding such relationships would be required. But I wanted to ask if such a task can be done using sql only. Iam using mysql as my database. please help me out woth any queries or stored procs which are suitable for my platform. from what ive learnt information_schema can come in handy but i dont know how to use it for this purpose. Also if there are any other languages which can do this job , I would like to hear about them as well.
From my perspective. the traversal of the database from point A to point B (point A nd B are words in the string given by the user) would also help me out. All opinions are fully welcomed.