473,406 Members | 2,404 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,406 software developers and data experts.

Question on best database design.

I am relatively new to setting up databases. I am working on a database that will track some materials and trucking that our company uses. Currently I am creating a table called 'tblDayInfo'. It looks something like this:

DayID EmployeeRecNum Date DayStart DayEnd TotalHours
216 5 9/6/2006 7.00 18.00 3.5
217 13 9/6/2006 7.15 18.00 10.75
218 9 9/7/2006 8.00 14.00 etc
219 11 9/7/2006 etc etc etc

I just noticed that I have multiple DayID (the unique key for this table currently) for each date. I am concerned that this will cause me to be keeping the same data in multiple tables down the road.

Question: Should I create another column in this table that is a DateID type column that looks something like this:

DayID Date ID EmployeeRecNum Date DayStart DayEnd
216 1 5 9/6/2006 7.00 18.00 3.5
217 1 13 9/6/2006 7.15 18.00 10.75
218 2 9 9/7/2006 8.00 14.00 etc
219 2 11 9/7/2006 etc etc etc

I hope I am being clear enough. I simply want the best database design for this situation and I would appreciate any comment.
Dec 4 '06 #1
2 1450
NeoPa
32,556 Expert Mod 16PB
You need to consider this.
You have a table named tblDayInfo. This is a great name - except not for this table. It looks like a tblEmpDay type table to me. Don't have a field called DayID which doesn't identify a day! It is a recipe for disaster.
Naming is actually VERY important. Down the line when you've started work on other projects you won't remember, as you do now, that though it's called DayID it ACTUALLY refers to something slightly different. The name will be all you have.
So, You need a new name for this (presumably PK) field. You probably won't need an extra field for DayID as you have the date (only you know for sure).
Dec 4 '06 #2
NeoPa
32,556 Expert Mod 16PB
Please visit this link (How to structure your tables). It doesn't discuss naming so much as database design. It should help you better understand the concepts. It's not that big a read and with this under your belt you WILL be a better Access programmer.
Dec 4 '06 #3

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

Similar topics

2
by: Jack | last post by:
Hello, VB6. I have a class. The class receives a bunch of individual items from an asp page, then updates the database. My question is what is the best way you have found to update the...
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
2
by: Calvin | last post by:
I'm fairly new to programming, that said, I know how to 'program', but my question is about design. How big and what sort of objects should be stored in Session. I'm doing an e-commerce...
0
by: Brian | last post by:
Tim- Might I suggest you take a look at book by WROX titled ASP.NET Website Programing Problem - Design - Solution Visual Basic .net Edition The ISBN is 1-86100-816-3 This book offers some...
35
by: Stan Sainte-Rose | last post by:
Hi, What is the better way to save image into a database ? Just save the path into a field or save the image itself ? I have 20 000 images (~ 10/12 Ko per image ) to save. Stan
29
by: MP | last post by:
Greets, context: vb6/ado/.mdb/jet 4.0 (no access)/sql beginning learner, first database, planning stages (I think the underlying question here is whether to normalize or not to normalize this...
1
by: Griff | last post by:
Hi I'm not sure of the best way to go about achieving my goal and would appreciate any advice. What I would like to do is to generate a control that can be dropped onto a web page. For...
6
by: Bill44077 | last post by:
Hi, I am new to the MVP pattern and one of the main reasons that we are going this route is because we are doing Scrum with 30 day sprints - so we have a continually morphing design. We are...
0
by: | last post by:
I have a question about spawning and displaying subordinate list controls within a list control. I'm also interested in feedback about the design of my search application. Lots of code is at the...
12
by: nyathancha | last post by:
Hi, I have a question regarding best practices in database design. In a relational database, is it wise/necessary to sometimes create tables that are not related to other tables through a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
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.