Posts Tagged ‘Tables’

What is a Database?

Tuesday, September 30th, 2008

A database is a structure that comes in two flavors: a flat database and a relational database. A relational database is much more oriented to the human mind and is often preferred over the gabble-de-gook flat database that are just stored on hard drives like a text file. MySQL is a relational database.

In a relational structured database there are tables that store data. The columns define which kinds of information will be stored in the table. An individual column must be created for each type of data you wish to store (i.e. Age, Weight, Height).

On the other hand, a row contains the actual values for these specified columns. Each row will have 1 value for each and every column. For example a table with columns (Name, Age, Weight-lbs) could have a row with the values (Bob, 65, 165). If all this relational database talk is too confusing, don’t despair. We will talk about and show a few examples in the coming lessons.

Mysql-Partition Your Tables

Thursday, July 24th, 2008

Often you have a table in which only a few columns are accessed frequently. On a blog, for example, one might display entry titles in many places (e.g., a list of recent posts) but only ever display teasers or the full post bodies once on a given page. Horizontal vertical partitioning helps:
CREATE TABLE posts (
id int UNSIGNED NOT NULL AUTO_INCREMENT,
author_id int UNSIGNED NOT NULL,
title varchar(128),
created timestamp NOT NULL,
PRIMARY KEY(id)
);

CREATE TABLE posts_data (
post_id int UNSIGNED NOT NULL,
teaser text,
body text,
PRIMARY KEY(post_id)
);

The above represents a situation where one is optimizing for reading. Frequently accessed data is kept in one table while infrequently accessed data is kept in another. Since the data is now partitioned the infrequently access data takes up less memory. You can also optimize for writing: frequently changed data can be kept in one table, while infrequently changed data can be kept in another. This allows more efficient caching since MySQL no longer needs to expire the cache for data which probably hasn’t changed.

Improve Web Designs - What You Must Know About Graphic Design to Build Web Pages

Tuesday, June 24th, 2008

Ultimately, the goal of any Web page is communication. You are trying to communicate through words, pictures, and layout your site or company’s goals. This might be information or it might be to sell something, but you have to communicate to be successful.

Design is all about communication. When you’re a designer, you’re not an artist first and foremost (even if you thought you were), you’re a communicator. Sure, it would be nice if you could create works of art for your Web pages. But most of us don’t have the time or the need. Instead, what you need are concrete rules to follow so that your pages look good and get their message across.
Basic Rules for Design

1. Every element on the page needs a purpose. If you put an image on the page or a block of text or a line, there should be a reason for it to be there. If the reason is something like \”because I like it\” take it off. Your design elements are part of your design to communicate the message of the page. Anything that doesn’t contribute to that message should be dispensed with.
2. Don’t make your customers struggle. Your fonts should be a legible size and a reasonable scan length (no more than 7-10 words on a line). If your customers have to struggle to read your page, they won’t. And they won’t be your customers.
3. Make it obvious what’s important on the page. Use styled heading tags to call out the important sections of your pages and use images to highlight important features.
4. Use the best images possible, the fewer the better. One awesome image will do more to enhance your message than three mediocre ones. And simple styled text will go further than one poor image.
5. Visual aids communicate more quickly than blocks of text. Tables, charts, and graphs are easier to grasp quickly than a block of text. And readers of Web pages are typically in a hurry.
6. Don’t be afraid to be bold. Hesitant design, whether it’s colors or layout, makes the customer feel hesitant as well. Make your sites stand out so they’re memorable.
7. Simple designs have more punch than complicated ones. A one- or two-column layout is easier for your customers to grasp than multiple columns.
8. Sometimes you need to hire a professional. If you’re creating something that needs to last a long time, hiring a professional designer, brand manager, or marketing guru will help make sure that you get the best possible site.

Long URLs Break Layout

Friday, June 20th, 2008

While setting up a site to display a news RSS feed and I found that Tables don’t handle extra long URLs very well. They stretch the TD cell and break your design. So much for doing markup with tables.