| Author |
Topic |
|
phuang1226
Starting Member
5 Posts |
Posted - 2007-10-02 : 13:21:30
|
| The distinction between Entity and Relationship is obvious to me. But I am confused by Table. Table describes Entity, Relationship, or both?Thanks for any input. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-10-02 : 13:27:27
|
| Table is an entity, which is also known as an object. Relationships are between tables/views. It is also known as referential integrity.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
phuang1226
Starting Member
5 Posts |
Posted - 2007-10-02 : 13:38:56
|
quote: Originally posted by tkizer Table is an entity, which is also known as an object. Relationships are between tables/views. It is also known as referential integrity.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/
Thank you. But I do see example where Tables are also used to describe the relationship between entity classes. How do you think about this? |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-10-02 : 13:46:15
|
| you must be meaning many to many relationship.this means you have 3 tables2 main and a 3rd which is a connecting table which smply holds keys from other 2 tables._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-10-02 : 13:46:38
|
| Perhaps you should show us what you mean. Is this homework material?Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
phuang1226
Starting Member
5 Posts |
Posted - 2007-10-02 : 13:56:33
|
quote: Originally posted by tkizer Perhaps you should show us what you mean. Is this homework material?Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/
It is not homework. I am out of school. In my current work, I am using Access and also try to program (VBA) inside. I am reading the book by Steven Roman "Access Database Design and Programming". Inside this book, he used a example throughtout the wholebook, which is a database called "Library". I am not far yet. In his E/R diagram, the Entity classes are BOOKS, AUTHORS, PUBLISHERS, each is implemented by a table. So this gives me the impression that Table is used to impletemnt an Entity class. But since there is no link between BOOKS and AUTHORS, he used another table to establish the link. So this means Table can be used to describe a Writtenby relationship. That is where my confusion comes from. |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-10-02 : 13:58:47
|
| yes it's probably a many to many, since a book can have multiple authors and an author can write multiple books._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-10-02 : 14:01:33
|
| The link is still an entity. In between the 3 tables are relationships.But yes that linking table can describe a relationship, however it's not technically a relationship. Relationships are foreign keys.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
phuang1226
Starting Member
5 Posts |
Posted - 2007-10-02 : 14:17:27
|
quote: Originally posted by spirit1 yes it's probably a many to many, since a book can have multiple authors and an author can write multiple books.Yes, the Table called Book/Author describes a many-to-many relationship. back to my confusion. I am still assuming that Entity class and Relationship are totally distinct. In other words, an entity class is not a relationship, and a relationship is not a entity class. But in implementation, Table is used to describe both of them. Do you agree?Thanks for sharing your opinion._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com
|
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-10-02 : 14:26:14
|
| huh? i'm not quite sure how to understand this...yes relationship and table are different things. but since you can't provide many to many relationship with just one relationship you have to use a 3rd table which links the 2 outer tables_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
|
|