Need help with db structure (1 Viewer)

olxx

Registered User.
Local time
Today, 10:45
Joined
Oct 2, 2009
Messages
55
OK, this´s what i need to do. I want to create a budget managing db. It should contain fields Budget nr (unique), Object (may repeat), Subcategory (must be unique for every Object), Product, Amount, Price. What i want the result to be, is a form where the 1-st three fields are comboboxes and the last three (so called details) are in datasheet view and linked to Object and Subcategory. I´ve studied nwind.db and other templates but i can´t figure out how to do it. I´ve done similar databases before with main table an details table and with form and subform but this subcategory thing confuses me. Should i have 3 tables? Access table analyzer suggest me not to split table but i really don´t want to retype main fields after i enter new data to details fields. I don´t want to somebody to do the whole db for me, just need someone to show the "right road". Thx.
 

Atomic Shrimp

Humanoid lifeform
Local time
Today, 18:45
Joined
Jun 16, 2000
Messages
1,954
You need one table to store your budget data.

For any fields where you have data that might repeat on multiple rows (whether or not you want to choose the value from a list), you should store a key value that points to a table containing a list of possible values for that field.

In the case of category-type fields, you might want to store each list of values in its own dedicated table of possible values (this isn't the only way to do it, but it's simple).

In the case of fields containing things like name and address details for people, companies, etc, you probably don't want to store each column of possible values in its own table, but instead, create a table of names and addresses (or client accounts), and just reference it once from each row in the budget table (then look up as much or as little of the associated details as you need them)

Hope that helps as a start...
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 18:45
Joined
Sep 12, 2006
Messages
15,655
i thought i replied to this

first - does the budget nr mean you want multiple budgets?

second - what do you mean by object - what sort of data is an object?
 

olxx

Registered User.
Local time
Today, 10:45
Joined
Oct 2, 2009
Messages
55
Thanks for replies. First, answers to questions. Yes, there will be multiple budgets, budget number will be unique identifier. Object will be the text also unique. That´s not the problem. Problem is category. Every object have multiple categories that can not repeat inside Object. If you create new Object, you can insert new categories(predefined in some table) again. And all items must belong to certain category and certain object. I think i managed to get the tables right, but now i´ve no idea how to control those linked tables with a form.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 18:45
Joined
Sep 12, 2006
Messages
15,655
olxx

your description is too vague for me to understand whats going on

what sort of data is your object and subcategory - give us an example so we can see whats going on
 

Users who are viewing this thread

Top Bottom