473,666 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

storing data in a table

robin a
30 New Member
I am using access 2007. This is a training database in which classes are assigned to employees by their job title. I have the Class_Catalog table which stores all class information, including a job_title field. My problem is, now that I am importing data, I've found that since up to everyone in the company (450 people) are required to take many of these classes. I don't want to add the same class 450 times with each applicable job title because I don't think that's the smart way to do it and I don't want to bloat the database. I can't think of any other way to make sure classes get assigned to the proper job_titles.

I would appreciate any suggestions.
Sep 19 '12 #1
8 1833
robin a
30 New Member
I wanted to add that there are only 38 job titles. would making job titles a mutli-valued field work or would it complicate all of my queries?
Sep 19 '12 #2
Seth Schrock
2,965 Recognized Expert Specialist
From what I'm reading, I believe that you would want a table of job titles and a table of classes. Also, since each class could be assigned to multiple job titles and I'm assuming that each job title could be required to take multiple classes, you have a many to many relationship which requires a joining table. This would consist of the primary keys of the two tables. You then set the combination of those two fields as the primary key of the joining table. This would allow you to make all the assignments needed.
Sep 19 '12 #3
zmbd
5,501 Recognized Expert Moderator Expert
Seth is certainly on the right track here with normalizing the database. I've sent you a PM with several links that might prove helpfull
Sep 19 '12 #4
Seth Schrock
2,965 Recognized Expert Specialist
I wouldn't do a multi-valued field as it would really complicate your queries.
Sep 19 '12 #5
robin a
30 New Member
Seth,
Are you saying that after creating the join table, I would still add a lot of records to the class_catalog table? e.g. with a multivalued field it would look like this:

Class_ID Job_Title Class_Name
1 machine operator, handpacker, coach first aid

if it isn't multivalued it would look like this:

Class_ID Job_Title Class_Name
1 machine operator first aid
2 handpacker first aid
3 coach first aid
Sep 19 '12 #6
Seth Schrock
2,965 Recognized Expert Specialist
That is correct. The problem with the multivalued field is that if you would ever want to query the database to see what classes a certain job title, it would require a lot of coding. Even if you don't need that ability now, it is always best to design a database according to normalization rules. This allows you to add to your database without having to make major design changes to the existing database. Also, because the join table is just those two fields (occasionally there are more, but in this case there are only two) you don't have to worry about bloating the database. To save you from having to type everything, you can create a form based on the join table and use combo boxes to populate the table.

I believe I might have forgotten to mention adding the relationships between the three tables. Classes table related to the join table as one-to-many and job titles table related to the join table the same way.

Here is something else you can do to make it easier to add all of those combinations. Say you have a form for your classes based on the classes table and a form for your job titles based on the job titles table. We will name them frmClasses and frmJobTitles respectively. You would then create a form in datasheet view based on the join table. We will call it frmJoin. You would then put frmJoin on frmClasses as a subform. You can also do this on frmJobTitles. Because of the relationships, access will be able to automatically find the relationship between the main form and the subform form. This will make it so that you only have to add information to the one field instead of both.
Sep 19 '12 #7
TheSmileyCoder
2,322 Recognized Expert Moderator Top Contributor
What Seth and zmbd are saying is the "best practice" approach to the problem. People tend to think that the multivalued fields are nice to use, but if you look around a bit on the net, you will see that almost all seasoned access developers will tell you not to use that feature.
Sep 19 '12 #8
robin a
30 New Member
Thank you everyone. I now know NOT to use the multivalue data type. Turns out my existing design included a join table and it works well. I just don't like having to put in a class up to 40 times BUT, I do have a selection for ALL that assigns to every employee. Everyone's advice was very clear and helpful. Thank you everyone.
Sep 20 '12 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2477
by: Kevin Myers | last post by:
Hello, I'm an experienced application developer in some languages (including various SQL dialects), but have very little experience with MS Access or VBA, and am having trouble figuring out how to even get started with the following seemingly simple task... I have a table with a composite primary key made up of three columns. The lowest level key is a simple numeric identifier, but is not an autonumber column. Values from several...
2
2707
by: Brian Mitchell | last post by:
Ok, I know this is an elementary question but I have a data grid that is bound to a data table and I can't seem to find a way to match the selected row in the grid with it's respective row in the underlying data table. If the rows in the grid are in the same order as the rows in the table then I can use the Datagrid.CurrentRowIndex to return the same row from the data table. But if the user sorts the data in the grid then the row order...
11
3445
by: Ron L | last post by:
I have a data table that lists a series of items in my database. In my user form, I want the user to be able to filter by a number of criteria (e.g. location, contract, date modified, etc). Other than modified date, all my filters are selected via combo boxes. I would like to have the combo boxes update so that if there are no items available in the currently filtered list for a given selection, that selection will not appear in the...
1
2768
by: John | last post by:
Hi When using Table Adapter Configuration Wizard if 'Use SQL Statements' is selected as Command Type, the data table's name in dataset is retained and only its data adapter's select statements are replaced. If however 'Create new stored procedures' is selected as Command Type, the data table name in replaced by the name of the newly created select stored procedure. Problem with this is that the data table's name needs to be put back...
5
2194
by: hfk0 | last post by:
Hi, I'm new to ASP.net, SQL Server and visual studio.net, and I'm having problem inserting and storing data from a web form to a SQL database. I created a simple ASP.NET web form, a simple SQL database, a database connection (using the SQlDataSource Web Control from the Toolbox), and created the following stored procedure in Visual Studio.Net 2005:
1
3476
by: laredotornado | last post by:
Hi, I have a data table on my page (buried amidst other images and extraneous text). I would like to spawn a new window that automatically prints the content of my data table, and only that content. The tricky part is the ordering of the table may not be the same as when the page was loaded. I recently discovered the virtues of JQuery and its tablesorter plugin (http://motherrussia.polyester.se/ jquery-plugins/tablesorter/), so it is...
4
2063
by: Falcolas | last post by:
I personally feel that it's a bad idea. I've got to convince managerial types of this. Would some of you mind posting comments for and against the concept of storing data in XML attributes? If you've got nothing good to say for it, I'm OK with that too. Thanks ahead of time for your input. ~G
1
1961
by: libish | last post by:
hi all.... can any one suggest me an idea for storing data in its record store.. like RMS in j2me. thanks in advance..
4
34465
by: indona | last post by:
hi, i have to enter data from a delimited file into sqlserver database table. i have been able to delimit the file and read the data into a data table, now i want enter the data table contents to sqlserver. some help in this matter...if possible code for moving data from data table to the database....would be really helpful. thanks in advance.
1
2639
by: BaseballGraphs | last post by:
Hello, I am trying to divide one value from my data table with an associated ID by another value from my data table with a different ID for the same day that the value was added to the data table. I update my data table daily with several values that have different IDs that label the value type. Certain of the values I add to my data table also have a value of 0. Therefore, if I want to divide one value by another, I have to ensure that...
0
8444
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8781
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8551
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7386
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5664
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2771
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1775
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.