Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
account_schema [2019/01/30 09:21]
127.0.0.1 external edit
account_schema [2019/01/30 11:59]
kcifreo
Line 1: Line 1:
-=Description= +==== Description ====
- +
  
 The Account Schema is the logical relationship between tables in a Control database that deal with Customers and Contacts. The Account Schema is the logical relationship between tables in a Control database that deal with Customers and Contacts.
-  * Account ​ 
-    * AccountContact ​ 
  
 +  * Account
 +      * AccountContact
  
 +<​html><​div style="​margin-left:​ 40px;">​ linked on Account.ID = AccountContact.AccountID </​div></​html>​
  
-<​html><​div style="​margin-left:​ 40px;">​> linked ​on Account.ID = AccountContact.AccountID ​</​div></​html>​+<​html><​div style="​margin-left:​ 40px;"> ​backlink ​on Account.PrimaryContactID ​= AccountContact.ID </​div></​html>​
  
 +<​html><​div style="​margin-left:​ 40px;">​ backlink on Account.BillingContactID = AccountContact.ID </​div></​html>​
  
 +  * AccountContactUserField
  
-<​html><​div style="​margin-left:​ 40px;">​> backlink ​on Account.PrimaryContactID ​AccountContact.ID </​div></​html>​+<​html><​div style="​margin-left:​ 40px;"> ​linked ​on AccountContact.ID AccountContactUserField.ID </​div></​html>​
  
 +  * Address
  
 +<​html><​div style="​margin-left:​ 40px;">​ linked on AccountContact.BillingAddressID = Address.ID </​div></​html>​
  
-<​html><​div style="​margin-left:​ 40px;">​> backlink ​on Account.BillingContactID ​AccountContact.ID </​div></​html>​ +<​html><​div style="​margin-left:​ 40px;"> ​linked ​on AccountContact.ShippingAddressID ​Address.ID </​div></​html>​
-      * AccountContactUserField+
  
 +  * AddressLink
  
 +<​html><​div style="​margin-left:​ 40px;">​ linked on AccountContact.ID = AddressLink.ParentID and AccountContact.ClassTypeID = AddressLink.ParentClassTypeID </​div></​html>​
  
-<​html><​div style="​margin-left:​ 40px;">>>​ linked on AccountContact.ID = AccountContactUserField.ID </​div></​html>​ +  ​* Address
-      ​* Address ​+
  
 +<​html><​div style="​margin-left:​ 40px;">​ linked on AddressLink.AddressID = Address.ID </​div></​html>​
  
 +  * PhoneNumber
  
-<​html><​div style="​margin-left:​ 40px;">>> linked on AccountContact.BillingAddressID ​Address.ID </​div></​html>​+<​html><​div style="​margin-left:​ 40px;">​ linked on AccountContact.MainPhoneNumberID ​PhoneNumber.ID </​div></​html>​
  
 +<​html><​div style="​margin-left:​ 40px;">​ linked on AccountContact.MainFaxNumberID = PhoneNumber.ID </​div></​html>​
  
 +  * Employee (used when using separate sales people for contacts)
  
-<​html><​div style="​margin-left:​ 40px;">>> linked on AccountContact.ShippingAddressID ​Address.ID </​div></​html>​ +<​html><​div style="​margin-left:​ 40px;">​ linked on Account.SalespersonID1 ​Employee.ID </​div></​html>​
-      * AddressLink+
  
 +<​html><​div style="​margin-left:​ 40px;">​ linked on Account.SalespersonID2 = Employee.ID </​div></​html>​
  
 +<​html><​div style="​margin-left:​ 40px;">​ linked on Account.SalespersonID3 = Employee.ID </​div></​html>​
  
-<​html><​div style="​margin-left:​ 40px;">>>​ linked on AccountContact.ID = AddressLink.ParentID and AccountContact.ClassTypeID = AddressLink.ParentClassTypeID </​div></​html>​ +  ​AccountUserField
-        ​Address+
  
 +<​html><​div style="​margin-left:​ 40px;">​ linked on Account.ID = AccountUserField.ID </​div></​html>​
  
 +  * Address
  
-<​html><​div style="​margin-left:​ 40px;">>>​> linked on AddressLink.AddressID ​= Address.ID </​div></​html>​ +<​html><​div style="​margin-left:​ 40px;">​ linked on AccountContact.BillingAddressID ​= Address.ID </​div></​html>​
-      * PhoneNumber ​+
  
 +<​html><​div style="​margin-left:​ 40px;">​ linked on AccountContact.ShippingAddressID = Address.ID </​div></​html>​
  
 +  * AddressLink
  
-<​html><​div style="​margin-left:​ 40px;">>> linked on AccountContact.MainPhoneNumberID ​PhoneNumber.ID </​div></​html>​+<​html><​div style="​margin-left:​ 40px;">​ linked on Account.ID AddressLink.ParentID and Account.ClassTypeID = AddressLink.ParentClassTypeID ​</​div></​html>​
  
 +  * Address
  
 +<​html><​div style="​margin-left:​ 40px;">​ linked on AddressLink.AddressID = Address.ID </​div></​html>​
  
-<​html><​div style="​margin-left:​ 40px;">>>​ linked on AccountContact.MainFaxNumberID = PhoneNumber.ID </​div></​html>​ +  ​PhoneNumber
-      ​Employee (used when using separate sales people for contacts)+
  
 +<​html><​div style="​margin-left:​ 40px;">​ linked on Account.MainPhoneNumberID = PhoneNumber.ID </​div></​html>​
  
 +<​html><​div style="​margin-left:​ 40px;">​ linked on Account.MainFaxNumberID = PhoneNumber.ID </​div></​html>​
  
-<​html><​div style="​margin-left:​ 40px;">>>​ linked on Account.SalespersonID1 = Employee.ID </​div></​html>​+  * PricingLevel
  
 +<​html><​div style="​margin-left:​ 40px;">​ linked on Account.PricingLevelID = PricingLevel.ID </​div></​html>​
  
 +  * Promotion
  
-<​html><​div style="​margin-left:​ 40px;">>> linked on Account.SalespersonID2 ​Employee.ID </​div></​html>​+<​html><​div style="​margin-left:​ 40px;">​ linked on Account.PromotionID ​Promotion.ID </​div></​html>​
  
 +  * PaymentTerms
  
 +<​html><​div style="​margin-left:​ 40px;">​ linked on Account.PaymentTermsID = PaymentTerm.ID </​div></​html>​
  
-<​html><​div style="​margin-left:​ 40px;">>>​ linked on Account.SalespersonID3 = Employee.ID </​div></​html>​ +  ​TaxClass
-    ​AccountUserField+
  
 +<​html><​div style="​margin-left:​ 40px;">​ linked on Account.ClassTypeID = ClassType.ID </​div></​html>​
  
 +  * Employee
  
-<​html><​div style="​margin-left:​ 40px;">> linked on Account.ID AccountUserField.ID </​div></​html>​ +<​html><​div style="​margin-left:​ 40px;">​ linked on Account.SalespersonID1 ​Employee.ID </​div></​html>​
-    * Address ​+
  
 +<​html><​div style="​margin-left:​ 40px;">​ linked on Account.SalespersonID2 = Employee.ID </​div></​html>​
  
 +<​html><​div style="​margin-left:​ 40px;">​ linked on Account.SalespersonID3 = Employee.ID </​div></​html>​
  
-<​html><​div style="​margin-left:​ 40px;">>​ linked on AccountContact.BillingAddressID = Address.ID </​div></​html>​ +  ​* Account (self-reference for parent/​subsidiaries)
- +
- +
- +
-<​html><​div style="​margin-left:​ 40px;">>​ linked on AccountContact.ShippingAddressID = Address.ID </​div></​html>​ +
-    * AddressLink +
- +
- +
- +
-<​html><​div style="​margin-left:​ 40px;">>​ linked on Account.ID = AddressLink.ParentID and Account.ClassTypeID = AddressLink.ParentClassTypeID </​div></​html>​ +
-      * Address +
- +
- +
- +
-<​html><​div style="​margin-left:​ 40px;">>>​ linked on AddressLink.AddressID = Address.ID </​div></​html>​ +
-    * PhoneNumber  +
- +
- +
- +
-<​html><​div style="​margin-left:​ 40px;">>​ linked on Account.MainPhoneNumberID = PhoneNumber.ID </​div></​html>​ +
- +
- +
- +
-<​html><​div style="​margin-left:​ 40px;">>​ linked on Account.MainFaxNumberID = PhoneNumber.ID </​div></​html>​ +
-    * PricingLevel +
- +
- +
- +
-<​html><​div style="​margin-left:​ 40px;">>​ linked on Account.PricingLevelID = PricingLevel.ID </​div></​html>​ +
-    * Promotion +
- +
- +
- +
-<​html><​div style="​margin-left:​ 40px;">>​ linked on Account.PromotionID = Promotion.ID </​div></​html>​ +
-    * PaymentTerms +
- +
- +
- +
-<​html><​div style="​margin-left:​ 40px;">>​ linked on Account.PaymentTermsID = PaymentTerm.ID </​div></​html>​ +
-    * TaxClass +
- +
- +
- +
-<​html><​div style="​margin-left:​ 40px;">>​ linked on Account.ClassTypeID = ClassType.ID </​div></​html>​ +
-    * Employee +
- +
- +
- +
-<​html><​div style="​margin-left:​ 40px;">>​ linked on Account.SalespersonID1 = Employee.ID </​div></​html>​ +
- +
- +
- +
-<​html><​div style="​margin-left:​ 40px;">>​ linked on Account.SalespersonID2 = Employee.ID </​div></​html>​ +
- +
- +
- +
-<​html><​div style="​margin-left:​ 40px;">>​ linked on Account.SalespersonID3 = Employee.ID </​div></​html>​ +
-    ​* Account (self-reference for parent/​subsidiaries) +
- +
- +
- +
-<​html><​div style="​margin-left:​ 40px;">>​ linked on Account.ParentID = Account.ID </​div></​html>​ +
- +
- +
- +
-=Source=+
  
 +<​html><​div style="​margin-left:​ 40px;">​ linked on Account.ParentID = Account.ID </​div></​html>​
  
 +==== Source ====
  
 Contributor:​ Cyrious Contributor:​ Cyrious
- 
- 
  
 Date: 6/2016 Date: 6/2016
- 
- 
  
 Version: Control 5/7 Version: Control 5/7
- 
-