Sunday, October 23, 2011

4.4 Entity Relationship Diagram

            Pizzarama’s entity relationship diagram has been set up to show all of our company’s data relates to each other. There are four entities that we collect data on is the invoice, product, company, and customer. All the data of an entity is collected on their own database table. All of Pizzarama’s customers are listed as a record. All of the data we store on them are listed as attributes of their record. Each attribute has a meaning to the user and must be identified by its attribute type. This is what determines what the attribute is actually representing. In addition, different data types might be used to determine whether data being entered is alpha-numeric, a price, or a data.

            We identify customers by their customer key, which stays the same regardless of phone number change, name change, or address change. Each record has its own unique key that allows us to form a relationship with other database tables. An invoice, for example, will have its own unique key, the customer key of the customer who made the purchase, the product key of the product the customer purchased, as well as the company’s key. By doing this we allow newly created invoices to automatically display any information that has been updated such as a new address or phone number.

No comments:

Post a Comment