MySQL Forums
Forum List  »  Newbie

Create tables: Shall i use one table or different tables in order to store data?
Posted by: g_p g_p
Date: June 21, 2009 08:20AM

Hello, i would like to create a database where i'm going to store data as far as hardware parts and devices are concerned.

Hardware parts and devices: e.g ram, motherboard, sound card,projector, monitor etc.

I have already created for each hardware part and device a table in order to store data.
e.g.

create table ram(ram_id varchar(200),
manufacturer varchar(100),
model varchar(40),
memory varchar(20),
connection varchar(100),
primary key(ram_id));

create table sound_card(sc_id varchar(200),
manufacturer varchar(50),
type integer,
model varchar(50),
primary key(sc_id));

and i have done the same with all other parts, a unique table for each of them.

My questions is: Is it better to have different tables or only one which is going to store data for the parts?

Unique table

create table hardware(hd_id varchar(200),
manufacturer varchar(50),
type_of_part_and_device varchar(100), //type of hardware: ram, motherboard,monitor etc
model varchar(50),
primary key(hd_id));

Is i better to use ONE table where i'm going to make the queries or shall i use different tables for each hardware part and device?

Thanks, in advance!



Edited 2 time(s). Last edit at 06/21/2009 08:22AM by g_p g_p.

Options: ReplyQuote


Subject
Written By
Posted
Create tables: Shall i use one table or different tables in order to store data?
June 21, 2009 08:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.