USE MusicStore
GO
-- Add a subscriber and a subscriber device
INSERT INTO [NSInstance].[NSSubscriberView](SubscriberId, Enabled)
VALUES (N'Bob', 1)

INSERT INTO [NSInstance].[NSSubscriberDeviceView](SubscriberId, Enabled, DeviceName, DeviceTypeName, DeviceAddress, DeliveryChannelName)
VALUES (N'Bob', 1, N'DefaultDevice', N'File', N'', N'FileChannel')

-- Submit an event
INSERT INTO [SongAlerts].[SongAdded] (SongId) VALUES (6)


-- Misc. Queries
SELECT * FROM [MusicStore].[dbo].[SongDetails]
SELECT * FROM [MusicStore].[NSInstance].[NSSubscriberView]
SELECT * FROM [MusicStore].[NSInstance].[NSSubscriberDeviceView]
SELECT * FROM [MusicStore].[NSInstance].[NSDeliveryChannelArguments]
SELECT * FROM [MusicStore].[SongAlerts].[NSInterestingSongsView]
SELECT * FROM [MusicStore].[SongAlerts].[NSConditions]
SELECT * FROM [MusicStore].[SongAlerts].[NSConditionSignatures]
SELECT * FROM [MusicStore].[SongAlerts].[NSConditionParameters]
SELECT * FROM [MusicStore].[SongAlerts].[NSSongAddedEvents]
SELECT * FROM [MusicStore].[SongAlerts].[NSSongAddedEventBatches]
SELECT * FROM [MusicStore].[SongAlerts].[EventSongDetails]
SELECT * FROM [MusicStore].[SongAlerts].[NSNewSongNotifications]
SELECT * FROM [MusicStore].[SongAlerts].[NSNotificationClassProtocols]
SELECT * FROM [MusicStore].[SongAlerts].[NSProtocolFields]
SELECT * FROM [MusicStore].[dbo].[AlbumDetails]
SELECT * FROM [MusicStore].[dbo].[SongDetails]

DELETE FROM [MusicStore].[dbo].[Albums]
WHERE Title = N'The Joshua Tree'

SELECT * FROM [MusicStore].[dbo].[Songs]

DELETE FROM [MusicStore].[dbo].[Songs]
WHERE AlbumId=5

SELECT SERVERPROPERTY('MachineName')