Posts Tagged ‘times’

Mysql-Don’t Overuse Artificial Primary Keys

Thursday, July 24th, 2008

Artificial primary keys are nice because they can make the schema less volatile. If we stored geography information in the US based on zip code, say, and the zip code system suddenly changed we’d be in a bit of trouble. On the other hand, many times there are perfectly fine natural keys. One example would be a join table for many-to-many relationships. What not to do:
CREATE TABLE posts_tags (
relation_id int UNSIGNED NOT NULL AUTO_INCREMENT,
post_id int UNSIGNED NOT NULL,
tag_id int UNSIGNED NOT NULL,
PRIMARY KEY(relation_id),
UNIQUE INDEX(post_id, tag_id)
);

Not only is the artificial key entirely redundant given the column constraints, but the number of post-tag relations are now limited by the system-size of an integer. Instead one should do:
CREATE TABLE posts_tags (
post_id int UNSIGNED NOT NULL,
tag_id int UNSIGNED NOT NULL,
PRIMARY KEY(post_id, tag_id)
);

How many times should you use keywords in a press release?

Tuesday, July 15th, 2008

As a guideline, in a press release that’s 500 words, we’ll use the phrase 2-4 times. We’ll also use variations of that keyword phrase. Search engines are smart enough that when documents are identified as being authoritative for a particular concept, the presence of an exact match keyword phrase will often be accompanied by related phrases. Keyword research will give insight not only on the phrases people are actually searching on but also related phrases.

What about SEO just for press releases? One of the things you look for with press release optimization is keyword density, right?

Tuesday, July 15th, 2008

When you stick to specific keyword density numbers, you put yourself at risk somewhat, of hanging your hat on a shingle that will fall down later. Search engines are constantly evolving and changing how they rank web pages.

What you want to do is use your keywords high and to the left of the document. Two or three times, four times maybe. Use general guidelines and focus on the user. It’s a matter of not being too clever and ironic and being literal with the keywords you’re using. Use them high in a document and in links as opposed to saying, “Let’s shoot for a 6% keyword density every time.”