Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

I'm thinking there has to be a better way...

Featured Replies

I'm trying to design a database for a business that (let's say) furnishes executive offices at large companies. Each contract is negotiated, so what Company ABC pays for a chair is not necessarily what Company XYZ pays.

I'd like the solution to be expandable by the user without getting into the schema, so I'm thinking:

CUSTOMERS table with Customer and CustomerID

ITEMS table with Item, Price, CompanyID and NegotiatedPrice.

LINEITEMS with Item, Price and NegotiatedPrice, the latter 2 as lookups from ITEMS

Each time a new contract is signed, the user can add a new record to the CUSTOMERS table. I'd have to script a duplication of all records in the ITEMS table with the new CompanyID and blank NegotiatedPrice for user to fill in.

If the user wants to offer a new item, a new record can be created in the ITEMS table and I'd have to script as many duplications of that item as there are Customers

It's this duplication process that bothers me a little bit. With 20 different contracts, the ITEMS table will have 20 items called "Corner Desk" 20 items called "Guest Chair" 20 items called "Wall Clock" etc. albeit with different CompanyID and NegotiatedPrice

Is there a better way to go about this? TIA to all.

I think that your way is OK.

Later you will find very useful to see what each company was get.

Or what are the best sellers. Or...

From my experience - better is to record maximum information.

In similar way I have made store application with several thousands of units, tens of suppliers, hundreds of buyers and don't think that buy and sell price is the same all the time. In the end of day, week, month or year I can get reports in any form or layout my boss can imagine.

Don't worry and keep developing :laugh:

If I am reading this right, it is not a particularly good structure.

Customers- Name rank ID....

Items - Name, ID

Contract - Customer ID, boiler plate - Many to one relation with Customers assuming a customer can have more than one contract.

Line Items - Item ID, negotiated Price, Contract ID - A join table of Contract and Items

I think this would give a better more normalized structure.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.