"I have two tables, one is product which is a parent table with one primary key and i do have another child table of product, which is a product_details table. But the child table is linking with parent table(product) with logical data instead of foreign key,as we are doing this relationship with the help of java code in the coding side, instead of depending on the data base, which make it as tight couple. To avoid tight coupling between the tables we are storing the primary key value in the child table.
CREATE TABLE `tbl_product` (
`product_id` varchar(200) NOT NULL,
`product_details_id` varchar(200) DEFAULT NULL,
`currency` varchar(20) DEFAULT NULL,
`lead_time` varchar(20) DEFAULT NULL,
`brand_id` varchar(20) DEFAULT NULL,
`manufacturer_id` varchar(150) DEFAULT NULL,
`category_id` varchar(200) DEFAULT NULL,
`units` varchar(20) DEFAULT NULL,
`transit_time` varchar(20) DEFAULT NULL,
`delivery_terms` varchar(20) DEFAULT NULL,
`payment_terms` varchar(20) DEFAULT NULL,
PRIMARY KEY (`product_id`));
CREATE TABLE `tbl_product_details` (
`product_details_id` varchar(200) NOT NULL,
`product_id` varchar(200) DEFAULT NULL,
`product_name` varchar(50) DEFAULT NULL,
`landingPageImage` varchar(100) DEFAULT NULL,
`product_description_brief` text CHARACTER SET latin1,
`product_description_short` text CHARACTER SET latin1,
`product_price_range` varchar(50) DEFAULT NULL,
`product_discount_price` varchar(20) DEFAULT NULL,
`production_Type` varchar(20) DEFAULT NULL,
PRIMARY KEY (`product_details_id`),
UNIQUE KEY `product_id` (`product_id`));
Please suggest the Pros and Cons of the design, we are following this kind of relationship in my company, as the manager is saying it will give us flexible to us. I know that if we lose the data from the table, we can't know the relationship between the two tables."--StackExchange.com
2. Quote of the Week
"FOREIGN KEYs are not a requirement -- they are a convenience. Without them you need a INDEX and you need to either replace the "consistency checking" they provide, or ignore the problem." --StackExchange.com
3. To Laugh or Cry?
4. Of Interest
- Comments on 2008 Date and McGoveran Exchange on view updating 'problem'
- Relational Programming in miniKanren
- Scaling Medium-Size Databases
- Added to the LINKS page "Excerpts from William Kent's DATA AND REALITY" (see RECOMMENDED BOOKS);
- THE DBDEBUNK GUIDE TO MISCONCEPTIONS OF DATA FUNDAMENTALS available to order here.
Review by Craig Mullins: A Useful Guide to Data Fundamentals from Fabian Pascal
Review by Todd Everett.
And now for something completely different
New at The PostWest: America, Inside and Out and The New World Order
My Take of the Week
"Albert Speer convinced himself of what remains one of the shibboleths of the technical professions to this day: that science and technology, no matter what their implications or the ends toward which they are employed, are completely apolitical and amoral in character.Tech worker resistance is crucial to preventing large-scale human rights abuses in the U.S., but America suffers from The Dropout Fallacy promoted by those who own the society and understand that education is the obstacle to their tyrannic control and exploitation of the public (Peter Thiel Believes the Future Belongs to College Dropouts ).
This is a fiction we must devote ourselves to breaking — in our culture at large, but starting with the education of the practitioners of the technological and scientific enterprise. Insofar as they are concerned with discovering truths about nature, scientists can argue that knowledge of the truth, regardless of its implications, is better than ignorance. But engineers, as they convert these scientific truths into technical capacities, must concern themselves with the moral consequences of where their engineering creativity may lead. Increasingly today, we focus our engineering education almost exclusively on the analytical core of science and mathematics." --The Architecture of Evil
The "Most Pro-Israel Administration"
- 'Rather ironclad' intel shows Obama behind UN vote
- The only thing he didn't say was 'apartheid'
- US worked with Palestinians on UN resolution
- Obama 'ambushed' Israel at UN, 'deeply hostile' to Israel like Carter
- US pressured Ukraine to support anti-settlement resolution
Anti-semitism? Nah, Just Criticism of Israel Policies
- Swastika, ‘die Jew’ left on rock at door of Canadian couple
- Two menorahs vandalized in Brooklyn
- Menorahs vandalized in California, Arizona
- Neo-Nazis urge armed march to harass Montana Jews
- French Anne Frank school hit with anti-Semitic graffiti
- Norwegian TV spoofing Holocaust
- ‘Jews like money’ song is a compliment
- Hitler's 'Mein Kampf' is German bestseller, again
- Gay UK couple assaulted in anti-Semitic, homophobic attack
- Ukrainian marchers in Kiev chant ‘Jews out’
- Jewish Museum poster defaced with swastikas in New York subway
Article of the Week
Audio of the Week
Pinch-me of the Week
- Ban admits UN biased on Israel ... condemns West Bank outpost bill
- Hezbollah chief says Arab armies, regimes being destroyed ... for Israel
- Paris museum calls Auschwitz a ‘Bauhaus architectural achievement’
Site of the Week
Book of the week (Purchase via this link to support the site)
Laqueur W. and Schueftan D., (Eds), THE ISRAEL-ARAB READER: A DOCUMENTARY HISTORY OF THE MIDDLE EAST CONFLICT, 8th Ed. Revised and Updated
Note: I will not publish or respond to anonymous comments. If you want to say something, stand behind it. Otherwise don't bother, it'll be ignored.
Do you like this post? Please link back to this article by copying one of the codes below.URL: HTML link code: BB (forum) link code: