How can i remove regular strings from a search key? [closed] - mysql

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to remove some special strings like ' in, at, on, a, an ,with... etc' from a search string in MySql.
eg-
select * from tbl_search where serachkey='best hotels in kerala';
I need to remove 'in' from string and need to look on database for best match, its somthing like google search.
I have one table with id,keys and parent_id.
The most scored parent_id should emit first.

Google Search is not an easy task to build.. but What you are in need of is Natural Language Processing.
Learn about OPEN NLP or Stanford NLP.
This will identify the parts of speech in a given sentence and you can manipulate further as per your needs.
You can also train a model for your needs.
Link for OpenNLP

Related

Best way to store lot of data - SQL [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I want to design a database which is going to consists of really lot of columns, since it's a web game's inventory but there is going to be really lot of things.
It would probably call for names like "item_1", "item_2" but is that even ideal?
When I plan it to be extended over 1 000 items?
I need to SELECT later if the user has them, every single one.
I plan to use MariaDB and Laravel framework with Jetstream, Livewire and Tailwind.css.
Before you do anything, read about
NF
1NF
2NF
3NF
BCNF
Bearing in mind the knowledge you thusly accumulate, you should reach to a conclusion similar to having some tables like these:
item_types(id, name, ...)
user(username, password, ...)
inventory(user_id, item_type_id, amount)

Can SQL replicate Excel's auto-updating cells based on other cells? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have a database of some devices, each with details on their status for things like maintenance schedule, last calibration date, age, warranty status, etc. One of the points of this database is to give us a yes/no answer whether it should be in service or not, based on all these other data points being a certain way. If this was Excel, I could make a cell and use IF statements to get this automatically, and any time one field like warranty fell out of date, the "in service" field would also switch to "No".
Is it possible for a MySQL database to do this automatically?
Yes. If all the values you need are in one row, you can use a generated column.
If values needed for the calculation come from other rows or tables, then you can use a view.
Other than that, it is hard to provide more specifics because you question lacks helpful details.

Search Most Word from a Column in MySQL Query [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a table named 'tweet' and its column 'text'. The column contains a sentence (many words) in each record. Then I wanna search the most word from the column. Is that possible to do that in MySQL query? If so, then I want to know also to add exception words like: 'a', 'I', etc...
I thought it's similar with this post
But it's using PHP.
I very appreciate for any help!
SQL is not the obvious tool for something like this. But, if you are going to use SQL, I would suggest that you parse the text into a TweetWords table, with one row per "tweet" and word in the tweet (along with position information).
If you are inserting the data through PHP, you can do the parsing there and then insert each word independently.
Then the count is easy, using a basic aggregation query.

How to store music tabs in a database? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am making a tablature website and I wonder which is the best way to store tabs in the database.
Here is an example:
------------------------------------------------------------0------------------------------
-------------1-0---------------------1-0-----------0-1-1-1-----3-1-0-----------------------
0-0-0-2-2-2------2-0-----0-0-0-2-2-2-----2-0---0-2-------------------2-------2-0---0-------
-----------------------------------------------------------------------4-2-0-----4---------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
If it was me, and it is exactly that way, (I. E. 1-2-3) I'd go for the following:
Create table tabs (
Songid varchar(36) -- uuid or name, fk to the song
String int,
Position int
)
Depending on the server side language, you could theoretically retrieve and display them, separated by the dashes.
It'd be a bit tricky to get right, but what you would want, is to have a while loop or cursor display the number, or dash if there is no number at the given position, for the given string.
Does that make sense? I can try and elaborate, but it would depend on the language the web server was using.

ebay query into mysql? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I would like to know if it is possible,
To extract the userid from an ebay page and insert it into mysql as part of an insert statement? Otherwise what would be the best way to do this?
I have files to import, which contain hundred of ebay auction urls, and I must grab the seller id from each one. Is there an easier way to do this than what I am suggesting?
You could use the eBay API for that. The URL for each page contains an item number, and that can be used to query eBay for the seller id.
eBay Hacks Item 109 gives some PHP example code to do what you need (and more).