itemType VARCHAR(20) NOT NULL, title VARCHAR(60) NOT NULL,

itemType VARCHAR(20) NOT NULL, title VARCHAR(60) NOT NULL, artist VARCHAR(60) NOT NULL, price FLOAT NOT NULL, PRIMARY KEY(itemNo)); CREATE TABLE Transaction ( orderNo INT NOT NULL PRIMARY KEY AUTO_INCREMENT, userId VARCHAR(20) NOT NULL, itemNo VARCHAR(20) NOT NULL, quantity INT NOT NULL DEFAULT 0, date DATE NOT NULL, status VARCHAR(20) NOT NULL); CREATE TABLE Session ( lastAccessed TIMESTAMP, id VARCHAR(255) NOT NULL, data TEXT, PRIMARY KEY(id)); Indices Indices are created on the ItemNo, Title, and Author/Artist columns of the BookShopand MusicShoptables. Creation of indices on these columns will result in faster searches in the database. Import Indices are used to find rows with a specific value for a column quickly. The ant index stores the mapping between the value of the column, and the physical location of the row. Without indices the database will have to do a complete scan of the table (lots of disk I/O), to search for rows with specific values for a column. SQL commands for creating indices (shopindices.sql): USE shop; CREATE INDEX indexOnBookItemNo ON BookShop(itemNo); CREATE INDEX indexOnBookTitle ON BookShop(title); CREATE INDEX indexOnBookAuthor ON BookShop(author); CREATE INDEX indexOnMusicItemNo ON MusicShop(itemNo); CREATE INDEX indexOnMusicTitle ON MusicShop(title); CREATE INDEX indexOnMusicArtist ON MusicShop(artist); Page 550
Note: If you are looking for top 10 and very good webhost to host and run your jsp application check Actions jsp hosting services

Comments are closed.