| | |
inventory db
Please support our MS Access and FileMaker Pro advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Apr 2009
Posts: 3
Reputation:
Solved Threads: 0
I'm in the planning stages of an inventory db. The part I can't figure out is how to design the database as far as changing costs go. If I have a cost associated with an item, how do I handle when the cost changes? I know I need to have an effective date with each cost, but all items won't have the costs changing at the same time.
I appreciate any help or suggestions.
Thanks,
Mary
I appreciate any help or suggestions.
Thanks,
Mary
You should have a seperate table which holds your costs and is referenced to the item table.
Items
--------
id
item_name
Desc
etc.
costs
----------
id
items_id
Costs
effective_date
expiry_date
When you need to update a cost you set the expiry_date for the current record and insert a new record in costs for the items_id. This way you will also have historical data for your changing costs. When referencing the costs you just have to select the active record for the item.
Items
--------
id
item_name
Desc
etc.
costs
----------
id
items_id
Costs
effective_date
expiry_date
When you need to update a cost you set the expiry_date for the current record and insert a new record in costs for the items_id. This way you will also have historical data for your changing costs. When referencing the costs you just have to select the active record for the item.
I have never used filemaker but it is a relational db so their is most likely either a sql window or graphic sql designer like in acccess.
If there isn't you will have to find out how to join tables in filemaker, then join the items table to the costs table where the expiry date is null.
Simple sql
Sorry I couldn't help with the filemaker syntax, there might be someone on here that knows the product.
If there isn't you will have to find out how to join tables in filemaker, then join the items table to the costs table where the expiry date is null.
Simple sql
sql Syntax (Toggle Plain Text)
SELECT a.Item_name, b. Costs FROM items a, costs b WHERE a.id = b.Item_id AND b.expiry_date IS NULL
Sorry I couldn't help with the filemaker syntax, there might be someone on here that knows the product.
Last edited by peter_budo; May 6th, 2009 at 3:11 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
![]() |
Similar Threads
- Need help C++ inventory project (C++)
- Inventory Control Database Design (Costing Methods) (Database Design)
- MS Access DATABASE HELP!! composite keys and inventory (MS Access and FileMaker Pro)
- Recommendation for Network Inventory tool (Networking Hardware Configuration)
- PHP-MySQL: Registration, Leave Request, Inventory Information, etc... (PHP)
- Inventory Application for DVDs (Java)
- Inventory administration program (C)
- VB Programming - Inventory Program (Visual Basic 4 / 5 / 6)
Other Threads in the MS Access and FileMaker Pro Forum
- Previous Thread: Email Validation Rule with MS ACCESS
- Next Thread: BD remains open after SELECT
| Thread Tools | Search this Thread |





