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

Question about DB normalisation

mikek12004
200 100+
I have a table for categories (id->the primary key, and name) and I want to add another column parent (one category might be inside another) with the id's range of values so in fact parent will be a foreign key of the id right?Can I declare a foreign key of a primary key in the same table as that primary key or it is better make a seperate table for the relationships between categories? (lately been reading about db normalisation and wandering which the right thing to do)
PS any good tutorials on DB normalisation ?
Jun 18 '09 #1
2 1817
I got the most from these tutorials.

http://www.keithjbrown.co.uk/vworks/mysql/mysql_p7.php

But normalisation has to be one of the hardest things involved in designing a website. Especially with around 10-20 tables and hundreds of columns. I just dont seem to be able to learn it. ;p just read it over and over and it sort of gets a little clearer but never clear. Good luck.
Jun 30 '09 #2
Annalyzer
122 100+
No, you can't create a foreign key in its own table. To be foreign, it must be the primary key in another table. This is why you call it foreign. Otherwise I think you would have to call it a "native" key. ;-)
Jul 4 '09 #3

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

Similar topics

1
by: Michael | last post by:
I have a question about the design of a database structure. I have a customer that has a pricegroup: Customer PriceGroup 1234 2 3245 3 I have a collegue who like to create a price...
0
by: Michael Lauzon | last post by:
Database Normalisation Advisor Designated Contact: thox, xpl2 Status: Open Open Date: 2004-10-26 11:53 For Project: Lands of Myths & Legends (http://sourceforge.net/projects/lamyle/) Long...
1
by: Michael Lauzon | last post by:
Database Normalisation Advisor Designated Contact: thox, xpl2 Status: Open Open Date: 2004-10-26 11:53 For Project: Lands of Myths & Legends (http://sourceforge.net/projects/lamyle/) Long...
2
by: James W. | last post by:
Hi everyone, I would like to ask you lot if you know of a great place on the internet for a fool proof idiots guide to Normalisation 1st, 2nd, 3rd. I looked at webopedia but that is just as...
11
by: Michael Thomas | last post by:
Hi everyone Not sure if this is the right newsgroup to be posting to for this question, but I am using Access 2002 to develop a database solution for the company that I work for. It's basically...
5
by: perspolis | last post by:
hi everyone In my accounting database ,there are several account like Persons,Banks,.... I design them in separated table. in your opinion ,it's better to have all in one table or separated...
3
by: Macbane | last post by:
Hello All, This has been bugging me for too long. I have a database that records medical interventions. I am familiar with the theory behind normalisation but am unsure what to do with the...
1
by: shauna | last post by:
hi, i am an As level student studying Applied ICT, im having problems with normalisation. our problem is to computerise a made up business.mine for example is a beauty salon. below are my...
2
by: hiyamwah | last post by:
Hi i am a little unsure of how you do this problem: A company wishes to allocate staff to a new project that as been proposed by the company. As a result, a new relation was created for this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...
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
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
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...

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.