InvoiceLine
Description
Table Definition
CREATE TABLE [InvoiceLine]
(
[InvoiceLineId] INTEGER NOT NULL,
[InvoiceId] INTEGER NOT NULL,
[TrackId] INTEGER NOT NULL,
[UnitPrice] NUMERIC(10,2) NOT NULL,
[Quantity] INTEGER NOT NULL,
CONSTRAINT [PK_InvoiceLine] PRIMARY KEY ([InvoiceLineId]),
FOREIGN KEY ([InvoiceId]) REFERENCES [Invoice] ([InvoiceId])
ON DELETE NO ACTION ON UPDATE NO ACTION,
FOREIGN KEY ([TrackId]) REFERENCES [Track] ([TrackId])
ON DELETE NO ACTION ON UPDATE NO ACTION
)
Columns
Name | Type | Default | Nullable | Children | Parents | Comment |
---|---|---|---|---|---|---|
InvoiceLineId | INTEGER | false | ||||
InvoiceId | INTEGER | false | Invoice | |||
TrackId | INTEGER | false | Track | |||
UnitPrice | NUMERIC(10,2) | false | ||||
Quantity | INTEGER | false |
Constraints
Name | Type | Definition |
---|---|---|
InvoiceLineId | PRIMARY KEY | PRIMARY KEY (InvoiceLineId) |
- (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (TrackId) REFERENCES Track (TrackId) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE |
- (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (InvoiceId) REFERENCES Invoice (InvoiceId) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE |
Indexes
Name | Definition |
---|---|
IFK_InvoiceLineTrackId | CREATE INDEX [IFK_InvoiceLineTrackId] ON [InvoiceLine] ([TrackId]) |
IFK_InvoiceLineInvoiceId | CREATE INDEX [IFK_InvoiceLineInvoiceId] ON [InvoiceLine] ([InvoiceId]) |