An e-Commerce Project Sample Team5.com Table of Content: 1) ERD - Entity Relationship Diagram
ERD Entity Relationship Diagram
OR Mapping Design
Important Considerations About the ERD Diagram
After analysis and design meetings, the development team of Team5.com decided the following things in order to prevent future problems.
Important Considerations About the OR Mapping Design
Strategy for Persisting Objects The process of retrieving information from a database to populate objects and persisting the objects information back into the database tables is called object relational mapping. The development team of Team5.com decided to implement the object relational mapping for this e-commerce site using "Manager Classes". These classes, integrated with a database connection class, will be responsible for the flow of information between objects and database, and vice versa.
Database Choice and Technical Considerations The database chosen for the project is Oracle 8, and the contract has two major aspects that influenced on the OR mapping process. The first aspect is that the version purchased by the company does not have object oriented features enabled. This will not allow objects to be mapped directly to objects. They will be flattened to primitive data types inside of table. The second aspect is related to the limited number of connections that the database accepts. In order to handle this issue, it was decided, by the development team, that every manager class will establish connection with the database, perform all the transactions necessary for a specific functionality, and closes the connection at the end of the transaction. The connection will be opened only when necessary, due to an operation of retrieving or persisting information in the database.
Manager Classes The project has a total of 4 core manager classes as listed bellow: ShippingMethodManager Responsible for mapping shipping method information. ProductManager Responsible for mapping product information. OrderManager Responsible for mapping purchase orders information. CustomerManager Responsible for mapping customer information as well as shipping address information
Aggregations The class OrderLines is aggregated by class Orders. This is a STRONG aggregation once OrderLines depends on class Orders to exist, be accessed and managed. The DBConnection class is aggregated by the Manager classes in a WEAK composition. The DB Connection class, is an independent class that does not depend on any class to exist, and can be used or aggregated by any other classes that require a connection to the database. Orders class, in a WEAK composition, aggregates the Address class. The Address class, is an independent class, it does not depend on any class to exist and can be used or aggregated by other classes that requires it.
Unique IDs via Oracle Sequences The database has a total of 5 sequences that are used to generate unique IDs for new persisted objects. The sequences are called in the "insert" statements: ProductIDSeq; ShippingMethodIDSeq; ShippingAddressIDSeq; CustomerIDSeq; OrdersIDSeq;
Inheritance Address and Shipping Address Address is a supper class for Shipping Address class. The option adopted to implement this inheritance into Oracle8, once its operating as a RSDBM, and not ORSDBM, was to put everything into the same table. This only one table that joins all the information from both classes is called "ShippingAddress".
Final Considerations The OR Mapping Diagram does not show all the attributes and methods used by the core classes, and the manager classes, because the purpose of this document is to focus and provide a view on the mapping process. The OR mapping diagram is still under construction and some aspects may change due to necessities |