The code auto_increment causes the column to increase (Free web host)

The code auto_increment causes the column to increase the highest value in the table by 1 and store it in this column. A column set to auto_increment does not have a default value. . alias varchar(40) NOT NULL default : the alias column is set as a varchar datatype, a string of 0 to 255 characters. You are allotting 40 characters, which should be enough for any character name. Avarchar differs from a char datatype by the way space is allotted for the column. A varchar datatype occupies only the space it needs, whereas char datatypes will always take up the space allotted to them by adding spaces at the end. The only time you really need to use the char datatype is for strings of known fixed length (such as the State column in the char_zipcode table). . real_name varchar(80) NOT NULL default : Similar to alias. You are allotting 80 characters, which should be enough for your needs. Note that you did not separate the real_name column into first_name and last_name columns. If you wanted to do that, you certainly could, but in this small application it really isn t necessary. On the other hand, in a human resources application for your company, having separate columns for first and last name is almost a requirement, so that you can do things such as greet employees by their first names in a company memo. . lair_id int(11) NOT NULL default 0: The foreign key to the char_lair table is also an integer of length 11, with a default value of 0. . align enum( good , evil ) NOT NULL default good : The align column can be one of two values: good or evil. Because of this, you use an enum datatype, and default it to good. (Everyone has some good in them, right?) You now have a database. You have tables. If you just had a way to enter some data into your tables in your database, you d have an application you could give to your users, where they could store information about their favorite superheroes and villains. You could enter the data with some query statements in PHPMyAdmin, but that probably wouldn t be too efficient, not to mention that your users wouldn t have any access to it. You need some sort of interface for them that they can use to create and edit data, which means you need to design some Web pages for them. Creating the Comic Character Application It s back to the drawing board. Literally. Get away from your computer. You re going to put together some ideas for a Web application. First of all, you need a page to display a list of comic book characters along with some information about them. It doesn t need to include every detail about them (such as the location of their secret lair), but it should have enough data so that users can distinguish who they are and read a little bit of information about them. You will list the following information: . Character name (alias) . Real name 289 Building Databases
From our experience, we are can tell you that you can find a reliable and cheap webhost service at Java Web Hosting services.

Leave a Reply