Skip to main content

Album

Description

Table Definition
CREATE TABLE [Album]
(
[AlbumId] INTEGER NOT NULL,
[Title] NVARCHAR(160) NOT NULL,
[ArtistId] INTEGER NOT NULL,
CONSTRAINT [PK_Album] PRIMARY KEY ([AlbumId]),
FOREIGN KEY ([ArtistId]) REFERENCES [Artist] ([ArtistId])
ON DELETE NO ACTION ON UPDATE NO ACTION
)

Columns

NameTypeDefaultNullableChildrenParentsComment
AlbumIdINTEGERfalseTrack
TitleNVARCHAR(160)false
ArtistIdINTEGERfalseArtist

Constraints

NameTypeDefinition
AlbumIdPRIMARY KEYPRIMARY KEY (AlbumId)
- (Foreign key ID: 0)FOREIGN KEYFOREIGN KEY (ArtistId) REFERENCES Artist (ArtistId) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE

Indexes

NameDefinition
IFK_AlbumArtistIdCREATE INDEX [IFK_AlbumArtistId] ON [Album] ([ArtistId])

Relations

er