-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathNGO_Branch_Database.txt
58 lines (51 loc) · 1.52 KB
/
NGO_Branch_Database.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#This file contains the code to create database for branch details of NGO and can be altered or updated to insert data
#Created by Affan Wahid Batch1
create database ngo_branch;
#This command create a database called ngo_branch
use ngo_branch;
#This command use the database for further editing or creating tables
CREATE TABLE `ngo_branch`.`ngo_branch_details` (
`Branch_Id` VARCHAR(255) NOT NULL,
`Branch_name` VARCHAR(255) NULL,
`Address` VARCHAR(255) NULL,
`B_Contact` INT NULL,
`B_Head` VARCHAR(255) NULL,
`No_of_Service` INT NULL,
`City` VARCHAR(255) NULL,
`B_Email` VARCHAR(255) NULL,
PRIMARY KEY (`Branch_Id`))
ENGINE = InnoDB;
#This command create a table called ngo_branch_details and add various columns
SELECT * FROM ngo_branch.ngo_branch_details;
#This command show the empty table as there is no data in the table
#Written By Syed Kumail Rizvi
#all user data table
CREATE TABLE `User Data` (
`U_Id` int,
`F_name` varchar(255),
`L_name` varchar(255),
`email` varchar(255),
`password` password(8),
`City` varchar(255),
PRIMARY KEY (`U_Id`)
);
#all user role table
CREATE TABLE `User Role` (
`R_Id` int,
`U_Id` int,
`F_name` varchar(255),
`L_name` varchar(255),
`email` varchar(255),
`Branch_Id` varchar(255),
PRIMARY KEY (`R_Id`)
);
#Angel Table
CREATE TABLE `Angel Table` (
`name` varchar(255),
`a_Id` int,
`Area _of_ Interest` varchar(255),
`contact` int,
`address` varchar(255),
`U-Id` int,
PRIMARY KEY (`a_Id`)
);