Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7865027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:57:43+00:00 2026-06-02T23:57:43+00:00

I am hoping someone can help my muddle over a database schema i am

  • 0

I am hoping someone can help my muddle over a database schema i am trying to implement. It is based around selling mobile contracts and network bolt on from Network providers. The contracts are fore filled by a number of distributors who may or may not sell a networks contract the prices also differ per distributor.

Distributors
Name                Address
Distributor 1       address1
Distributor2        address2

Networks
Name
Orange
O2
Vodafone

Tariffs
Network         Tariff          Minutes
Orange      Business 600        600 Mins
Orange      Business 100        100 Mins
O2          Everyday 100        200 Mins
O2          Everyday 100        100 Mins

Devices
Name        Make        
Apple       Iphone
Samsung     Galaxy

Bolt Ons
Network Description
Orange      Web 500mb
Orange      Unlimited Texts
O2          Web 250Mb
O2          Unlimited Texts
    
Order
-   Exactly 1 Distributor
-   Exactly 1 Network
-   Exactly 1 Tariff
-   0 or more Devices
-   0 or more Bolt Ons
Distributor
-   0 or more Orders
-   1 or more Networks
-   1 or more Tariffs
o   Unique  Tariff Costs
-   1 or more BoltOns
o   Unique Bolt on Cost
-   1 or more Devices
o   Unique  Device cost
Network
-   0 Orders
-   0 or more Distributors
-   1 or more Tariffs
-   0 or more BoltOns
-   0 or more Devices
Tariffs
-   0 or more Orders
-   0 or more Distributors
-   Exactly 1 Network
-   0 or more BoltOns
-   0 Devices
BoltOns
-   0 or more Orders
-   0 or more Distributors
-   Exactly 1  Network
-   0 or more Tariffs
-   0 or more Devices
Devices
-   0 or more Orders
-   0 or more Distributors
-   0 or more Networks
-   0 Tariffs
-   1 or more BoltOns

I have come up with 2 schemas but i am really not happy with it. Mainly due to the fact that a distributor may not offer all offerings from the network. And also the prices of tariffs, devices and bolt ons also varies per distributor. I was hoping for some suggestions to the schema approach?

Many Thanks

Rob

EDIT——–
following the comments i have had i have coem up with the following shema. I have added teh following assumptions

Devices and Boltons are similar enough to be in a product table:

The types of query we will need to be running is invoice generation based on what a user may have paid 6-12 months ago – prices for distributors may change monthly.

Number of phones sold per distributor per network etc…

  • Tariffs are the same across distributors however the price and commission changes per distributor.

Any comments on the below schema?

[Distributors] 
    [Dist_ID] PK
    [Name],
    [Address]

[Network]
    [Network_ID]  PK,
    [Name],

[Tarrif]
    [TariffID] PK
    [Name],
    [Minutes] ,
    [OtherMinutes] ,
    [Texts] ,
    [Data],
    [Term] ,
    [Active] BIT,

[TariffsByDistributor] 
    [TariffsDistributorID] PK
    [DistID]    FK
    [TariffID]  FK
    [RevShare],
    [Commision],
    [Cost],
    [Active]

[Product_Type] 
    [Product_Type_ID]  PK,
    [Name],
    [Details],

[TariffsByNetwork]
    [Network_ID]  PK,
    [TariffID]    PK,

[Order] (
    [Order_Id]      PK,
    [Customer_Id],
    [Date Sold],
    [PaymentStatus],
    [PaymentStatusDate],

[TariffOrders] (
    [Order_Id]          PK,
    [TariffsDistributorID]  PK,
    [RevenueShare],
    [Commision],
    [Cost],

[Products] (
    [Product_Id]    PK
    [Product_Type_ID] FK,
    [Name],
    [Manufacturer],
    [Colour] 
    [Picture],
    [Active] BIT,

[ProductByDistributor]
    [ProductsByDistributorID] PK,
    [Dist_ID]    FK,
    [Product_Id] FK,
    [RevShare],
    [Commision],
    [Cost],
    [Active],

[ProductsOrder] 
    [Order_Id]          PK,
    [ProductsByDistributorID]   PK,
    [RevenueShare],
    [Commision],
    [Cost],

[Products_Network] 
    [Network_ID]    PK,
    [Product_Id]    PK,
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T23:57:45+00:00Added an answer on June 2, 2026 at 11:57 pm

    You are on the right track to finishing your schema, in that you are identifiying the relationships between distributors and offerings, distributor and pricings.

    I’d start by adding in a DistributorTariff table which has relationships to both the Distributor and the Tariff. Then, look for other restrictions such as TariffPrice, etc and build up the tables there.

    If you know ALL the relationship rules you’ll be able to set it out on paper first. If you share all of your rules, I can help you further with your design.

    About your schema

    It looks good. What might seem like extra complexity in normalising your database at this stage will save you headaches later. I’d make the following recommendations:

    • Standardise whether your table names are plural or not. For example, you have singular “Order” but plural “Products”. My personal preference would be to go with singular but that’s a discussion for another time.
    • Rename “ProductByDistributor” to “DistributorProduct” (or the plural if you go that way).
    • With the joining table names, I tend to find that an “OwnerItem” format reads better. For example, “OrderProduct” as opposed to “ProductOrder”.
    • You can get rid of your tables “TariffOrders” and “ProductOrders”. In place of these, you need to add a “OrderPart” or “OrderItem” table. This will have foreign keys which link to “Order”, “DistributorProduct” and “DistributorTariff”. This removes the duplication of the revenue share, commission and cost data.
    • Correct your typo of the word “Tariff”. It WILL annoy you in future! ;o)

    Hope that helps. I’m happy to elaborate on any questions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm hoping someone can help me. For my website I have a corresponding mobile
Struggling to get my head around these MD Arrays so hoping someone can help.
hoping someone can help me out with this. I'm trying to figure out whether
I hoping someone can help me with a MySQL query. I am trying to
I am hoping someone can help me. I am trying to add Ajax controls
I'm hoping someone can help me with mapping a legacy database. The problem I'm
I'm hoping someone can help me wrap my head around what's going on when
Hoping someone can help me with a slight hurdle I've come up against in
im hoping someone can help me quickly with a question i have. As site
I am hoping someone can help me with a question i have relating to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.