473,396 Members | 1,809 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,396 software developers and data experts.

DB Normilazation

Hello,

I have just taken my first stab at trying to normilize a testdb that I have
created in SQL 2000. I want to get feedback and or tips and hints on whether
or not I've normalized this DB to the 3rd. Form. Below you'll find the
information on the Tables I've created. Thanks in advance:

tbl_Customers:
CustomerID
CustomerTypeID
CustomerName
DateCreated
CustomerNotes
DateLastModified

tbl_CustomerType (look up table):
CustomerTypeID
CustomerTypeName
Description

tbl_CustomerAddress:
CustomerAddressID
CustomerID
DateCreated
Address
City
State
ZipCode
DateLastModifed
AddressNotes
IsPrimaryAddress

tbl_Contacts:
ContactID
CustomerID
ContactTypeID
FirstName
MiddleName
LastName
PhoneNumber
EMail
IsPrimaryContact
ContactNotes
DateLastModified

tbl_ContactTypes (look up table):
ContactTypeID
ContactTypeName
Description

tbl_Orders
OrderID
CustomerID
OrderNotes

tbl_OrderDetails:
OrderDetailsID
OrderID
ProductID
DateOfPurchase
Quantity
DateOfShipment
OrderNOtes

tbl_Products
ProductID
ProductName
ProductPrice
ProductDescription
UnitsInStock
Nov 16 '05 #1
1 1239
Honestly, with a quick glance, these tables look pretty normalized.

On a different note, I'll suggest some rules that I use that speed up
development for me.

1) All tables should be singular, no exceptions. you have half and
half. when your typing and you don't know the name of the table, it
will save you time in the long run if you're consistent.
2) By following rule #1, each table should have a primaryKey that is
the name of the table plus ID. So, Order (I would lose the tbl_) would
have primaryKey called OrderID
3) You should never prefix any column with the name of the table. This
should be implied because you're already in that table. For example, I
would change CustomerName to just Name (even though Name is a keyword
--> contrary to what other people may argue this will not cause any
problems).
4) The only exception to 3 is if it's a candidate for a foriegn key to
another table. So I would leave CustomerTypeID alone.

These are merely suggestions, so don't take them too seriously, I was
just bored and decided to read some posts ;)

-dave

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: frizzle | last post by:
Hi there, I'm building a music site with a mysql backend. It has a many to many relational database. I use this to match music genres with certain artists, to maintain the possibility to add...
6
by: lyne_asp | last post by:
Hello everybody, Please help me on how to split data..In my database I have varchar data(vcProcess) and the value is 1,4,10,15 How can I split these data, so the output will be 1 4 10 15
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
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
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,...

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.