The Logical Data Model of the CUSTOMER Subject Area includes the following entities:
Customer is an individual or a company who can place Orders to an Online Food Ordering Store
A Customer must be:
See Subject Area: ORDER - Order Status and Process for more information.
Important
The CUSTOMER entity records information about the REGISTERED_ONLINE Customers.
A new CUSTOMER record is created in the following scenario:
⦁ Scenario: A new Customer self-registers on Store website
Scenario: A new Customer self-registers on Store website
This is the scenario for a REGISTERED_ONLINE Customer.
Step: Customer presses the Sign up button
Step: Customer must fill in the registration form
Actions:
⦁ Customer must fill in all the mandatory attributes for a REGISTERED_ONLINE Customer:
Step: Customer presses the Submit button
Actions:
⦁ A new record for a REGISTERED_ONLINE Customer is created in the CUSTOMER entity.
⦁ CUSTOMER.Is_Registered_Online attribute flag is set TRUE. See Entity: CUSTOMER for more information.
⦁ Customer can start to place Orders ONLINE. See Subject Area: ORDER - Order Status and Process for more information.
Important
Only Customers who are REGISTERED_ONLINE are allowed to:
⦁ place Orders ONLINE.
⦁ review Orders and provide feedback ONLINE.
See Subject Area: ORDER - Order Status and Process for more information.
Attributes | |
---|---|
ID | PRIMARY KEY |
City_ID | Lookup for the City where the Customer is located. NOT NULL |
Phone | Customer phone number. UNIQUE identifies the Customer. Cannot register two Customers with the same phone number NOT NULL UNIQUE |
First_Name | Customer First Name NOT NULL |
Last_Name | Customer Last Name NOT NULL |
Is_Company | Flag attribute to indicate if there is an individual or a company Customer. NOT NULL |
Company_Name | Company Name. If Is_Company is TRUE then Company_Name is mandatory |
Company_Tax_Code | Company Tax Code is used for invoice creation. If Is_Company is TRUE then Company_Tax_Code is mandatory |
Billing_Address | Billing Address is used for invoice creation. Billing Address can differ from Shipment Delivery Address. See Subject Area: ORDER, Entity: SHIPMENT, Attribute: Shipment_Address for more information. NOT NULL |
Is_Registered_Online | Flag to indicate the Customer is REGISTERED_ONLINE. For a REGISTERED_ONLINE Customer the: Email, Username, Password, Last_Login_Time are mandatory. NOT NULL |
Customer email address. For a REGISTERED_ONLINE Customer the Email is mandatory. UNIQUE identifies the Customer. Cannot register two Customers with the same email. NOT NULL | |
Username | Customer username. For a REGISTERED_ONLINE Customer the Username is mandatory. UNIQUE identifies the Customer. Cannot register two Customers with the same username. NOT NULL |
Password | Customer password. For a REGISTERED_ONLINE Customer the Password is mandatory. NOT NULL |
Credit | Total Credit Amount of the Customer. Customer can receive Credit as result of ORDER_REVIEW.Compensation. See Subject Area: ORDER, Entity: ORDER_REVIEW, Attribute: Compensation for more information. |
Created_Time | Date and Time when the Customer record was created. NOT NULL |
Last_Login_Time | Date and Time of the Customer last login. NOT NULL. |
Comments | Internal notes used for clarifications on record content. Can be seen and edited only by Store Employees |
List of Countries where Online Food Ordering Stores are located.
Attributes | |
---|---|
ID | PRIMARY KEY |
Name | Country name. Cannot have to countries with the same name. NOT NULL UNIQUE |
List of Regions where Online Food Ordering Stores are located.
Attributes | |
---|---|
ID | PRIMARY KEY |
Name | Region name NOT NULL |
Country_ID | Lookup for Country. NOT NULL |
CONSTRAINT UK_Region UNIQUE (Name, Country_ID) Cannot have two regions with the same name in a Country.
List of Time Zones for the Online Food Ordering Stores locations.
Attributes | |
---|---|
ID | PRIMARY KEY |
Name | Time Zone name. Cannot have two Time Zones with the same name. NOT NULL UNIQUE |
Description | Time Zone Description |
List of Cities where Online Food Ordering Stores are located.
Attributes | |
---|---|
ID | PRIMARY KEY |
Name | City name NOT NULL |
Region_ID | Lookup for Region. NOT NULL |
Time_Zone_ID | Lookup for Time zone. NOT NULL |
Zip_Code | City Zip Code |
CONSTRAINT UK_City UNIQUE (Name, Region_ID)) Cannot have two cities with the same name in a Region