├── .gitattributes ├── Lab 3 ├── In Lab#3 Exercise.docx ├── InLab3Practice.sql ├── L19-1021 _ Lab3.sql └── Lab Manual 3 Data Retrieval.docx ├── Lab1-Q1 ├── Lab 1(Q1).pdf ├── Task1(a).aspx └── Task1(b).aspx ├── Lab1_Q2 ├── Lab 1 (Q2).pdf ├── StyleSheet1.css ├── Task2.aspx └── task2.js ├── Lab2.zip └── Lab3.zip /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /Lab 3/In Lab#3 Exercise.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fazeelkhalid/Database-management-system/f12937423535aae1342004eecec0aee209270c32/Lab 3/In Lab#3 Exercise.docx -------------------------------------------------------------------------------- /Lab 3/InLab3Practice.sql: -------------------------------------------------------------------------------- 1 | Create database inlab3Practice; 2 | 3 | use inlab3Practice; 4 | 5 | create table Students 6 | ( 7 | StudentId int not null primary key, 8 | StudentName varchar(50), 9 | StudentBatch int, 10 | CGPA float 11 | ); 12 | 13 | create table Instructors 14 | ( 15 | InstructorId int not null primary key, 16 | InstructorName varchar(50) 17 | ); 18 | 19 | create table Courses 20 | ( 21 | CourseId int not null primary key, 22 | CourseName varchar(100), 23 | CourseCreditHours int, 24 | InstructorId int foreign key references Instructors(InstructorId) 25 | ); 26 | 27 | create table Registration 28 | ( 29 | StudentId int foreign key references Students(StudentId), 30 | CourseId int foreign key references Courses(CourseId), 31 | CGPA float, 32 | primary key (StudentId, CourseId) 33 | ); 34 | 35 | insert into Students values 36 | (1, 'Ali', 2013, 3.3), 37 | (2, 'Aysha', 2013, 4), 38 | (3, 'Ahmed', 2013, 2.2); 39 | 40 | insert into Instructors values 41 | (1, 'Zafar'), 42 | (2, 'Sadia'), 43 | (3, 'Saima'); 44 | 45 | insert into Courses values 46 | (1, 'Computer Programming', 3, 1), 47 | (2, 'Computer Organization and Assembly', 3, 2); 48 | 49 | insert into Courses (CourseId, CourseName, CourseCreditHours) values 50 | (3, 'Computer Programming Lab', 1); 51 | 52 | insert into Registration values 53 | (1, 1, 3), 54 | (1, 3, 3), 55 | (2, 2, 0); 56 | 57 | Select * from Students; 58 | Select * from Instructors; 59 | Select * from Courses; 60 | Select * from Registration; 61 | -------------------------------------------------------------------------------- /Lab 3/L19-1021 _ Lab3.sql: -------------------------------------------------------------------------------- 1 | Create database customer-salesman; 2 | 3 | use [customer-salesman] 4 | 5 | create table salesman 6 | (salesman_id int not null primary key, 7 | sName varchar(50), 8 | city varchar(50), 9 | commission float); 10 | 11 | create table customers 12 | (customer_id int not null primary key, 13 | cust_Name varchar(50), 14 | city varchar(40), 15 | grade int, 16 | salesman_id int foreign key references salesman(salesman_id)); 17 | 18 | create table orders 19 | (ord_no int, 20 | purch_amt float, 21 | order_date date, 22 | customer_id int foreign key references customers(customer_id), 23 | salesman_id int foreign key references salesman(salesman_id)); 24 | 25 | insert into salesman values 26 | (5001,'James Hoog','New York',0.15), 27 | (5002,'Nail Knite','Pairs', 0.13), 28 | (5005,'Pit Alex','London',0.11), 29 | (5006,'Mc Lyon','Pairs',0.14), 30 | (5007,'Paul Adam','San Jose',0.13), 31 | (5003,'Lauson Hen','San Jose',0.12); 32 | 33 | insert into customers values 34 | (3002,'Nick Rimando','New York',100,5001), 35 | (3007,'John Brad Davis','New York',200,5001), 36 | (3005,'Graham Zusi','California',200,5002), 37 | (3008,'Julian Green','London',300,5002), 38 | (3004,'Fabian Johnson','Pairs',300,5006), 39 | (3009,'Geoff Cameron','Berlin',100,5003), 40 | (3003,'Jozy Altitor','Moscow',200,5007), 41 | (3001,'John Brad Guzan','London', NULL,5005); 42 | 43 | insert into orders values 44 | (70001,150.5,'2012-10-05',3005, 5002), 45 | (70009,270.65,'2011-09-10',3001, 5005), 46 | (70002,65.26,'2014-10-05',3002, 5001), 47 | (70004,110.5,'2011-8-17',3009, 5003), 48 | (70007,948.5,'2012-9-10',3005, 5002), 49 | (70005,2400.6,'2010-07-27',3007, 5001), 50 | (70008,5760,'2013-9-10',3002, 5001), 51 | (70010,1983.43,'2010-10-10',3004, 5006), 52 | (70003,2480.4,'2013-10-10',3009, 5003), 53 | (70012,250.45,'2010-6-27',3008, 5002), 54 | (70011,75.29,'2014-08-17',3003, 5007), 55 | (70013,3045.6,'2010-04-25',3002, 5001); 56 | 57 | 58 | select *from customers 59 | where city = 'New Yourk'; 60 | 61 | select *from customers 62 | where cust_Name like '%John%' and (city = 'London' or city = 'Paris' or city = 'New Yourk'); 63 | 64 | select *from customers 65 | where (city = 'London' or city = 'New Yourk'); 66 | 67 | select *from orders 68 | where (purch_amt>500); 69 | 70 | select *from salesman 71 | where(sName like '_a%'); 72 | 73 | select commission, commission+0.5 as UpdatedCommission 74 | from salesman 75 | where city = 'San Jose'; 76 | 77 | select *from orders order by order_date desc; 78 | 79 | select sName,LEFT(sName,CHARINDEX(' ',sName)) as firstname 80 | from salesman; 81 | 82 | select *from orders 83 | where (DATEPART(MONTH, order_date)=2); 84 | 85 | --Task 10 86 | 87 | select DATENAME(day,order_date) as Day_of_month, 88 | DATENAME(WEEKDAY,order_date) as week_day, 89 | DATENAME(WEEK,order_date) as week, 90 | DATENAME(DAYOFYEAR,order_date) as day_of_year, 91 | DATENAME(month,order_date) as name_of_month, 92 | DATENAME(year,order_date) as year 93 | from orders 94 | where DATEPART(month, order_date) = 10; 95 | 96 | select order_date,purch_amt,purch_amt*3 as triple_amt 97 | from orders 98 | where (DATEPART(MONTH, order_date)=11); 99 | 100 | select *from customers 101 | left join orders on orders.customer_id = customers.customer_id where( DATEPART(year, order_date) = 2011 or DATEPART(year, order_date) = 2013); 102 | 103 | select *from salesman 104 | where commission = (select MAX(commission) from salesman); 105 | 106 | -------------------------------------------------------------------------------- /Lab 3/Lab Manual 3 Data Retrieval.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fazeelkhalid/Database-management-system/f12937423535aae1342004eecec0aee209270c32/Lab 3/Lab Manual 3 Data Retrieval.docx -------------------------------------------------------------------------------- /Lab1-Q1/Lab 1(Q1).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fazeelkhalid/Database-management-system/f12937423535aae1342004eecec0aee209270c32/Lab1-Q1/Lab 1(Q1).pdf -------------------------------------------------------------------------------- /Lab1-Q1/Task1(a).aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Task1.aspx.cs" Inherits="Lab_1.WebForm1" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 22 | 23 | 24 |
25 |
26 | 27 | 28 | 29 | 93 | 94 | 95 |
  30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 |
  
39 | 40 |
41 |
42 | 43 |         Creat an Account 44 |
45 | 46 | 47 | 48 |
49 | First Name : 50 | 51 | Last Name : 52 | 53 |
54 |
55 | User Name : 56 | 57 | 58 |
59 |
60 | 61 | Password : 62 | 63 | 64 | 65 | 66 |
67 |
68 | Country  69 | 70 | Pakistan 71 | India 72 | UAE 73 | 74 |
75 |
76 | Date of Birth
77 | 78 |
79 |
80 | Gander 81 | 82 | 83 |
84 |
85 | 86 |
87 |
88 | 89 | 90 | 91 | 92 |
 
96 |
97 |
98 | 99 | 100 | -------------------------------------------------------------------------------- /Lab1-Q1/Task1(b).aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Task(b).aspx.cs" Inherits="Lab_1.Task_b_" %> 2 | 3 | 4 | 5 | 6 | 7 | Task1(b) 8 | 80 | 81 | 82 |
83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 |

To illustrate from based tags

91 |
92 | 93 | 94 | 95 | 96 | 98 | 99 | 100 | 101 |
 This is a text box to enter any text. 97 |  
102 | 103 | 104 | 105 | 106 | 108 | 109 | 110 | 111 |
 This is a text box to enter password. 107 |  
112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 |
 This is a text area to enter large text 
121 | 122 | 123 | 124 | 125 | 128 | 129 | 130 |
 This is a button 126 |
127 |
 
131 | 132 | 133 | 134 | 135 | 144 | 145 | 146 |
   Radio Button
136 |
137 | 138 |   139 | 140 | 141 | 142 |
143 |
 
147 | 148 | 149 | 150 | 151 | 159 | 160 | 161 |
       Text Box Opetion
152 |
153 | 154 |   155 | 156 |   157 | 158 |
162 | 163 | 164 | 165 | 166 | 174 | 175 | 176 |
 Menu driven opetions : 167 | 168 | Volvo 169 | saab 170 | Flat 171 | Audi 172 | 173 |  
177 | 178 |
179 | 180 | 181 | 182 | -------------------------------------------------------------------------------- /Lab1_Q2/Lab 1 (Q2).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fazeelkhalid/Database-management-system/f12937423535aae1342004eecec0aee209270c32/Lab1_Q2/Lab 1 (Q2).pdf -------------------------------------------------------------------------------- /Lab1_Q2/StyleSheet1.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | color: blue; 3 | font-size: 200% 4 | } 5 | .global { 6 | margin-left: initial; 7 | color: palevioletred; 8 | font-size: 110%; 9 | } 10 | .space { 11 | width: 30px; 12 | display: inline-block; 13 | } 14 | .Button { 15 | display: block; 16 | width: 330px; 17 | border: none; 18 | background-color: #333; 19 | color: white; 20 | padding: 10px 8px; 21 | font-size: 16px; 22 | cursor: pointer; 23 | text-align: center; 24 | margin-right: auto; 25 | font-family: cursive; 26 | border-radius: 5px; 27 | text-decoration: none; 28 | } 29 | .ResetButton{ 30 | 31 | display: block; 32 | width: 150px; 33 | border: none; 34 | background-color: #333; 35 | color: white; 36 | padding: 10px 8px; 37 | font-size: 16px; 38 | cursor: pointer; 39 | text-align: center; 40 | margin-right: auto; 41 | font-family: cursive; 42 | border-radius: 5px; 43 | text-decoration: none; 44 | } 45 | a:hover { 46 | background-color: oldlace; 47 | color: #B0B8B4FF; 48 | } 49 | .textField { 50 | border-radius: 8px; 51 | background-color: #CCCCCC; 52 | border-color: #333333; 53 | border-width: 4px; 54 | border-radius ="8px" 55 | } 56 | #DropDownList1 { 57 | width: 90px; 58 | border: none; 59 | background-color: #333; 60 | color: white; 61 | padding: 8px 5px; 62 | font-size: 10px; 63 | text-align: center; 64 | font-family: cursive; 65 | text-transform: uppercase; 66 | } 67 | 68 | #TextBox1 { 69 | border-radius: 8px; 70 | } -------------------------------------------------------------------------------- /Lab1_Q2/Task2.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Lab_1.WebForm1" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Task 3(LAB 1) 11 | 12 | 13 |
14 |

15 | Currency Converting Website 16 |

17 |
18 |
19 |
20 | Select currency medium: 21 | 22 | 23 | Pakistan 24 | USA 25 | UAE 26 | 27 |
28 |
29 |
30 |
31 | Please Enter amount in Rupees to convert to your selected medium : 32 | 33 | 34 |
35 |
36 |

37 | 38 |

39 |
40 | Amount from rupees to your chosen medium: 41 | 42 | 43 |
44 |
45 |
46 |
47 | Please enter amount in your chosen medium to convert to Rupees : 48 | 49 | 50 |
51 |
52 | 53 |

54 | 55 |

56 |
57 | 58 |
59 | Amount from your chosen medium to Rupees : 60 | 61 | 62 |
63 |
64 |
65 | 66 | 67 | 68 |
69 | Your previous Chosen Medium Was : 70 | 71 | 72 |
73 |
74 |
75 | 76 |
77 | Programed by : 78 | 79 | 80 |
81 |
82 |
83 | 84 |

85 | 86 |

87 |
88 | 89 | 90 | 91 |
92 | 93 | 94 | -------------------------------------------------------------------------------- /Lab1_Q2/task2.js: -------------------------------------------------------------------------------- 1 | var countrySelect = 0; 2 | 3 | function selectedCountry() { 4 | if (countrySelect == 0) { 5 | document.getElementById("TextBox5").value = "Pakistan"; 6 | } 7 | else if (countrySelect == 1) { 8 | document.getElementById("TextBox5").value = "USA"; 9 | } 10 | else { 11 | document.getElementById("TextBox5").value = "UAE"; 12 | } 13 | if (document.getElementById("DropDownList1").value == 0) { 14 | countrySelect = parseInt(0); 15 | } 16 | 17 | else if (document.getElementById("DropDownList1").value == 1) { 18 | countrySelect = parseInt(1); 19 | } 20 | 21 | else { 22 | countrySelect = parseInt(2); 23 | } 24 | } 25 | 26 | 27 | function conversitionInOtherCurrency() { 28 | if (countrySelect == 0) { 29 | var out = parseInt(document.getElementById("TextBox1").value); 30 | document.getElementById("TextBox2").value = out 31 | } 32 | else if (countrySelect == 1) { 33 | var out = parseFloat((document.getElementById("TextBox1").value) / 156.05); 34 | document.getElementById("TextBox2").value = out 35 | } 36 | else { 37 | var out = parseFloat((document.getElementById("TextBox1").value) / 42.49); 38 | document.getElementById("TextBox2").value = out 39 | } 40 | } 41 | 42 | function converstionIntoRupees() { 43 | if (countrySelect == 0) { 44 | var out = parseInt(document.getElementById("TextBox3").value); 45 | document.getElementById("TextBox4").value = out 46 | } 47 | else if (countrySelect == 1) { 48 | var out = parseFloat((document.getElementById("TextBox3").value) * 156.05); 49 | document.getElementById("TextBox4").value = out 50 | } 51 | else { 52 | var out = parseFloat((document.getElementById("TextBox3").value) * 42.49); 53 | document.getElementById("TextBox4").value = out 54 | } 55 | } 56 | 57 | function resetFields() { 58 | 59 | document.getElementById("TextBox1").value = ""; 60 | document.getElementById("TextBox2").value = ""; 61 | document.getElementById("TextBox3").value = ""; 62 | document.getElementById("TextBox4").value = ""; 63 | document.getElementById("TextBox5").value = ""; 64 | } -------------------------------------------------------------------------------- /Lab2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fazeelkhalid/Database-management-system/f12937423535aae1342004eecec0aee209270c32/Lab2.zip -------------------------------------------------------------------------------- /Lab3.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fazeelkhalid/Database-management-system/f12937423535aae1342004eecec0aee209270c32/Lab3.zip --------------------------------------------------------------------------------