Figure 3-5: The vertical structure of a table (Make a web site)
Figure 3-5: The vertical structure of a table showing fields, constraints and datatypes. Examine Figure 3-5 again. The left column shows the name of fields in the table. This particular table is used to contain separate editions of the same book. Separate editions of a single book can each be published by different publishers. Thus, the PUBLISHER_ID field is included in the EDITION table. Note various other fields such as the PUBLICATION_ID field - uniquely identifying a unique book name, which is stored in the PUBLICATION table. The PUBLICATION table represents each book uniquely regardless of the existence of multiple editions of the same title or not. The International Standard Book Number (ISBN) uniquely identifies a book on an international basis, and is distinct for each edition of a book. Also note the datatypes shown in Figure 3-5. Datatypes are shown as INTEGER, DATE, or VARCHAR(32). These three field types restrict values to be of certain content and format. INTEGER only allows whole numbers, all characters consisting of digits between 0 and 9, with no decimal point character. DATE only allows date entries where specific formatting may apply. Most databases will have a default format for date values. If the default format is set to dd/mm/yyyy, an attempt to set a date value to 12/31/2004 will cause an error because the day and month values are reversed. Effectively, datatypes can constrain values in fields in a similar way to that of the previously specified NOT NULL constraint does. Similar to constraints, datatypes can restrict values, so datatypes are also a form of field value constraining functionality. Name ISBN PUBLISHER_ID PUBLISCATION_ID PRINT_DATE PAGES LIST_PRICE FORMAT RANK INGRAM_UNITS Null? NOT NULL NOT NULL NOT NULL Type INTEGER INTEGER INTEGER DATE INTEGER INTEGER VARCHAR (32) INTEGER INTERGER Column names NULL constraint Datatype 41 Database Modeling Building Blocks
Note: In case you are looking for affordable webhost to host and run your web application check Vision http web server services