473,799 Members | 3,740 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A Normalisation problem

4 New Member
Hello

I would be most grateful for a little help / discussion on a normalisation / db structure question I have.

I think the issues are pretty well explained graphically on my link (below) but the main question is I'm wondering whether the tables items and services should be in one table with an identifier and whether service providers and service customers should be in one customer table for the purpose of ordering.

View of my design

I'm not sure if I've given enough information even to be able to answer, but would appreciate some feedback

Kind Regards

Mark
Sep 12 '08 #1
1 1592
coolsti
310 Contributor
I do not see why you would want to combine services and items to one table, and service_provide rs and service_custome rs to one table. I do not really see how you can.

For both pairs of items, they are distinctly different "nouns" or things in the real world. An item is not a service. A service_custome r is not a service_provide r. So they should be represented in your database by separate tables.

Sometimes you may find it more convenient to combine entities that have a similar structure into one table, where you add another attribute (another column) that tells what type of entity it is. For example, you make a table to hold service_provide rs and service_custome rs together, and have a column named for example "type" which can be an enum('provider' ,'customer') field. But unless you are going to be able to make efficient use of this more compressed design in your select queries, as when you are often selecting from both entity types in the same query, then there is no reason to combine them into one table.

Sometimes it pays to break the normalization rules to make queries more efficient. Let us say you have an entity that has table columns that are all of fixed data sizes (e.g. int, char(10), smallint, etc.) but one column is a large variable data size such as a blob data type. If your application will perform many queries which do not affect or retrieve the blob data type, then it may be more efficient to make two tables, where a second table holds the ID as foreign key to the main first table and the blob attribute. Table searches for updates and selects will run far more efficiently on the first table with fixed record sizes, as opposed to using only one table which then would not have fixed record sizes because of the variable blob field.
Sep 14 '08 #2

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

Similar topics

0
1432
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 Description: Our project requires someone to advise us on the database structure for a game that we are planning to create. The key requirements are
1
1615
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 Description: Our project requires someone to advise us on the database structure for a game that we are planning to create. The key requirements are
0
1340
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 Description: Our project requires someone to advise us on the database structure for a game that we are planning to create. The key requirements are
2
3826
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 confusing. I am looking for a complete idiots guide that really is so simple all it needs is pictures to turn it into a kiddies book
11
2476
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 as stock control system where I need to keep track of the quantities of products. Our company is a retail chain, and we have eight shops or locations and a head office. The tables that I've set up are as follows
3
1472
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 following data. Firstly, I have a main table which records the specifics of the intervention (date, reporter, details, location etc). It has links and the database is normalised ok as far as I can make out. However, I have 6 check box fields in...
1
2119
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 attributes and they need to be normalised to 3rd normal form! i have also shown what i have come up with but i am unsure as to whether it is correct! please help as im finding this very difficult. Normalisation The goal of normalisation is to create a...
2
1713
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 propose as follows: Staff_Project (Staff_No, Proj_Id, Proj_Name Proj_Location, Staff_Hours, Staff_Name, Staff_Address) Assuming that, Staff_No stands for staff number of the employee; Proj_Id is identifies of one of the projects that the...
2
1842
mikek12004
by: mikek12004 | last post by:
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...
0
9687
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
10485
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10252
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
10231
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,...
1
7565
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
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();...
1
4141
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
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
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.