Hi I'm new to databases and have a couple of doubts 1. I created a database with MySQL. it has a few fields but I started with an incremental numeric ID, even though I do not need it. It is a static database used only for a search facility. Is it necessary to have that numeric ID or can I simply get rid off it? 2. 3 of the fields are meant to have a yes/no content. When I tried to access the database I got a "0". What do I have to do? I have them as tinyint(1), Null (yes), Default (NULL) Eventually, I need to write an css/html page with fields to receive the results of the search and these 3 fields will be tick boxes.
1. Having a unique field for each row makes working with them from exteral resources easier (for changing / updating content) - instead of mathing other stuff, you just match the id-column. Keep it. 2. You're on the right track, but a yes/no-field (boolean field, tinyint(1)) is usually used as follows: default is 0 (no) and a yes will be 1. You NEVER set no as 1. That is just... no. 0/no/off == 0, 1/yes/on == 1.