Home » Developer & Programmer » Designer » Problem in design a data model (Oracle Linux 6.7, Oracle 12.1.0.2.0)
Problem in design a data model [message #672088] Tue, 02 October 2018 07:53 Go to next message
fabi88
Messages: 112
Registered: November 2011
Senior Member
Hi experts,

I have a problem in designing data model in database.
The issue is that product information should be keep in database (So we should have a table with name of "Products"), the products come from different sources(So we should have a table with name of "Source_Types"), but one of the sources is divided into several parts itself ( we have a table with name of "Source_A"). The Tables structures are like:
Source_Type Table
---------- 
Source_Type_ID (PK) int NOT NULL
Source_Name varchar2(50) NOT NULL

Data
1 Source_A
2 Source_B
3 Source_C
.
.
.

Source_A Table
---------- 
Source_A_ID (PK) int 
Name  Source_A_Name varchar2(50) 
Location_ID  int
Description varchar2(50) 

Data
1 Source_A_1
2 Source_A_2
3 Source_A_3
.
.
.

And the products table is like this(the problem is here that I think design is wrong):

Product_Table
---------- 
Product_ID  (PK) int NOT NULL
Source_Type_ID FK To Source_Type Table
Source_A_ID FK To Source_A Table
Description
We need to partition the Products table by source_Type_id(not Source_A table),but we also need to know that the product come from which source_A. I mean partitions should be:
P_Source_A
P_Source_B
P_Source_C
NOT:
P_Source_A_1
P_Source_A_2
P_Source_A_3
P_Source_B
P_Source_C
What do you suggest for resolving the issue?
Re: Problem in design a data model [message #672089 is a reply to message #672088] Tue, 02 October 2018 09:11 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Neither TABLE_NAME nor COLUMN_NAME should ever contain application specific details; SOURCE_A

Normalize data to Third Normal Form.

IMO, partitioning should NOT be part of any initial design consideration.
Any partitioning should be transparent to the application & not be hard coded into the application
Re: Problem in design a data model [message #678514 is a reply to message #672089] Tue, 10 December 2019 06:13 Go to previous message
annalouis
Messages: 1
Registered: December 2019
Junior Member
great to know that
Previous Topic: Activer et desactiver Menu item
Next Topic: Database design asylum attendant commission secretariat - I need your opinion
Goto Forum:
  


Current Time: Fri Nov 08 12:37:59 CST 2024