subscribe by email and YouTube to get notification of new posts. & videos.

Mes: enero 2026

  • Against the Youtube rules

    Or better know, check what Javascript can do, then programm the Human Behavior

    What Javascript can detect

    (so what the superbots will emulate to be against while complain with the tested youtube anti-artificial count-stats methodology)

    check https://blog.bitsrc.io/javascript-device-detection-bf75eb782fdf

    Say brand and model of his device, the resolution (current, as say a dekstop computer can change it, as opposed to a phone), O.S, bla bla, and most important, ¿Can detect JS so youtube, is a device is Bot based, or Human, based ? NO, not at all , if you do it well, but be aware, this will be a bit difficult for you, or not.

    see more articles about in this website

    Deja una respuesta

    Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

  • Database Arquitecture part II

    To be implemented later, when ready to start

    bellow a few ideas

    ORDERS

    • [ID].[User] FK ([ID].[User]) (USERS)
    • [ID].[URL] FK ([ID].[URL]) ([URLS])
    • [DEF].[URLS].[Kind].[Action] FK
    • [ID].[ORDERS] PK
    • [ORDERS].[HYBRID] Bit NULL nullable
      • NULL, then so order only for [URL]
      • FALSE, then so order only for [URL_Mobile]
      • TRUE, then, so order will execute both Dekstop & Mobile url’s
    • [ORDERS].[Created] Datetime2
    • [Amount] Int

    [PURCHASES]

    • [ID].[User] FK ([ID].[User]) (USERS)
    • [ID].[ORDERS] FK ([ID].[Order]) (ORDERS) NON UNIQUE
    • [ID].[Purchase] PK int UNIQUE FROM (ID_USER & ID_ORDER)

    [PURCHASES].[MONEY]

    • [ID].[Purchase] FK
    • [Money]
    • [Currency] Char(3)

    [Identifier tables]

    If using FK’s must be only FK’s from[DEF].Tables

    [DEF].[URLS].[Kind]

    :: Must be, in order to derive actions based on these

    • [ID].[DEF].[Kind] PK
    • [DEF].[URLS].[Kind].[Name]
      • Example: Youtube, twitch, kick, and newer kinds that may appear over the time

    [DEF].[URLS].[Kind].[Action]

    • [ID].[DEF].[Kind] FK
    • [ID].[DEF].[URLS].[Kind].[Action] PK TinyInt
    • [ID].[DEF].[URLS].[Kind].[Action].[Name] NVarChar(33)
      • Example: Play, Like, Unlike Comment, and other that may come to kind


    [DEF].[PRICES].[URLS]

    [DEF].[PRICES].[URLS].[PACKS]

    [DEF].[PRICES].[URLS].[PACKS].[ACTIONS]

    [DEF].[PRICES].[URLS].[PACKS].[ACTIONS]

    [DEF].[PRICES].[URLS].[PACKS].[ACTIONS].[Price]

    Deja una respuesta

    Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

  • Database Arquitecture part I

    Database Arquitecture part I

    In this chapter I’m disposing my creation. This will contains the tables, and some SQL code in the form that I’m using within SP (stored procedures).

    NOTE: This applies for early version (v. 0.5).

    Latest version* are only available for purchase.


    Engine specs

    • Type of DB: SQL
    • Brand: Microsoft SQL Server Express
    • Model: Anyone since 2008 R2

    SQL NAMED INSTANCE:

    • SQLBOT

    DATABASE NAME

    • SUPERBOTS

    *for the tutorial purposes Im using an SQL 2005-2008 R2 compatible code (as that’s the one I was starting to hard–code for)

    THE TABLES

    [Main tables]

    IPS* *

    USE [superbots]
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[IPS](
    	[IP.ID] [int] NOT NULL,
    	[IP] [nvarchar](10) NOT NULL,
    	[Country] [nchar](2) NOT NULL,
    	[IP.Created] [datetime2](7) NOT NULL,
    	[IP.Actived] [datetime2](7) NOT NULL,
    	[IP.Disabled] [datetime2](7) NULL,
     CONSTRAINT [PK_IPS] PRIMARY KEY CLUSTERED 
    (
    	[IP.ID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'If not True, then IP can be used' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'IPS', @level2type=N'COLUMN',@level2name=N'IP.Disabled'
    GO
    
    

    BOTS

    • [Bot.ID] Int PK
    • [Bot.Name] NVarChar(8)
      • example: Winform, App, UrlBased, Android, Iphone
    • [Bot.Physical] Bit 0

    USE [superbots]
    GO
    /****** Object:  Table [dbo].[BOTS]    Script Date: 13/01/2026 23:46:05 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[BOTS](
    	[Bot.ID] [int] NOT NULL,
    	[Bot.Name] [nvarchar](8) NULL,
    	[Bot.Physical] [bit] NOT NULL,
     CONSTRAINT [PK_BOTS] PRIMARY KEY CLUSTERED 
     (
    	[Bot.ID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    

    BOTS.INSTANCES

    • [Bot.ID] Int (FK :: [ID].[Bot])(BOTS))
    • [Bot.Instance.ID] BigInt PK
    • [Bot.Instance.Created] Datetime2
      • DEFAULT VALUE = GetDate() :: all [Created] on all tables, don’t forget
    • [Bot.Instance.Active] Bit 1

    USE [superbots]
    GO
    
    /****** Object:  Table [dbo].[BOTS.INSTANCES]    Script Date: 14/01/2026 0:20:18 ******/
    SET ANSI_NULLS ON
    GO
    
    SET QUOTED_IDENTIFIER ON
    GO
    
    CREATE TABLE [dbo].[BOTS.INSTANCES](
    	[Bot.ID] [int] NOT NULL,
    	[Bot.Instance.ID] [bigint] IDENTITY(1,1) NOT NULL,
    	[Bot.Instance.Created] [datetime2](7) NOT NULL,
    	[Bot.Instance.Active] [bit] NOT NULL,
     CONSTRAINT [PK_BOTS.INSTANCES] PRIMARY KEY CLUSTERED 
    (
    	[Bot.Instance.ID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    
    ALTER TABLE [dbo].[BOTS.INSTANCES] ADD  CONSTRAINT [DF_BOTS.INSTANCES_Bot.Instance.Created]  DEFAULT (getdate()) FOR [Bot.Instance.Created]
    GO
    
    ALTER TABLE [dbo].[BOTS.INSTANCES] ADD  CONSTRAINT [DF_BOTS.INSTANCES_Bot.Instance.Active]  DEFAULT ((0)) FOR [Bot.Instance.Active]
    GO
    
    ALTER TABLE [dbo].[BOTS.INSTANCES]  WITH CHECK ADD  CONSTRAINT [FK_BOTS.INSTANCES_BOTS] FOREIGN KEY([Bot.ID])
    REFERENCES [dbo].[BOTS] ([Bot.ID])
    GO
    
    ALTER TABLE [dbo].[BOTS.INSTANCES] CHECK CONSTRAINT [FK_BOTS.INSTANCES_BOTS]
    GO
    

    BOTS.INSTANCES.DEVICES

    As a User may have a Phone, Tablet, Computer and Labtop

    USE [superbots]
    GO
    /****** Object:  Table [dbo].[BOTS.INSTANCES.DEVICES]    Script Date: 17/01/2026 11:19:57 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[BOTS.INSTANCES.DEVICES](
    	[Bot.Instance.ID] [bigint] NOT NULL,
    	[Device.ID] [int] NOT NULL,
    	[Bot.Instance.Device.ID] [int] IDENTITY(1,1) NOT NULL,
    	[Bot.Instance.Device.Created] [datetime2](7) NOT NULL,
     CONSTRAINT [PK_BOTS.INSTANCES.DEVICES] PRIMARY KEY CLUSTERED 
    (
    	[Bot.Instance.Device.ID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    
    ALTER TABLE [dbo].[BOTS.INSTANCES.DEVICES] ADD  CONSTRAINT [DF_BOTS.INSTANCES.RESOLUTIONS_Bot.Instance.Resolution.IP.Asigned]  DEFAULT (getdate()) FOR [Bot.Instance.Device.Created]
    GO
    
    ALTER TABLE [dbo].[BOTS.INSTANCES.DEVICES]  WITH CHECK ADD  CONSTRAINT [FK_BOTS.INSTANCES.DEVICES_BOTS.INSTANCES] FOREIGN KEY([Bot.Instance.ID])
    REFERENCES [dbo].[BOTS.INSTANCES] ([Bot.Instance.ID])
    GO
    
    ALTER TABLE [dbo].[BOTS.INSTANCES.DEVICES] CHECK CONSTRAINT [FK_BOTS.INSTANCES.DEVICES_BOTS.INSTANCES]
    GO
    
    EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'User may have 12 devices,but a maximum of 4 per day per url' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BOTS.INSTANCES.DEVICES', @level2type=N'COLUMN',@level2name=N'Bot.Instance.Device.ID'
    GO
    
    
    

    BOTS.INSTANCES.DEVICES.IPS

    USE [superbots]
    GO
    /****** Object:  Table [dbo].[BOTS.INSTANCES.DEVICES.IPS]    Script Date: 17/01/2026 11:20:52 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[BOTS.INSTANCES.DEVICES.IPS](
    	[Bot.Instance.Device.ID] [int] IDENTITY(1,1) NOT NULL,
    	[IP.ID] [int] NOT NULL,
    	[Bot.Instance.Device.IP.ID] [int] NOT NULL,
    	[Bot.Instance.Device.IP.Asigned] [datetime2](7) NOT NULL,
     CONSTRAINT [PK_BOTS.INSTANCES.DEVICES.IPS] PRIMARY KEY CLUSTERED 
    (
    	[Bot.Instance.Device.IP.ID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    
    ALTER TABLE [dbo].[BOTS.INSTANCES.DEVICES.IPS] ADD  CONSTRAINT [DF_BOTS.INSTANCES.IPS_Bot.IP.Asigned]  DEFAULT (getdate()) FOR [Bot.Instance.Device.IP.Asigned]
    GO
    
    ALTER TABLE [dbo].[BOTS.INSTANCES.DEVICES.IPS]  WITH CHECK ADD  CONSTRAINT [FK_BOTS.INSTANCES.DEVICES.IPS_BOTS.INSTANCES.DEVICES] FOREIGN KEY([Bot.Instance.Device.ID])
    REFERENCES [dbo].[BOTS.INSTANCES.DEVICES] ([Bot.Instance.Device.ID])
    GO
    
    ALTER TABLE [dbo].[BOTS.INSTANCES.DEVICES.IPS] CHECK CONSTRAINT [FK_BOTS.INSTANCES.DEVICES.IPS_BOTS.INSTANCES.DEVICES]
    GO
    
    ALTER TABLE [dbo].[BOTS.INSTANCES.DEVICES.IPS]  WITH CHECK ADD  CONSTRAINT [FK_BOTS.INSTANCES.DEVICES.IPS_BOTS.INSTANCES.DEVICES.IPS] FOREIGN KEY([Bot.Instance.Device.IP.ID])
    REFERENCES [dbo].[BOTS.INSTANCES.DEVICES.IPS] ([Bot.Instance.Device.IP.ID])
    GO
    
    ALTER TABLE [dbo].[BOTS.INSTANCES.DEVICES.IPS] CHECK CONSTRAINT [FK_BOTS.INSTANCES.DEVICES.IPS_BOTS.INSTANCES.DEVICES.IPS]
    GO
    
    ALTER TABLE [dbo].[BOTS.INSTANCES.DEVICES.IPS]  WITH CHECK ADD  CONSTRAINT [FK_BOTS.INSTANCES.DEVICES.IPS_IPS] FOREIGN KEY([IP.ID])
    REFERENCES [dbo].[IPS] ([IP.ID])
    GO
    
    ALTER TABLE [dbo].[BOTS.INSTANCES.DEVICES.IPS] CHECK CONSTRAINT [FK_BOTS.INSTANCES.DEVICES.IPS_IPS]
    GO
    
    EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Max 4 per day as according to stats, youtube counts a max of 4 views uniqeu per day per ip, of course, user may have a home IP used by his phone, tablet, computer and labtop' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BOTS.INSTANCES.DEVICES.IPS', @level2type=N'COLUMN',@level2name=N'Bot.Instance.Device.ID'
    GO
    
    EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Max 4 per day per DEVICE.ID ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BOTS.INSTANCES.DEVICES.IPS', @level2type=N'COLUMN',@level2name=N'Bot.Instance.Device.IP.ID'
    GO
    
    
    
    CREATE TRIGGER TRG_BOTS_INSTANCES_DEVICES_IPS_DenyMoreThanOneEach4hrsperDevicePerIP
    ON [BOTS.INSTANCES.DEVICES.IPS]
    AFTER INSERT
    AS
    BEGIN
        IF EXISTS (
                SELECT 1
                FROM Inserted I
                JOIN  [BOTS.INSTANCES.DEVICES.IPS] B ON  (B.[Bot.Instance.Device.ID] = I.[Bot.Instance.Device.ID] AND B.[IP.ID] = I.[IP.ID])
                WHERE B.[Bot.Instance.Device.IP.Asigned] < DATEADD(hour, -6, GETDATE())        
        )
        BEGIN
            RAISERROR('No se puede insertar el registro:Bot.Instance.Device e IP son iguales y la fecha es anterior a hace 6 horas.', 16, 1);
            ROLLBACK TRANSACTION; 
            RETURN;
        END
    END;
    GO
    

    URLS

    [URL.ID] Int PK

    [URL.Desktop] NVarChar(256)

    [URL.Mobile] NVarChar(256)

    [URL.Tablet] NVarChar(256)

    USE [superbots]
    GO
    /****** Object:  Table [dbo].[URLS]    Script Date: 14/01/2026 22:48:07 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[URLS](
    	[URL.ID] [int] NOT NULL,
    	[URL.Desktop] [nvarchar](256) NULL,
    	[URL.Mobile] [nvarchar](256) NULL,
    	[URL.Tablet] [nvarchar](256) NULL,
    	[URL.Created] [datetime2](7) NOT NULL,
     CONSTRAINT [PK_URLS] PRIMARY KEY CLUSTERED 
    (
    	[URL.ID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    ALTER TABLE [dbo].[URLS] ADD  CONSTRAINT [DF_URLS_URL.Created]  DEFAULT (getdate()) FOR [URL.Created]
    GO
    

    (trigger :: at least one URL (desktop, mobile or tablet must be per record)

    CREATE TRIGGER [dbo].[TRG_URLS_OnIsert_Or_OnUpdate]
    ON [dbo].[URLS]
    AFTER INSERT, UPDATE
    AS
    BEGIN
        SET NOCOUNT ON;
        IF EXISTS (
            SELECT 1  FROM inserted
            WHERE ([URL.Desktop] IS NULL) AND ([URL.Mobile] IS NULL ) AND ([URL.Tablet] IS NULL)
        )
        BEGIN
            RAISERROR ('At least one type URL must be provided.', 16, 1);
            ROLLBACK TRANSACTION;
        END
    END;
    



    USERS

    USE [superbots]
    GO
    
    /****** Object:  Table [dbo].[USERS]    Script Date: 15/01/2026 16:02:59 ******/
    SET ANSI_NULLS ON
    GO
    
    SET QUOTED_IDENTIFIER ON
    GO
    
    CREATE TABLE [dbo].[USERS](
    	[User.ID] [int] IDENTITY(1,1) NOT NULL,
    	[User.Email] [nvarchar](32) NOT NULL,
    	[User.Created] [datetime2](7) NOT NULL,
    	[User.Enabled] [bit](0) NOT NULL,
     CONSTRAINT [PK_USERS] PRIMARY KEY CLUSTERED 
    (
    	[User.ID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    
    ALTER TABLE [dbo].[USERS] ADD  CONSTRAINT [DF_USERS_User.Created]  DEFAULT (getdate()) FOR [User.Created]
    GO
    
    ALTER TABLE [dbo].[USERS] ADD  CONSTRAINT [DF_USERS_User.Enabled]  DEFAULT ((0)) FOR [User.Enabled]
    GO
    

    (trigger to allow only valid emails)

    CREATE TRIGGER TRG_USERS_ValidateEmailFormat ON USERS
    AFTER INSERT, UPDATE
    AS
    BEGIN
        SET NOCOUNT ON;
        -- Check if any inserted/updated rows have an invalid email format
        IF EXISTS (
            SELECT 1 
            FROM USERS
            WHERE  1 = 1
              AND (
                -- Pattern: char + @ + char + . + at least 2 chars for TLD
                [User.Email] NOT LIKE '%_@_%_.__%' 
                -- Disallow specific common invalid characters
                OR [User.Email] LIKE '%[^a-z0-9@._-]%' ESCAPE '\'
                -- Disallow consecutive dots or @
                OR [User.Email] LIKE '%..%' 
                OR [User.Email] LIKE '%@%@%'
              )
        )
        BEGIN
            RAISERROR ('The Email format provided is invalid.', 16, 1);
            ROLLBACK TRANSACTION;
        END
    END;
    GO

    USERS.URLS

    USE [superbots]
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[USERS.URLS](
    	[User.ID] [int] NOT NULL,
    	[URL.ID] [int] NOT NULL,
    	[User.URL.ID] [int] NOT NULL,
    	[User.URL.Created] [datetime2](7) NOT NULL,
    	[User.URL.Legitimated] [datetime2](7) NULL,
     CONSTRAINT [PK_USERS.URLS] PRIMARY KEY CLUSTERED 
    (
    	[User.URL.ID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    
    ALTER TABLE [dbo].[USERS.URLS] ADD  CONSTRAINT [DF_USERS.URLS_User.Url.Created]  DEFAULT (getdate()) FOR [User.URL.Created]
    GO
    
    ALTER TABLE [dbo].[USERS.URLS]  WITH CHECK ADD  CONSTRAINT [FK_USERS.URLS_URLS] FOREIGN KEY([URL.ID])
    REFERENCES [dbo].[URLS] ([URL.ID])
    GO
    
    ALTER TABLE [dbo].[USERS.URLS] CHECK CONSTRAINT [FK_USERS.URLS_URLS]
    GO
    
    ALTER TABLE [dbo].[USERS.URLS]  WITH CHECK ADD  CONSTRAINT [FK_USERS.URLS_USERS] FOREIGN KEY([User.ID])
    REFERENCES [dbo].[USERS] ([User.ID])
    GO
    
    ALTER TABLE [dbo].[USERS.URLS] CHECK CONSTRAINT [FK_USERS.URLS_USERS]
    GO
    
    EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Identifies, if an url is owned by the user. Web must verify via DNS records on that domain' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'USERS.URLS', @level2type=N'COLUMN',@level2name=N'User.URL.Legitimated'
    GO
    

    USERS.URLS.YOUTUBE

    Made to include the stats (of views, likes, comments, etc) when user created theURL

    USE [superbots]
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[USERS.URLS.YOUTUBES](
    	[User.URL.ID] [int] NOT NULL,
    	[Views] [int] NOT NULL,
    	[Likes] [int] NOT NULL,
    	[Comments] [int] NOT NULL
    ) ON [PRIMARY]
    GO
    

    USERS.BOTS.INSTANCES

    USE [superbots]
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[USERS.BOTS.INSTANCES](
    	[User.ID] [int] NOT NULL,
    	[Bot.Instance.ID] [bigint] NOT NULL,
    	[User.Bot.Instance.ID] [int] NOT NULL,
    	[User.Bot.Instance.Created] [datetime2](7) NOT NULL,
     CONSTRAINT [PK_USERS.BOTS.INSTANCES] PRIMARY KEY CLUSTERED 
    (
    	[User.Bot.Instance.ID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    
    ALTER TABLE [dbo].[USERS.BOTS.INSTANCES] ADD  CONSTRAINT [DF_USERS.BOTS.INSTANCES_User.Bot.Instance.Created]  DEFAULT (getdate()) FOR [User.Bot.Instance.Created]
    GO
    
    ALTER TABLE [dbo].[USERS.BOTS.INSTANCES]  WITH CHECK ADD  CONSTRAINT [FK_USERS.BOTS.INSTANCES_BOTS.INSTANCES] FOREIGN KEY([Bot.Instance.ID])
    REFERENCES [dbo].[BOTS.INSTANCES] ([Bot.Instance.ID])
    GO
    
    ALTER TABLE [dbo].[USERS.BOTS.INSTANCES] CHECK CONSTRAINT [FK_USERS.BOTS.INSTANCES_BOTS.INSTANCES]
    GO
    
    ALTER TABLE [dbo].[USERS.BOTS.INSTANCES]  WITH CHECK ADD  CONSTRAINT [FK_USERS.BOTS.INSTANCES_USERS] FOREIGN KEY([User.ID])
    REFERENCES [dbo].[USERS] ([User.ID])
    GO
    
    ALTER TABLE [dbo].[USERS.BOTS.INSTANCES] CHECK CONSTRAINT [FK_USERS.BOTS.INSTANCES_USERS]
    GO
    

    USERS.BOTS.INSTANCES.URLS

    USE [superbots]
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[USERS.BOTS.INSTANCES.URLS](
    	[User.Bot.Instance.ID] [int] NOT NULL,
    	[User.URL.ID] [int] NOT NULL,
    	[User.Bot.Instance.Url.ID] [int] NOT NULL,
    	[User.Bot.Instance.Url.Created] [datetime2](7) NOT NULL,
     CONSTRAINT [PK_USERS.BOTS.INSTANCES.URLS] PRIMARY KEY CLUSTERED 
    (
    	[User.Bot.Instance.Url.ID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    
    ALTER TABLE [dbo].[USERS.BOTS.INSTANCES.URLS] ADD  CONSTRAINT [DF_USERS.BOTS.INSTANCES.URLS_User.Bot.Instance.Url.Created]  DEFAULT (getdate()) FOR [User.Bot.Instance.Url.Created]
    GO
    
    ALTER TABLE [dbo].[USERS.BOTS.INSTANCES.URLS]  WITH CHECK ADD  CONSTRAINT [FK_USERS.BOTS.INSTANCES.URLS_USERS.BOTS.INSTANCES] FOREIGN KEY([User.Bot.Instance.ID])
    REFERENCES [dbo].[USERS.BOTS.INSTANCES] ([User.Bot.Instance.ID])
    GO
    
    ALTER TABLE [dbo].[USERS.BOTS.INSTANCES.URLS] CHECK CONSTRAINT [FK_USERS.BOTS.INSTANCES.URLS_USERS.BOTS.INSTANCES]
    GO
    
    ALTER TABLE [dbo].[USERS.BOTS.INSTANCES.URLS]  WITH CHECK ADD  CONSTRAINT [FK_USERS.BOTS.INSTANCES.URLS_USERS.URLS] FOREIGN KEY([User.URL.ID])
    REFERENCES [dbo].[USERS.URLS] ([User.URL.ID])
    GO
    
    ALTER TABLE [dbo].[USERS.BOTS.INSTANCES.URLS] CHECK CONSTRAINT [FK_USERS.BOTS.INSTANCES.URLS_USERS.URLS]
    GO
    
    
    


    USERS.BOTS.INSTANCES.URLS.YOUTUBE.ACTIONS

    USE [superbots]
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[USERS.BOTS.INSTANCES.URLS.YOUTUBE.ACTIONS](
    	[User.Bots.Instances.URL.ID] [int] NOT NULL,
    	[Action.Youtube.ID] [int] NOT NULL,
    	[User.Bots.Instances.URL.Actions.Youtube.Created] [datetime2](7) NOT NULL,
    	[User.Bots.Instances.URL.Actions.Youtube.Finished] [datetime2](7) NULL,
    	[Action.Youtube.ID.Result] [datetime2](7) NULL
    ) ON [PRIMARY]
    GO
    
    ALTER TABLE [dbo].[USERS.BOTS.INSTANCES.URLS.YOUTUBE.ACTIONS] ADD  CONSTRAINT [DF_USERS.BOTS.INSTANCES.URLS.YOUTUBE.ACTIONS_User.Bots.Instances.URL.Actions.Youtube.Ceated]  DEFAULT (getdate()) FOR [User.Bots.Instances.URL.Actions.Youtube.Created]
    GO
    
    ALTER TABLE [dbo].[USERS.BOTS.INSTANCES.URLS.YOUTUBE.ACTIONS]  WITH CHECK ADD  CONSTRAINT [FK_USERS.BOTS.INSTANCES.URLS.YOUTUBE.ACTIONS_ACTIONS.YOUTUBE] FOREIGN KEY([Action.Youtube.ID])
    REFERENCES [dbo].[ACTIONS.YOUTUBE] ([Action.YouTube.ID])
    GO
    
    ALTER TABLE [dbo].[USERS.BOTS.INSTANCES.URLS.YOUTUBE.ACTIONS] CHECK CONSTRAINT [FK_USERS.BOTS.INSTANCES.URLS.YOUTUBE.ACTIONS_ACTIONS.YOUTUBE]
    GO
    
    ALTER TABLE [dbo].[USERS.BOTS.INSTANCES.URLS.YOUTUBE.ACTIONS]  WITH CHECK ADD  CONSTRAINT [FK_USERS.BOTS.INSTANCES.URLS.YOUTUBE.ACTIONS_USERS.BOTS.INSTANCES.URLS] FOREIGN KEY([User.Bots.Instances.URL.ID])
    REFERENCES [dbo].[USERS.BOTS.INSTANCES.URLS] ([User.Bot.Instance.URL.ID])
    GO
    
    ALTER TABLE [dbo].[USERS.BOTS.INSTANCES.URLS.YOUTUBE.ACTIONS] CHECK CONSTRAINT [FK_USERS.BOTS.INSTANCES.URLS.YOUTUBE.ACTIONS_USERS.BOTS.INSTANCES.URLS]
    GO
    
    
    

    *So, be aware that the above code might not be updated as last version, but thats a clean indicator of what to do.


    Above code dated from the SUPERBOTS SQL v0.5

    ** IP’s must be uniques, non shared, better with unmetered / unlimited bandwidth.


    Deja una respuesta

    Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *