How do you implement one-to-one, one-to-many and many-to-
many relationships while designing tables?



How do you implement one-to-one, one-to-many and many-to- many relationships while designing tables..

Answer / ramesh

One to one
Parent Entity does have one Corresponding record in Child
Entity

ex : Employee and his CV

One to many

Parent Entity does have many Corresponding records in Child
Entity

ex : Employee and his Projects

many to many

Parent Entity records do have many Corresponding records in
Child Entity vice versa

ex : Employees and Employers
Employees Receive Calls from Many Employers
Employers Receive CVs from Many Employees

Is This Answer Correct ?    12 Yes 6 No

Post New Answer

More DB Development Interview Questions

Write the difference between case version and decode version.

2 Answers  


How to replace not in with not exist?

0 Answers  


What is the difference between a primary index and a secondary index? What is a duplicate data entry in an index? Can a primary index contain duplicates?

5 Answers   IBM,


1. Using the XML Document below, with the URI “recipe.xml” define the following queries in XQuery: a.) Give the names of all breakfast in the menu. b.) Select breakfasts that have price lower than $7.00? <?xml version="1.0"?> <breakfast_menu> <food> <name>Belgian Waffles</name> <price>$5.95</price> <description> two of our famous Belgian Waffles with plenty of real maple syrup </description> <calories>650</calories> </food> <food> <name>Strawberry Belgian Waffles</name> <price>$7.95</price> <description> light Belgian waffles covered with strawberries and whipped cream </description> <calories>900</calories> </food> <food> <name>Berry-Berry Belgian Waffles</name> <price>$8.95</price> <description> light Belgian waffles covered with an assortment of fresh berries and whipped cream </description> <calories>900</calories> </food> <food> <name>French Toast</name> <price>$4.50</price> <description> thick slices made from our homemade sourdough bread </description> <calories>600</calories> </food> <food> <name>Homestyle Breakfast</name> <price>$6.95</price> <description> two eggs, bacon or sausage, toast, and our ever-popular hash browns </description> <calories>950</calories> </food> </breakfast_menu>

0 Answers  


Explain about the hierarchical model of the database?

0 Answers  






What is data modeling with example?

0 Answers  


How to create an external table.

1 Answers  


When installing the datastage7.5x2 edtion iam getting aproblem i.e the cpu count is 2 but the cpu count in installation is one . how can i install in my p.c (system is dual core).

0 Answers  


Explain about post-relational databases?

0 Answers  


Explain about the storage and physical database design?

0 Answers  


Hi , any one can help me on the same,this is regarding the Informatica Function doc,i want to know how developer is will develop the mapping. pl forwar the any function doc .just for my references. svlc75@yahoo.co.in

0 Answers   Covansys,


what is Normalization?

6 Answers   TCS,


Categories