0% found this document useful (0 votes)
35 views2 pages

Lab No: 6: Object:-" To Become Familiar With Relationships" Database Relationships - One-To-Many Relationships

This document discusses different types of database relationships - one-to-many, many-to-many, and one-to-one. A one-to-many relationship exists when a row in one table can be linked to multiple rows in another table but not vice versa. A many-to-many relationship allows rows in both tables to link to multiple rows in the other table. A one-to-one relationship only permits one link between matching rows in both tables. The lab exercise asks the reader to create relationships in a database between customers, orders, order lines, products, and suppliers based on the specified relationships between entities.

Uploaded by

Qurrat Ul Ain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views2 pages

Lab No: 6: Object:-" To Become Familiar With Relationships" Database Relationships - One-To-Many Relationships

This document discusses different types of database relationships - one-to-many, many-to-many, and one-to-one. A one-to-many relationship exists when a row in one table can be linked to multiple rows in another table but not vice versa. A many-to-many relationship allows rows in both tables to link to multiple rows in the other table. A one-to-one relationship only permits one link between matching rows in both tables. The lab exercise asks the reader to create relationships in a database between customers, orders, order lines, products, and suppliers based on the specified relationships between entities.

Uploaded by

Qurrat Ul Ain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

LAB NO: 6

OBJECT:- TO BECOME FAMILIAR WITH


RELATIONSHIPS
Database relationships;Several types of relationships can be defined in a database. Consider the possible relationships between
employees and departments.

One-To-Many Relationships
A one-to-many relationship is the most common type of relationship. In this type of relationship, a row
in table A can have many matching rows in table B, but a row in table B can have only one matching row
in table A. For example, the Publishers and Titles tables have a one-to-many relationship: each publisher
produces many titles, but each title comes from only one publisher.
A one-to-many relationship is created if only one of the related columns is a primary key or has a unique
constraint.

Many-To-Many Relationships
In a many-to-many relationship, a row in table A can have many matching rows in table B, and vice
versa.

One-To-One Relationships
In a one-to-one relationship, a row in table A can have no more than one matching row in table B, and
vice versa. A one-to-one relationship is created if both of the related columns are primary keys or have
unique constraints.

LAB EXERCISE CUSTOMERS,PRODUCTS&


SCENARIO:The entities required should include:
CUSTOMERS
ORDERS
ORDERLINES

PRODUCTS
SUPPLIERS

The entities are related as follows:

Customer can place one or many Orders.


An order can contain One or Many products.
A product can be associated with one or many orders.
A supplier can supply one or many products.
Now open the database tools and click on relationships.

Create relationships

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy