USE [MediaLibrary]
GO
/****** Object:  Table [dbo].[AudioEntry]    Script Date: 14/12/2018 00:20:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[AudioEntry](
	[AudioID] [int] IDENTITY(1,1) NOT NULL,
	[EntryID] [int] NOT NULL,
	[FileTypeID] [int] NOT NULL,
	[ReleaseTypeID] [int] NOT NULL,
	[AudioLength] [int] NOT NULL,
	[BitRate] [int] NOT NULL,
	[AudioFileName] [varchar](255) NOT NULL,
PRIMARY KEY CLUSTERED 
(
	[AudioID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AudioEntry]  WITH CHECK ADD FOREIGN KEY([EntryID])
REFERENCES [dbo].[MediaEntry] ([EntryID])
GO
ALTER TABLE [dbo].[AudioEntry]  WITH CHECK ADD FOREIGN KEY([FileTypeID])
REFERENCES [dbo].[AudioFileTypes] ([FileTypeID])
GO
ALTER TABLE [dbo].[AudioEntry]  WITH CHECK ADD FOREIGN KEY([ReleaseTypeID])
REFERENCES [dbo].[ReleaseType] ([ReleaseTypeID])
GO
