How to store music tabs in a database? [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 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.

Related

Difference between control source and row source in Access [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 4 years ago.
Improve this question
I know there are threads with the answer for this question but as a beginner I am having a really hard time understanding the difference between these two. I am learning Access and have not learnt about SQL statements yet. Most explanation to this question consists of SQL code that I do not understand. If you could explain the difference for a beginner that would be great.
If you have a combobox in your form, it will both have a row source and a control source. The control source is the field in the underlying table where the actual values are stored. The row source is the source of the list of values to select from.
Example: You got a table with flowers. One field is color. You want to limit which colors to enter for the flowers. The you make a table called flower_colors.
In your flower form, you then have a combobox. Its control source will be colors from the table flower and the row source will be flower_colors.

What situation would encourage me to use ENUMs over other alternatives? [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 7 years ago.
Improve this question
For example, why would I use ENUM of '0','1' as opposed to having an INT(1) and set conditions in php?
Some people just need to create problems for themselves. They don't know it at the time. I recommend staying away from enum, like salmon left out on the summertime counter.
If you have codes, have a code table with full blown verbiage and Foreign Key Constraints. It's how the big boys roll.
http://komlenic.com/244/8-reasons-why-mysqls-enum-data-type-is-evil/
The ENUM option is used, more descriptibos when developing your tables for example: enum ('active', 'inactive') instead of using zero or one, also can use it as enum ('admin' editor ', 'client').
As I mentioned helps you be more descriptive and here about 6 months after touching your model, you look back and you must not guess that means one or zero. if not that just see it you realize that it serves the field.

How can i remove regular strings from a search key? [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 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

Is it a bad practice to display a detailed information about a record in table [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 9 years ago.
Improve this question
I like to use tables as it will allow me to organize the data in a better manner. But now inside my application I am using tables to represents different data which can give misleading meaning. for example I am displaying the list of all record in a table such as:-
Then I am also displaying the details of each record in a table where rows will have different context:-
For me the tables seems clear ,, but am I using tables in the right context?. Or usually table rows should represents the same type of objects (for example different organizations, not different properties about an organization )? ?
Well. Most systems show information using tables. Look at any forum software, for instance. In terms of user-friendliness, you could emphasize your header rows on your top table. On your bottom table, you could emphasize the left row (a darker background or stronger font).
In my opinion using tables in this scenery is ok. All data is exhibited in simple and clear way.

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).