1 / 31

ONLINE BOOKSTORE

ONLINE BOOKSTORE . DATABASE CSC 8490 BY: Chaya Gaddamanugu Ramaselvi Bala Subhashini Rangu Sheela Anand. SSSR.COM. Application overview:

Télécharger la présentation

ONLINE BOOKSTORE

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ONLINE BOOKSTORE DATABASE CSC 8490 BY: Chaya Gaddamanugu Ramaselvi Bala Subhashini Rangu Sheela Anand

  2. SSSR.COM Application overview: • The business model for this project is an "http://153.104.204.169:8080/books.html" that allows customers to buy books from their homes through a web site. • The bookstore maintains a web site that allows people to search through all the books currently available through the store. The web site also provides a way for new customers to sign up, as well as existing customers to view their account status and order information.

  3. . Application Requirements: • Product Description: Detailed descriptions of all its books. This includes details such as title, author, price, category, and other information that helps the bookstore organize its collection, and helps the members search for a book. • Customer Information: Data on every customer member. This includes information such as name, password, address, and other details that enable the business corporation to contact, bill, and deliver books to the members.

  4. Functionality of the web site • Searching and Browsing: Visitors must be able to search for books based on various attributes (e.g. title, category/subject). They must also be able to browse through the book collection without doing a specific search. • Transactions: Customers must be able to easily select books to buy and check out. They also need to be able to view their account status, find out which books they currently have ordered and the order status information.

  5. IMPLEMENTATION TOOLS • ORACLE 9i • new features in Oracle 9i are its support for XML, Java and C++. • Oracle9i continues to offer the best development platform for Internet and traditional application development. Key focus areas include: • XML • Enterprise Java Engine • SQL and PL/SQL improvements

  6. IMPLEMENTATION TOOLS • XML • XSL • JAVA • TOMCAT SERVER • HTML • SQL

  7. DESIGN PHASES • PHASE I • Design and create a database that organizes and stores data about the books, customers, and orders. This includes creating tables to store data, and designing rules for how these tables relate to each other so that the data they store can be combined in meaningful ways. Also includes conceptual design model, logical mapping and physical implementation.

  8. PHASE II • Writing Java code that implements an interface to the database. • To establish a connection to the oracle 9i through java, the listener should run. This can be run from lnsctrl.exe. • The entire jar files used here need to have their classpaths set. • Developing java servlet, which takes in requests from the user and process it accordingly. • The result is displayed with proper format using xml and xsl.

  9. PHASE III • Developing an html page for user login and books browsing and searching.

  10. PHASE I

  11. BUSINESS RULES • Each book must be one and only one among a textbook or a general book or a magazine or a novel. • Each textbook must be one and only one book. • Each generalbook must be one and only one book. • Each magazine must be one and only one book. • Each novel must be one and only one book. • Each textbook may be available as one and only one newbook. • Each textbook may be available as one and only one oldbook. • Each newbook must be associated with one and only one textbook.

  12. BUSINESS RULES • Each oldbook must be associated with one and only one textbook. • Each customer may have one or more order-info. • Each order-info must be associated with one and only one customer. • Each order-info must be a book order of one or more books. • Each book must be a book order of one or more order-infos.

  13. SPECIALIZATION • The EER diagram is a result of specialization(top down approach) • The books database consists of different disjoint categories, each having a common set of attributes apart from its own set of attributes. • This is the basis of specialization, resulting in • BOOKS as super class entity, TEXTBOOKS, GENERALBOOKS, MAGAZINES AND NOVELS its subclass entities. • Created a relation for each superclass and subclass with the Primary Key of the superclass as Primary Key of each subclass.

  14. AVOIDING NULL VALUES TEXTBOOKS TEXTBOOKS NEWBOOKS OLDBOOK ISBN ISBN ISBN ISBN SUBJECT SUBJECT NEWPRICE OLDPRICE TITLE TITLE NEWCOPIES OLDCOPIES AUTHOR AUTHOR CO_AUTH CO_AUTH PUBLICAT PUBLICAT EDITION EDITION PAGES PAGES BOOK_CD BOOK_CD DESC DESC DATE DATE NEWPRICE NEWCOPIES OLDPRICE OLDCOPIES

  15. book_order info order_info Account-order info books cust_info d textbooks novels generalbooks magazines available available newbook oldbook EER DIAGRAM n m m 1 1 1 1 1

  16. MAPPING with CARDINALITY AND PARTICIPATION

  17. PHASE II

  18. DIRECTORY STRUCTURE textbooksstyle.xsl magstyle.xsl BIN novelstyle.xsl generalstyle.xsl textbooks.xml magazines.xml TOMCAT novels.xml BooksGen1.class CLASSES FinalGen1.class LIB All jar files books.html WEBAPPS ROOT records.html

  19. PHASE II • Servlet – captures user input from the browser – establishes connection with the database – processes the request – generates an XML file – applies an XSL stylesheet and outputs a HTML file. • Establishing connection to the database try { DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); con = DriverManager.getConnection(conStr, user,password); } • Use appropriate query to get data from the database. • qryStr = "select * from textbooks t, newbook nb where t.isbn=nb.isbn"; • qryStr = "select * from magazines"; • if((topic.equals("Subject-Category")) && (category.equals("Textbooks"))){ qryStr = "select distinct * from textbooks t, newbook nb where subject like '%" + keyword + "%' and t.isbn=nb.isbn"; keyword is what the customer enters.

  20. PHASE II • converts the data got from the database to an XML file, and save it in the bin directory of the server. • The generated XML file and the stylesheet for the XML file are combined to form an HTML file. • This HTML file is stored in the ROOT directory of the server. • This file is the result of search.

  21. A BRIEFING OF XML • RESULT OF A NORMAL QUERY TITLE FNAME LNAME ISBN PUBLISHER Oracle9i XML handbook Ben Chang 123456 oracle press

  22. XML • Result in XML format <book> <title>Oracle9i XML handbook</title> <author> <fname>Ben</fname> <lname>Chang</lname> </author> <isbn>123456</isbn> <publisher>oracle press</publisher> </book>

  23. XSL STYLESHEETS <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <head><title>Search Results</title></head> <body bgcolor="#FFCDAE"> <table border="0" cellspacing="7" cellpadding="1"> <xsl:for-each select="ROWSET/ROW"> <tr><th>TITLE</th><td><xsl:value-of select=“TITLE" /></td></tr> <tr><th>ISBN</th><td><xsl:value-of select=“ISBN" /></td></tr> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet>

  24. FINAL HTML FILE

  25. PHASE III

  26. PHASE III • Develop an html file, books.html, which will be the front end of the web site. • An html file for user authentication. • And a final, system generated html file, that is the result of the search.

  27. EXECUTION: • Load the database. • Start the database server (lsnrctl.exe). • Start the Tomcat web server. • Access the website http://153.104.204.169:8080/books.html from the browser.  • Begin search and transactions.

  28. DEMO

  29. EXTENSIONS: • The project can be extended to a major B2B (Business To Business) application. The system would store detailed information about the products available, client information and the administrative side details. • What is a B2B Application? • A B2B application is a web application that helps organizations streamline processes, such as manufacturing and distribution, so they can do business more efficiently with their resellers and suppliers. It gives them a faster way to compare prices and availability of goods and services they need to buy. And it's an excellent way to show global customers what they have to offer.

  30. XML AND CROSS-PLATFORM COMPATABILITY • Different enterprises can have their data in different formats. • Data exchange requires a high level of technological agreement about data types, structures etc. • Since XML is in text form and is self-describing, it allows companies to integrate applications across the internet.

  31. SUMMARY AND LESSONS LEARNT • The project helped us understand the functionality of a web-based e-commerce application. • We are now able to comprehend the role played by newer technologies in improving such applications. • We now understand how to integrate Oracle 9i, XML and Java for the implementation of such an application. We also understand the importance of a web server.   • It was a pleasant experience doing the project!

More Related