Go Back   Velocity Reviews > Newsgroups > MCSD
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

MCSD - help on table strucure doubt ???

 
Thread Tools Search this Thread
Old 05-17-2007, 01:55 PM   #1
Default help on table strucure doubt ???


Dear all,

I am preapring my last exam to MCSD.NEt (let you guess which none is the
last) and I use transcender test for that and I am actually face to a
situation where I do not catch the reason of a particular table
configuration. If you can help I will apreciate.

The scenario is as follow :
It is mention to identify the correct relation fro modeling the fact that
EACH book maybe writen by more that one author.

Possible choice was :
a - Create a Book parent entity and an Author child entity
b - Create a Book child entity and an Author parent entity
c - Create a Book and Author parent entities and an BookAuthor child entity
d - Create a Book and Author child entities and an BookAuthor parent entity

The correect answer is C and I am not understanding why.
For me I was selected A

Do you have any comment to help me catch why C and not A ?

thanks for your reply
regards
serge


=?Utf-8?B?Y2FsZGVyYXJh?=
  Reply With Quote
Old 05-17-2007, 02:08 PM   #2
Blackmetal
 
Posts: n/a
Default Re: help on table strucure doubt ???
my 2 cents:

Think on this:
Author Table:
ID,Author
1, John C
2, Ann D

Book table:
ID,Title
A,My Book
B,Their Book

Then, the BookAuthor:
Book,Author
A,1
B,1
B,2

It means that Author cannot be a child table from Book or viceversa because
the relationship as expressed in the scenario, it is many-to-many and a
separate table will accomplish this task.

In my example, the Book A, belongs to John C, and The Book B, belongs to
John C and Ann D.

Hope this helps
"calderara" <> wrote in message
news293F242-E9A2-4DAF-BF07-...
> Dear all,
>
> I am preapring my last exam to MCSD.NEt (let you guess which none is the
> last) and I use transcender test for that and I am actually face to a
> situation where I do not catch the reason of a particular table
> configuration. If you can help I will apreciate.
>
> The scenario is as follow :
> It is mention to identify the correct relation fro modeling the fact that
> EACH book maybe writen by more that one author.
>
> Possible choice was :
> a - Create a Book parent entity and an Author child entity
> b - Create a Book child entity and an Author parent entity
> c - Create a Book and Author parent entities and an BookAuthor child
> entity
> d - Create a Book and Author child entities and an BookAuthor parent
> entity
>
> The correect answer is C and I am not understanding why.
> For me I was selected A
>
> Do you have any comment to help me catch why C and not A ?
>
> thanks for your reply
> regards
> serge





Blackmetal
  Reply With Quote
Old 05-17-2007, 03:14 PM   #3
Egghead
 
Posts: n/a
Default Re: help on table strucure doubt ???
It is third normalization, and it allows you to have many-to-many
relationship without duplicates.
If A is ans, how can you build the model?

--
cheers,
RL
"calderara" <> wrote in message
news293F242-E9A2-4DAF-BF07-...
> Dear all,
>
> I am preapring my last exam to MCSD.NEt (let you guess which none is the
> last) and I use transcender test for that and I am actually face to a
> situation where I do not catch the reason of a particular table
> configuration. If you can help I will apreciate.
>
> The scenario is as follow :
> It is mention to identify the correct relation fro modeling the fact that
> EACH book maybe writen by more that one author.
>
> Possible choice was :
> a - Create a Book parent entity and an Author child entity
> b - Create a Book child entity and an Author parent entity
> c - Create a Book and Author parent entities and an BookAuthor child
> entity
> d - Create a Book and Author child entities and an BookAuthor parent
> entity
>
> The correect answer is C and I am not understanding why.
> For me I was selected A
>
> Do you have any comment to help me catch why C and not A ?
>
> thanks for your reply
> regards
> serge





Egghead
  Reply With Quote
Old 05-17-2007, 08:10 PM   #4
=?Utf-8?B?Y2FsZGVyYXJh?=
 
Posts: n/a
Default Re: help on table strucure doubt ???
Thnaks for you reply...

But could it be also teh same thing with your 2 first tables by simply
adding BookID to aujto table and set primnary key to ID, bookID in AUthor
table ?

serge

"Blackmetal" wrote:

> my 2 cents:
>
> Think on this:
> Author Table:
> ID,Author
> 1, John C
> 2, Ann D
>
> Book table:
> ID,Title
> A,My Book
> B,Their Book
>
> Then, the BookAuthor:
> Book,Author
> A,1
> B,1
> B,2
>
> It means that Author cannot be a child table from Book or viceversa because
> the relationship as expressed in the scenario, it is many-to-many and a
> separate table will accomplish this task.
>
> In my example, the Book A, belongs to John C, and The Book B, belongs to
> John C and Ann D.
>
> Hope this helps
> "calderara" <> wrote in message
> news293F242-E9A2-4DAF-BF07-...
> > Dear all,
> >
> > I am preapring my last exam to MCSD.NEt (let you guess which none is the
> > last) and I use transcender test for that and I am actually face to a
> > situation where I do not catch the reason of a particular table
> > configuration. If you can help I will apreciate.
> >
> > The scenario is as follow :
> > It is mention to identify the correct relation fro modeling the fact that
> > EACH book maybe writen by more that one author.
> >
> > Possible choice was :
> > a - Create a Book parent entity and an Author child entity
> > b - Create a Book child entity and an Author parent entity
> > c - Create a Book and Author parent entities and an BookAuthor child
> > entity
> > d - Create a Book and Author child entities and an BookAuthor parent
> > entity
> >
> > The correect answer is C and I am not understanding why.
> > For me I was selected A
> >
> > Do you have any comment to help me catch why C and not A ?
> >
> > thanks for your reply
> > regards
> > serge

>
>
>



=?Utf-8?B?Y2FsZGVyYXJh?=
  Reply With Quote
Old 05-17-2007, 08:12 PM   #5
=?Utf-8?B?Y2FsZGVyYXJh?=
 
Posts: n/a
Default Re: help on table strucure doubt ???
can I build the model with A as follow :

BOOK
Id,Title, AuthorID ( primary key on ID, AUthorID)

AUTHOR
Id,Name,BookId (primary key on Id,BookId)

serge

"Egghead" wrote:

> It is third normalization, and it allows you to have many-to-many
> relationship without duplicates.
> If A is ans, how can you build the model?
>
> --
> cheers,
> RL
> "calderara" <> wrote in message
> news293F242-E9A2-4DAF-BF07-...
> > Dear all,
> >
> > I am preapring my last exam to MCSD.NEt (let you guess which none is the
> > last) and I use transcender test for that and I am actually face to a
> > situation where I do not catch the reason of a particular table
> > configuration. If you can help I will apreciate.
> >
> > The scenario is as follow :
> > It is mention to identify the correct relation fro modeling the fact that
> > EACH book maybe writen by more that one author.
> >
> > Possible choice was :
> > a - Create a Book parent entity and an Author child entity
> > b - Create a Book child entity and an Author parent entity
> > c - Create a Book and Author parent entities and an BookAuthor child
> > entity
> > d - Create a Book and Author child entities and an BookAuthor parent
> > entity
> >
> > The correect answer is C and I am not understanding why.
> > For me I was selected A
> >
> > Do you have any comment to help me catch why C and not A ?
> >
> > thanks for your reply
> > regards
> > serge

>
>
>



=?Utf-8?B?Y2FsZGVyYXJh?=
  Reply With Quote
Old 05-17-2007, 08:55 PM   #6
Blackmetal
 
Posts: n/a
Default Re: help on table strucure doubt ???
Well, even though it works, the model does not comply fullest with
normalization.

Through my experience (and even here in the company I work) I have found
some of this models done by some other programmers which I ended up by
spliting the tables using a CrossReference AKA the many-to-many as the
propossed model.

"calderara" <> wrote in message
news:E9F11B9C-78C1-48E6-8541-...
> can I build the model with A as follow :
>
> BOOK
> Id,Title, AuthorID ( primary key on ID, AUthorID)
>
> AUTHOR
> Id,Name,BookId (primary key on Id,BookId)
>
> serge
>
> "Egghead" wrote:
>
>> It is third normalization, and it allows you to have many-to-many
>> relationship without duplicates.
>> If A is ans, how can you build the model?
>>
>> --
>> cheers,
>> RL
>> "calderara" <> wrote in message
>> news293F242-E9A2-4DAF-BF07-...
>> > Dear all,
>> >
>> > I am preapring my last exam to MCSD.NEt (let you guess which none is
>> > the
>> > last) and I use transcender test for that and I am actually face to a
>> > situation where I do not catch the reason of a particular table
>> > configuration. If you can help I will apreciate.
>> >
>> > The scenario is as follow :
>> > It is mention to identify the correct relation fro modeling the fact
>> > that
>> > EACH book maybe writen by more that one author.
>> >
>> > Possible choice was :
>> > a - Create a Book parent entity and an Author child entity
>> > b - Create a Book child entity and an Author parent entity
>> > c - Create a Book and Author parent entities and an BookAuthor child
>> > entity
>> > d - Create a Book and Author child entities and an BookAuthor parent
>> > entity
>> >
>> > The correect answer is C and I am not understanding why.
>> > For me I was selected A
>> >
>> > Do you have any comment to help me catch why C and not A ?
>> >
>> > thanks for your reply
>> > regards
>> > serge

>>
>>
>>





Blackmetal
  Reply With Quote
Old 05-17-2007, 09:00 PM   #7
Blackmetal
 
Posts: n/a
Default Re: help on table strucure doubt ???
I forgot to add:

I've felt really ****ed off by this type of programming, because sometimes,
I had to make a fix to someone else's work...and simply the way the queries
are built are so messy and so complex without reason that I ended up by
re-writting the queries or modify the schema of the involved tables.

"Blackmetal" <> wrote in message
news:...
> Well, even though it works, the model does not comply fullest with
> normalization.
>
> Through my experience (and even here in the company I work) I have found
> some of this models done by some other programmers which I ended up by
> spliting the tables using a CrossReference AKA the many-to-many as the
> propossed model.
>
> "calderara" <> wrote in message
> news:E9F11B9C-78C1-48E6-8541-...
>> can I build the model with A as follow :
>>
>> BOOK
>> Id,Title, AuthorID ( primary key on ID, AUthorID)
>>
>> AUTHOR
>> Id,Name,BookId (primary key on Id,BookId)
>>
>> serge
>>
>> "Egghead" wrote:
>>
>>> It is third normalization, and it allows you to have many-to-many
>>> relationship without duplicates.
>>> If A is ans, how can you build the model?
>>>
>>> --
>>> cheers,
>>> RL
>>> "calderara" <> wrote in message
>>> news293F242-E9A2-4DAF-BF07-...
>>> > Dear all,
>>> >
>>> > I am preapring my last exam to MCSD.NEt (let you guess which none is
>>> > the
>>> > last) and I use transcender test for that and I am actually face to a
>>> > situation where I do not catch the reason of a particular table
>>> > configuration. If you can help I will apreciate.
>>> >
>>> > The scenario is as follow :
>>> > It is mention to identify the correct relation fro modeling the fact
>>> > that
>>> > EACH book maybe writen by more that one author.
>>> >
>>> > Possible choice was :
>>> > a - Create a Book parent entity and an Author child entity
>>> > b - Create a Book child entity and an Author parent entity
>>> > c - Create a Book and Author parent entities and an BookAuthor child
>>> > entity
>>> > d - Create a Book and Author child entities and an BookAuthor parent
>>> > entity
>>> >
>>> > The correect answer is C and I am not understanding why.
>>> > For me I was selected A
>>> >
>>> > Do you have any comment to help me catch why C and not A ?
>>> >
>>> > thanks for your reply
>>> > regards
>>> > serge
>>>
>>>
>>>

>
>





Blackmetal
  Reply With Quote
Old 05-17-2007, 09:06 PM   #8
Blackmetal
 
Posts: n/a
Default Re: help on table strucure doubt ???
Holy Crap...I'm keep on forgetting things...

And precisely, in a MS exam this is a very valid point too, because even
your model worked, according the Exam, it would be a bad score because
that's not the best solution, and many of us might have failed in questions
in our exams too, but that's the good thing about learning.

"Blackmetal" <> wrote in message
news:...
>I forgot to add:
>
> I've felt really ****ed off by this type of programming, because
> sometimes, I had to make a fix to someone else's work...and simply the way
> the queries are built are so messy and so complex without reason that I
> ended up by re-writting the queries or modify the schema of the involved
> tables.
>
> "Blackmetal" <> wrote in message
> news:...
>> Well, even though it works, the model does not comply fullest with
>> normalization.
>>
>> Through my experience (and even here in the company I work) I have found
>> some of this models done by some other programmers which I ended up by
>> spliting the tables using a CrossReference AKA the many-to-many as the
>> propossed model.
>>
>> "calderara" <> wrote in message
>> news:E9F11B9C-78C1-48E6-8541-...
>>> can I build the model with A as follow :
>>>
>>> BOOK
>>> Id,Title, AuthorID ( primary key on ID, AUthorID)
>>>
>>> AUTHOR
>>> Id,Name,BookId (primary key on Id,BookId)
>>>
>>> serge
>>>
>>> "Egghead" wrote:
>>>
>>>> It is third normalization, and it allows you to have many-to-many
>>>> relationship without duplicates.
>>>> If A is ans, how can you build the model?
>>>>
>>>> --
>>>> cheers,
>>>> RL
>>>> "calderara" <> wrote in message
>>>> news293F242-E9A2-4DAF-BF07-...
>>>> > Dear all,
>>>> >
>>>> > I am preapring my last exam to MCSD.NEt (let you guess which none is
>>>> > the
>>>> > last) and I use transcender test for that and I am actually face to a
>>>> > situation where I do not catch the reason of a particular table
>>>> > configuration. If you can help I will apreciate.
>>>> >
>>>> > The scenario is as follow :
>>>> > It is mention to identify the correct relation fro modeling the fact
>>>> > that
>>>> > EACH book maybe writen by more that one author.
>>>> >
>>>> > Possible choice was :
>>>> > a - Create a Book parent entity and an Author child entity
>>>> > b - Create a Book child entity and an Author parent entity
>>>> > c - Create a Book and Author parent entities and an BookAuthor child
>>>> > entity
>>>> > d - Create a Book and Author child entities and an BookAuthor parent
>>>> > entity
>>>> >
>>>> > The correect answer is C and I am not understanding why.
>>>> > For me I was selected A
>>>> >
>>>> > Do you have any comment to help me catch why C and not A ?
>>>> >
>>>> > thanks for your reply
>>>> > regards
>>>> > serge
>>>>
>>>>
>>>>

>>
>>

>
>





Blackmetal
  Reply With Quote
Old 05-17-2007, 10:43 PM   #9
Chris Mullins [MVP]
 
Posts: n/a
Default Re: help on table strucure doubt ???
Your model doesn't allow many-to-many modeling with any real sense of
correctness. It's horribly denormalized.

Let's suppose I had book "How to pass 70-300", and it was writen by
"Author1", "Author2", "Author3".
Let's also say, "Author1" wrote "How to fail 70-300"

What values would be in the two tables?

The closes I can come is:
ID 1 = "How to pass 70-300"
ID 2 = "How to fail 70-300"

ID 3 = "Author1"
ID 4 = "Author2"
ID 5 = "Author3"

Which would give
[Book]
1, How to pass 70-300, 3
1, How to pass 70-300, 4
1, How to pass 70-300, 5
2, How to fail 70-300, 3

[Author]
3, Author1, 1
3, Author1, 2
4, Author2, 1
5 Author3, 1

Clearly, this schema isn't the best answer available.

--
Chris Mullins, MCSD.NET, MCPD:Enterprise, Microsoft C# MVP
http://www.coversant.com/blogs/cmullins

"calderara" <> wrote in message
news:E9F11B9C-78C1-48E6-8541-...
> can I build the model with A as follow :
>
> BOOK
> Id,Title, AuthorID ( primary key on ID, AUthorID)
>
> AUTHOR
> Id,Name,BookId (primary key on Id,BookId)
>
> serge
>
> "Egghead" wrote:
>
>> It is third normalization, and it allows you to have many-to-many
>> relationship without duplicates.
>> If A is ans, how can you build the model?
>>
>> --
>> cheers,
>> RL
>> "calderara" <> wrote in message
>> news293F242-E9A2-4DAF-BF07-...
>> > Dear all,
>> >
>> > I am preapring my last exam to MCSD.NEt (let you guess which none is
>> > the
>> > last) and I use transcender test for that and I am actually face to a
>> > situation where I do not catch the reason of a particular table
>> > configuration. If you can help I will apreciate.
>> >
>> > The scenario is as follow :
>> > It is mention to identify the correct relation fro modeling the fact
>> > that
>> > EACH book maybe writen by more that one author.
>> >
>> > Possible choice was :
>> > a - Create a Book parent entity and an Author child entity
>> > b - Create a Book child entity and an Author parent entity
>> > c - Create a Book and Author parent entities and an BookAuthor child
>> > entity
>> > d - Create a Book and Author child entities and an BookAuthor parent
>> > entity
>> >
>> > The correect answer is C and I am not understanding why.
>> > For me I was selected A
>> >
>> > Do you have any comment to help me catch why C and not A ?
>> >
>> > thanks for your reply
>> > regards
>> > serge

>>
>>
>>





Chris Mullins [MVP]
  Reply With Quote
Old 05-18-2007, 10:46 AM   #10
=?Utf-8?B?Y2FsZGVyYXJh?=
 
Posts: n/a
Default Re: help on table strucure doubt ???
yes thats for sure I undersatnd your pain in such situation. I guess similar
situation with programmers who did not follow guide line that I was
describing and then correct they< work and loosing time...

But for my case actually I am not an SQL guy, it just come time to time
during dayly work but I am not a specialist on the way to organise tables and
so on. And thatt is the reason I was stuck in this situation when learning my
final exam...And when I do not cacth the idea of doing it in this way and not
the other, I will stick on it for days...

Now your answer it clear now for me, the way I was saying works, but it is
not the normal way of snormalization...

Thnaks for your reply
regards
serge

"Blackmetal" wrote:

> I forgot to add:
>
> I've felt really ****ed off by this type of programming, because sometimes,
> I had to make a fix to someone else's work...and simply the way the queries
> are built are so messy and so complex without reason that I ended up by
> re-writting the queries or modify the schema of the involved tables.
>
> "Blackmetal" <> wrote in message
> news:...
> > Well, even though it works, the model does not comply fullest with
> > normalization.
> >
> > Through my experience (and even here in the company I work) I have found
> > some of this models done by some other programmers which I ended up by
> > spliting the tables using a CrossReference AKA the many-to-many as the
> > propossed model.
> >
> > "calderara" <> wrote in message
> > news:E9F11B9C-78C1-48E6-8541-...
> >> can I build the model with A as follow :
> >>
> >> BOOK
> >> Id,Title, AuthorID ( primary key on ID, AUthorID)
> >>
> >> AUTHOR
> >> Id,Name,BookId (primary key on Id,BookId)
> >>
> >> serge
> >>
> >> "Egghead" wrote:
> >>
> >>> It is third normalization, and it allows you to have many-to-many
> >>> relationship without duplicates.
> >>> If A is ans, how can you build the model?
> >>>
> >>> --
> >>> cheers,
> >>> RL
> >>> "calderara" <> wrote in message
> >>> news293F242-E9A2-4DAF-BF07-...
> >>> > Dear all,
> >>> >
> >>> > I am preapring my last exam to MCSD.NEt (let you guess which none is
> >>> > the
> >>> > last) and I use transcender test for that and I am actually face to a
> >>> > situation where I do not catch the reason of a particular table
> >>> > configuration. If you can help I will apreciate.
> >>> >
> >>> > The scenario is as follow :
> >>> > It is mention to identify the correct relation fro modeling the fact
> >>> > that
> >>> > EACH book maybe writen by more that one author.
> >>> >
> >>> > Possible choice was :
> >>> > a - Create a Book parent entity and an Author child entity
> >>> > b - Create a Book child entity and an Author parent entity
> >>> > c - Create a Book and Author parent entities and an BookAuthor child
> >>> > entity
> >>> > d - Create a Book and Author child entities and an BookAuthor parent
> >>> > entity
> >>> >
> >>> > The correect answer is C and I am not understanding why.
> >>> > For me I was selected A
> >>> >
> >>> > Do you have any comment to help me catch why C and not A ?
> >>> >
> >>> > thanks for your reply
> >>> > regards
> >>> > serge
> >>>
> >>>
> >>>

> >
> >

>
>
>



=?Utf-8?B?Y2FsZGVyYXJh?=
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
changing Crystal report table at run time rakesh201180 Software 1 10-22-2008 10:58 AM
MCITP and stored procedure permissions Darrilgibson@gmail.com MCITP 5 06-07-2008 12:37 PM
High-Def Playback: The Firmware Gotcha Ablang DVD Video 46 07-28-2007 07:25 AM
Uploading Excel file into sql table shalim Software 1 10-31-2006 08:57 AM
How to store dataset to a table in the database. Please be specific. Urgent fullblown General Help Related Topics 0 09-20-2006 03:55 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46