What are database relationships?

Answer

The question is too vague for a sound answer so I will try to shotgun it. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

The most basic relationship is a parent-child relationship. The parent table might be "Department," the child table, “Employee.” The child can not exist without a parent. Bob and Jill may be children in the Shoe department. Mary is the child in the Canoe department. The Glue department has no children; Harry was the only employee but they had to let him go over a sticky situation.

As you can see, a parent might have many children, one child, or no children.

Quantity relationships are the next type of relationship the question may be asking about. Quantity relationships do not have to be between parent and child tables.

As you can see, Departments can have many children. That is known as a one-to-many relationship. One department, many employees.

A many-to-one relationship might be a customer with multiple addresses, say mailing, billing, and shipping.

Employee and Employee Number tables might represent one-to-one relationships. Rather than use Mary Boudreaux every place you need to identify her, you assign her an employee number. Mary is in the Canoe department. Her number is C75. C for Canoe, 75 for the 75th employee of the company.

Finally, there is the many-to-many relationship. All the employees work for commission. There is a sales table with many entries. Each entry is related to one of the many employees in the employee table.

There are symbols for each X-to-Y relationship.

The question might also refer to “Key” relationships. Primary Keys (PK) and Foreign Keys (FK) are used mostly between tables. A full explanation of the PK/FK relationship usually results in glazed eyes and confusion without visuals.

Improve Answer Discuss the question "What are database relationships?" Watch Question

First answer by ID1262591011. Last edit by ID1262591011. Question popularity: 29 [recommend question]

Research your answer:

Answers.com > Wiki Answers > Categories > Technology > Computers > Computer Databases > What are database relationships?

Our contributors said this page should be displayed for the questions below. (Where do these come from)
If any of these are not a genuine rephrasing of the question, please help out and edit these alternates.
Types of relationships?  Relationships in database?  Relationships in a database?  Types of relationship of database?  Three different types of database?  Types of relationships in database?  What are the types of Access relationships?  What the types of relationship and Database?  What are the types of Database relationships?  Different kinds of relationships in Database?  Relationship different types of relationships?  How do you do many to many relationships database?  What is the purpose for relationships in database?  What are the different types of relationships in database?  What are various types of relationships that exists bw entities?  What is Relationship Explain the types of relationships with example of each?  What is Relationship Explain the types of relationships with example of each in dbms?