Skip to content
This repository was archived by the owner on Aug 15, 2026. It is now read-only.

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShopProductManagerApp

A training sample application that includes a data table, simple local authorization, and registration functionality.

Database Initialization

Follow the steps below to set up the database for the application:

-- Create the database
CREATE DATABASE ShopDB;

-- Use the created database
USE ShopDB;

-- Create the 'Rol' table for roles
CREATE TABLE Rol (
    RoleID INT PRIMARY KEY,
    RoleName NVARCHAR(50) NOT NULL
);

-- Create the 'Users' table with auto-increment
CREATE TABLE Users (
    UserId INT IDENTITY(1,1) PRIMARY KEY,
    Login NVARCHAR(50) NOT NULL,
    Pass NVARCHAR(50) NOT NULL,
    RoleID INT,
    FOREIGN KEY (RoleID) REFERENCES Rol(RoleID)
);

-- Create the 'Products' table with auto-increment
CREATE TABLE Products (
    ProductID INT IDENTITY(1,1) PRIMARY KEY,
    ProductName NVARCHAR(100) NOT NULL,
    Price DECIMAL(10, 2) NOT NULL,
    Description NVARCHAR(100)
);

-- Insert roles into the 'Rol' table
INSERT INTO Rol (RoleID, RoleName) VALUES
(1, 'Admin'),
(2, 'Manager');

About

A training sample application with a data table and simple local authorization along with registration

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages