-- Copyright (C) 2001 YesSoftware. All rights reserved.
-- BugTrack_MSSQL.sql
if exists (select * from sysobjects where id = object_id(N'card_types') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table card_types
GO
if exists (select * from sysobjects where id = object_id(N'categories') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table categories
GO
if exists (select * from sysobjects where id = object_id(N'editorial_categories') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table editorial_categories
GO
if exists (select * from sysobjects where id = object_id(N'editorials') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table editorials
GO
if exists (select * from sysobjects where id = object_id(N'items') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table items
GO
if exists (select * from sysobjects where id = object_id(N'members') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table members
GO
if exists (select * from sysobjects where id = object_id(N'orders') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table orders
GO
CREATE TABLE card_types (
card_type_id int IDENTITY primary key,
name varchar(50) NOT NULL
)
GO
insert into card_types (name) values ('Visa')
GO
insert into card_types (name) values ('American Express')
GO
CREATE TABLE categories (
category_id int IDENTITY primary key,
name varchar(50) NOT NULL
)
GO
insert into categories (name) values ('Programming')
GO
insert into categories (name) values ('Databases')
GO
insert into categories (name) values ('HTML & Web design')
GO
CREATE TABLE editorial_categories (
editorial_cat_id int IDENTITY primary key,
editorial_cat_name varchar(50) NULL
)
GO
insert into editorial_categories (editorial_cat_name) values ('What')
GO
insert into editorial_categories (editorial_cat_name) values ('New')
GO
insert into editorial_categories (editorial_cat_name) values ('Weekly')
GO
insert into editorial_categories (editorial_cat_name) values ('General')
GO
CREATE TABLE editorials (
article_id int IDENTITY primary key,
editorial_cat_id int NULL DEFAULT 0,
article_title varchar(200) NULL,
article_desc text NULL,
item_id int NULL DEFAULT 0
)
GO
insert into editorials (editorial_cat_id, article_title, article_desc, item_id)
values(1, 'A Sharp Combination', 'To get inside C#, Microsoft''s new OO programming language, use A Preview of C# as a guide. It offers a preview of Visual Studio.NET and an overview of the .NET framework, and demonstrates how C# is integrated with ASP+, ADO+, and COM+ in .NET applications. You''ll get examples of C# in action, too.', 22)
GO
insert into editorials (editorial_cat_id, article_title, article_desc, item_id)
values(2, '1001 Web Site Construction Tips and Tricks', '39.95', 21)
GO
insert into editorials (editorial_cat_id, article_title, article_desc, item_id)
values(3, 'Flash 4 Magic', 'If you''re right in the middle of learning (or just jumping into) Flash to create and manipulate animations, music tracks, sound effects, and interface design, try the Flash 4 Magic. Inside are tutorials, graphic presentations, and a CD.', 8)
GO
insert into editorials (editorial_cat_id, article_title, article_desc, item_id)
values(4, '<b><font color="brown">Free Shipping on orders over $40</font></b>', 'For limited time only, until next Sunday, you can enjoy free shipping. Simply order more then $40 worth of books and shipping''s on us.', 0)
GO
CREATE TABLE items (
item_id int IDENTITY primary key,
category_id int NOT NULL,
name varchar(255) NOT NULL,
author varchar(100) NULL,
price numeric(10,2) NOT NULL,
product_url varchar(255) NULL,
image_url varchar(100) NULL,
notes text NULL,
is_recommended tinyint NULL DEFAULT 0,
rating int default 0,
rating_count int default 0
)
GO
insert into items (category_id, name, author, price, product_url, image_url, notes, is_recommended)
values(2, 'Web Database Development : Step by Step', 'Jim Buyens', 39.99, 'http://www.amazon.com/exec/obidos/ASIN/0735609667/yessoftware', 'images/books/0735609667.jpg', 'As Web sites continue to grow in complexity and in the volume of data they must present, databases increasingly drive their content. WEB DATABASE DEVELOPMENT FUNDAMENTALS is ideal for the beginning-to-intermediate Web developer, departmental power user, or entrepreneur who wants to step up to a database-driven Web site-without buying several in-depth guides to the different technologies involved. This book uses the clear Microsoft(r) Step by Step tutorial method to familiarize developers with the technologies for building smart Web sites that present data more easily. ', 1)
GO
insert into items (category_id, name, author, price, product_url, image_url, notes, is_recommended)
values(1, 'Programming Perl (3rd Edition)', 'Larry Wall, Tom Christiansen, Jon Orwant', 39.96, 'http://www.amazon.com/exec/obidos/ASIN/0596000278/yessoftware', 'images/books/0596000278.jpg', 'Perl is a powerful programming language that has grown in popularity since it first appeared in 1988. The first edition of this book, Programming Perl, hit the shelves in 1990, and was quickly adopted as the undisputed bible of the language. Since then, Perl has grown with the times, and so has this book.
Programming Perl is not just a book about Perl. It is also a unique introduction to the language and its culture, as you might expect only from its authors. Larry Wall is the inventor of Perl, and provides a unique perspective on the evolution of Perl and its future direction. Tom Christiansen was one of the first champions of the language, and lives and breathes the complexities of Perl internals as few other mortals do. Jon Orwant is the editor of The Perl Journal, which has brought together the Perl community as a common forum for new developments in Perl. ', 0)
GO
insert into items (category_id, name, author, price, product_url, image_url, notes, is_recommended)
values(1, 'Perl and CGI for the World Wide Web: Visual QuickStart Guide', 'Elizabeth Castro', 15.19, 'http://www.amazon.com/exec/obidos/ASIN/020135358X/yessoftware', 'images/books/020135358X.gif', 'Taking a visual approach, this guide uses ample screen stills to explain the basic components of Perl, and show how to install and customize existing CGI scripts to build interactivity into Web sites.', 0)
GO
insert into items (category_id, name, author, price, product_url, image_url, notes, is_recommended)
values(2, 'MySQL (OTHER NEW RIDERS)', 'Paul DuBois', 39.99, 'http://www.amazon.com/exec/obidos/ASIN/0735709211/yessoftware', 'images/books/0735709211.jpg', 'In MySQL, Paul DuBois provides you with a comprehensive guide to one of the most popular relational database systems. As an important contributor to the online documentation for MySQL, Paul uses his day-to-day experience answering questions users post on the MySQL mailing list to pinpoint the problems most users and administrators encounter.', 0)
GO
insert into items (category_id, name, author, price, product_url, image_url, notes, is_recommended)
values(1, 'PHP and MySQL Web Development', 'Luke Welling, Laura Thomson', 39.99, 'http://www.amazon.com/exec/obidos/ASIN/0672317842/yessoftware', 'images/books/0672317842.jpg', 'PHP3 and MySQL Web Development introduces you to the advantages of implementing both MySQL and PHP3. These advantages are detailed through the provision of both statistics and several case studies. A practical web application is developed throughout the book, providing you with the tools necessary to implement a functional online database. Each function is de