n: m β, if you donβt know both n and m, itβs just a lot for many, and it is represented by a bridge table between two other tables, such as
-- This table will hold our phone calls. CREATE TABLE dbo.PhoneCalls ( ID INT IDENTITY(1, 1) NOT NULL, CallTime DATETIME NOT NULL DEFAULT GETDATE(), CallerPhoneNumber CHAR(10) NOT NULL ) -- This table will hold our "tickets" (or cases). CREATE TABLE dbo.Tickets ( ID INT IDENTITY(1, 1) NOT NULL, CreatedTime DATETIME NOT NULL DEFAULT GETDATE(), Subject VARCHAR(250) NOT NULL, Notes VARCHAR(8000) NOT NULL, Completed BIT NOT NULL DEFAULT 0 )
this is a bridge table for mapping between two tables
CREATE TABLE dbo.PhoneCalls_Tickets ( PhoneCallID INT NOT NULL, TicketID INT NOT NULL )
One to large (1: n) is just one table that has a column as a primary key and another table that has this column as a foreign key relation
The type of product and product in which one product may have many products.
Ash Aug 03 '10 at 14:30 2010-08-03 14:30
source share