473,402 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Table Layout

aas4mis
97
I'm having a hard time getting started and am open to suggestions for the layout of my table. I have an excell spreadsheet with the fields "container[text], dock#[number], vendor name[text], team members[text, may be multiple members], date in[date container arrived], and shift worked[text, 1st, 2nd, 3rd, weekend]". I can get a generic table laid out but I want to be able to search by container, vendor, and/or user for a specific date, for this I am at a loss. Primarily when it comes to splitting the table and assigning relationships to match my search criteria. I've been working on this for a while now and keep reaching a dead end. Any good starting points would be appreciated.
Thanks.
Feb 27 '08 #1
3 1145
jeffstl
432 Expert 256MB
I'm having a hard time getting started and am open to suggestions for the layout of my table. I have an excell spreadsheet with the fields "container[text], dock#[number], vendor name[text], team members[text, may be multiple members], date in[date container arrived], and shift worked[text, 1st, 2nd, 3rd, weekend]". I can get a generic table laid out but I want to be able to search by container, vendor, and/or user for a specific date, for this I am at a loss. Primarily when it comes to splitting the table and assigning relationships to match my search criteria. I've been working on this for a while now and keep reaching a dead end. Any good starting points would be appreciated.
Thanks.
Well if you want to do your tables right it sounds like you will need to split out team members for certain, and possbly vendor depending on how often a vendor name may change in the future.

I would set up a main table:

MainID (autonumber)
Container
Dock
VendorCode
Date
Shift

A second table that holds the team members will use the MainID to link it to that record. This allows you to have as many team member associated with that main record as you want.

TeamMemberID (autonumber)
MainID
TeamMemberName

Then optional, a 3rd table to store vendors and look them up (in case thier name changes in the future this will maintain historical data) This may also apply to your Dock field too. (something similiar)

VendorID (autonumber)
VendorCode
VendorName


Lastly, as far as searching, not sure where you are at with SQL but thats what you will need to pull data from these tables. You can build auto-querys with access though and save them, then refer to them in code pretty easily.

Just an example of getting say all team members that worked on a specific date and a specific container with the proper vendor also looked up. Keep in mind this is just an example and may not be what your looking for but something to start with. Try some of this out and post the specific problems you have implementing it and we can help more.

Expand|Select|Wrap|Line Numbers
  1.  
  2. Select * from MainTable, TeamMemberTable,VendorTable where MainTable.Container = '" & MyVariable & "' and MainTable.Date = #" & MyDate & "# and MainTable.VendorCode = VendorTable.VendorCode and MainTable.MainID = TeamMemberTable.MainID
  3.  
  4.  
Feb 27 '08 #2
Stewart Ross
2,545 Expert Mod 2GB
...I have an excell spreadsheet with the fields "container[text], dock#[number], vendor name[text], team members[text, may be multiple members], date in[date container arrived], and shift worked[text, 1st, 2nd, 3rd, weekend]". I can get a generic table laid out but I want to be able to search by container, vendor, and/or user for a specific date, for this I am at a loss. ...
Excel is a great spreadsheet but a very poor database. Its freeform nature encourages the storing of redundant data that has had no thought put into it at all.

There are at least five main entities that should all be separated out in that Excel sheet at present: Vendor, Container, Team Member, Dock and Shift. Look for the main real-world objects which are of interest (and indeed you listed all of the ones I mentioned yourself!). There are relationships between those entities. I'm guessing at these here, and you may know better: a vendor can supply many containers, but for each container there is only one vendor, so there is a 1-Many relationship there. A container can be parked in one of many docks - and each dock can have many containers. As this is a Many-Many relationship it needs to be broken down into two 1-Many relationships via the use of a sixth entity - a Dock Container List link table in this case. Similarly for Team Member and Shift, which is also Many-Many. And these are just the obvious ones...

There is a good article on database table design and normalisation in the HowTo section of this forum, at http://www.thescripts.com/forum/thread585228.html.

Good luck with the project.

-Stewart
Feb 27 '08 #3
aas4mis
97
My apologies for the late reply, work has picked up and I'm only pushing access db's on my free time. Thanks for all the great info, sure to be a good starting point for this db. I've done a few db's with relationships but for some reason this one has had me chasing my tail. I really don't think the logic is my problem, I'm just not sure where I want this db to go. I usually start with a pencil and paper drawing out my form and go from there, I'm just having a hard time visualizing this one. Anyways, thanks again for taking the time to point me in the right direction.
Mar 3 '08 #4

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

Similar topics

9
by: alex | last post by:
Hi, It seems like HTML 4.01 Transitional spec. doesn't allow table height to be expressed in percents. When i have this doctype tag: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...
61
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
7
by: mr_burns | last post by:
hi, is the table percent value for height used for displaying in browsers. i have a table i want to run to the bottom of the screen so it seemed best to set the height value to 100%. when i...
39
by: Zak McGregor | last post by:
Hi all Are there any good solutions to aligning form field names and input boxes without resorting to tables? I am struggling to do this nicely at the moment. Thanks Ciao Zak
12
by: Rick DeBay | last post by:
I'm trying to create a layout table, where the spacing between rows varies. I've tried using setting margin-top and border-top for the rows I wan't spaced down from the one above, and I've also...
47
by: Neal | last post by:
Patrick Griffiths weighs in on the CSS vs table layout debate in his blog entry "Tables my ass" - http://www.htmldog.com/ptg/archives/000049.php . A quite good article.
16
by: Michael Rozdoba | last post by:
I'm far from a CSS expert, but what I see of it I really like & I love keeping content & style separate. I also hate the way table layout produces convoluted bulky code. However when asked why...
4
by: Rob Freundlich | last post by:
I have some servlet-generated tabular data that I need to present, so I'm using an HTML Table. In some cases, it can be quite large. I'm flushing the servlet output every N lines to push the data...
7
by: ALI-R | last post by:
Hi All, I have two user controls (header and footer) ,,which I've placed in an HTML Table in a page.I set the **align="center"** in the table and the table still is on the left side of the page...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.