Sunday, December 26, 2010

How to Create an Online Bookstore Database


An online bookstore would have a lot of pages if it weren't for a database. Databases are what drive the products to a bookstore website. Websites such as Borders.com or BarnesAndNoble.com use databases in order to display information to their consumers. Similar to these examples, you must be smart about how you set up the database in the beginning so you won't run into problems when new data gets incorporated (or old data is removed). This guide will help you create a database that you can use for a long time.

Difficulty:
Moderate

Instructions

Things You'll Need:

  • Computer
  • Database software
  1. Instructions

    • 1
      Set up a database. In your database software, create a new database called "Bookstore." This will hold all the tables and data for your online bookstore.
    • 2
      Create a database table for types of products available. Bookstores today carry more than books, and each type of item must be accounted for. Set up a new database table called "ProductTypes." Define the table with the following attributes: a unique identifier, a name, a count. The identifier will be a number that is used as a reference in other tables. The name will be the name of the type, for example, "book", "CD", "DVD", "toys," etc. The count will be the total number of items of that product are available. This table will be beneficial when you generate reports pertaining to inventory.
    • 3
      Create a database table for each product type. If you have four types of products, then set up four separate tables, each with their own attributes. For example, a table called "CompactDisc" may have the following attributes: ID, artist, title, price, genre, tracks and description. A table called "Books" would have ID, title, authors, copyright year, publisher, category, pages, price and availability.
    • 4
      Create a database table for customers. Collect the following information from your website: name, address, email, phone, age range, username, password and interests. As a user inputs this information it will be inserted directly into your database under the "Customers" table.
    • 5
      Enter data into tables. Either enter data directly or use your database software's form for entering data into a specific table.
    • 6
      Run queries in your database software to see that you can cross-check tables properly. A website user will do searches for products that match a certain criteria. Doing your own search in the database software shows that searches like this can be done and that you're setting up the tables correctly.

Tips & Warnings

  • As a user fills out their profile, make some information optional such as credit/debit card information, age (or age range), and other personal data optional. You want your consumers to feel like they're having a safe user experience.
  • Adding unique identifiers to each table gives you a great way to reference a table's data for information. You also guarantee that no two rows will have identical information.
  • When you name your tables do not use spaces; database coding generally doesn't allow it. Also, avoid hyphens and underscores.

kindly look for more details on the advertisements

No comments: