Data Redundancy and Normalization

Please see below and answer with a minimum of 150 words and use references. 

 Discuss the relationship between data redundancy and normalization. What are the consequences if databases are not normalized? What problems is normalization addressing? Why is normalization crucial for effective database design and development?  

H2LoginPage

This assignment requires students to follow the slides of H2LoginPage.pdf and complete the tasks below:Follow the steps as illustrated in H2LoginPage.pdf to create a Login Page, with the solution name “LoginPage” being prefixed by the initials of your given and family names. For example, the solution name needs to be jsLoginPage if the student’s name is ***** *****.

Modify the function okButton_Click() and write C# ***** to allow the modified function to check if a password ***** ***** A valid password ***** have at least six characters with both letters and numbers. In addition, the password ***** start with a letter, and cannot contain characters other than letters and numbers.

While the “Cancel” button still terminates the application, the “OK” button produces the following different messages according to user input:

“Please fill in all slots.” if one or both of the slots are empty;

“Thank you for providing the input.” if the password ***** the requirements;

“A valid password ***** to have at least six characters with both letters and numbers.” in all other cases.

Package the folder containing all files of your solution and submit it online before due.

Hints: please check ASCII table for the code range of letters and numbers, and refer to http://msdn.microsoft.com/en-u… C# ***** codes using string.chars properties.

Project on Dataset Analysis

As future data analysts, you will be called upon to tell a story, answer questions, and make predictions from a data set. This is what you will do with this project.

Your Project will be roughly based on the following components: 
 

Data set attached – vaccine myths on reddit 

come up with an introduction, research question, analysis using R (and attach the code and the analysis)

5 components of projects: 

1.Description of data set – why you picked it etc

2. exploratory data analysis

3. inference

4. modelling 

5. prediction (using model to predict some value) 

conclusion

40/s2

  1. Describes the factors influencing the need for change and the imperatives for managing information assurance change initiatives.
  2. Discusses how group and organizational dynamics may affect the success of your information assurance change initiative.

computer speeds

  • What is the significance of cache memory on computer performance? 
  • Explain how the principle of locality affects caching?
  • What does associativity mean in the context of caches?

watch videos below

  • https://youtu.be/p3q5zWCw8J4
  • https://youtu.be/rtAlC5J1U40

project 2

 

Reproduce the results in the Python ML Tutorial, but using the following changes:

  1. Linear regression: y = 5*sin(2*pi*t/8 + pi/9); where t = 100 values between 1 and 2
  2. Logistic regression: 4 classes
    • class 1: centered at (2,2), std deviation = 2
    • class 2: centered at (10,10), std deviation = 3
    • class 3: centered at (2,10), std deviation = 5
    • class 4: centered at (10,5), std deviation = 3

3.  For binary logistic regression use class 1 and 2

4.  For k-binary and softmax use all classes

Code to modify:

import numpy as np

import matplotlib.pyplot as plt

a=10

b=90

x = (b-a)* np.random.random((100, 1)) + a

noise = 10*np.random.normal(size=x.shape)

slope = 2.5

y_int = 3.25

y = slope*x + y_int + noise

plt.scatter(x,y)

plt.plot(np.linspace(0,100,100),3.25+2.5*np.linspace(0,100,100),’r–‘) #true y for comparison

plt.xlabel(‘x’)

plt.ylabel(‘y’)

plt.show

m = len(x)

w = 10*np.random.random((2,1))

alpha = 0.0001

itera = 1000

dJdw0 = 1

dJdw1 = x

for i in range(itera):

y_hat = w[0] + w[1]*x

error = y_hat-y

J = np.sum(error**2)/(2*m)

w[0] = w[0] – alpha/m*np.sum(error*dJdw0)

w[1] = w[1] – alpha/m*np.sum(error*dJdw1)

print(“iteration: %4d cost: %10.2f alpha: %10.8f w0: %10.2f w1: %10.2f” %(i, J, alpha, w[0], w[1]))

print(“cost: %10.2f alpha: %10.8f w0: %10.2f w1: %10.2f” %(J, alpha, w[0], w[1]))

plt.scatter(x,y)

plt.plot(x,y_hat)

plt.plot(np.linspace(0,100,100),3.25+2.5*np.linspace(0,100,100),’r–‘)

plt.show

X = np.ones((len(x),2))

X[:,1]=list(x)

Y = y

W = np.dot(np.dot(np.linalg.inv(np.dot(X.T,X)),X.T),Y)

print(W)

X = x.reshape(100,)

Y = y.reshape(100,)

W=np.polyfit(X,Y,1)

print(W)

order = 3

X=np.zeros((len(x),order+1))

for i in range(order+1):

X[:,i]=list(x**i)

W = np.dot(np.dot(np.linalg.inv(np.dot(X.T,X)),X.T),Y)

print(W)

plt.scatter(x,y)

xs = x

xs.sort(axis=0)

X=np.zeros((len(x),order+1))

for i in range(order+1):

X[:,i]=list(xs**i)

W = W.reshape(4,1)

y_hat=np.dot(X,W)

plt.plot(x,y_hat)

plt.show

x11 = np.random.normal(10, 2, 20).reshape(20,1)

x21 = np.random.normal(5, 2, 20).reshape(20,1)

x12 = np.random.normal(5, 3, 20).reshape(20,1)

x22 = np.random.normal(10, 3, 20).reshape(20,1)

X1 = np.hstack((np.ones((20,1)),x11,x21))

X2 = np.hstack((np.ones((20,1)),x12,x22))

X = np.vstack ((X1,X2))

Y = np.vstack ((np.ones((20,1)), np.zeros((20,1))))

plt.plot(x11,x21,’ro’,x12,x22,’bo’)

plt.show

alpha = 0.01

itera = 10000

m = Y.shape[0]

W = np.random.random((3,1))

for i in range(itera):

Z = np.dot(X, W)

H = 1 / (1 + np.exp(-Z))

L = -np.sum(Y*np.log(H)+ (1-Y)*np.log(1-H))

dW = np.dot(X.T, (H – Y)) / m

W = W – alpha*dW

y1 = np.array([np.min(X),np.max(X)])

y2 = -((W[0,0] + W[1,0]*y1)/W[2,0])

plt.plot(x11,x21,’ro’,x12,x22,’bo’)

plt.plot(y1,y2,’–‘)

plt.show

x13 = np.random.normal(10, 2, 20).reshape(20,1)

x23 = np.random.normal(15, 3, 20).reshape(20,1)

X3 =np.hstack([np.ones((20,1)),x13,x23])

X = np.vstack((X1,X2,X3))

plt.plot(x11,x21,’ro’,x12,x22,’bo’,x13,x23,’go’)

plt.show

classes = 3

alpha = 0.01

itera = 10000

for c in range(classes):

Y = np.zeros((60,1))

a = 20*c

b = 20*(c+1)

Y[a:b,:]=np.ones((20,1))

W = np.random.random((3,1))

m = Y.shape[0]

for i in range(itera):

Z = np.dot(X, W)

H = 1 / (1 + np.exp(-Z))

L = -np.sum(Y*np.log(H)+(1-Y)*np.log(1-H))

dW = np.dot(X.T, (H – Y)) / m

W = W – alpha*dW

y1 = np.array([np.min(X[:,1]),np.max(X[:,1])])

y2 = -((W[0,0] + W[1,0]*y1)/W[2,0])

plt.plot(X[:,1],X[:,2],’go’,X[a:b,1],X[a:b,2],’ro’)

plt.plot(y1,y2,’–‘)

plt.show

plt.figure()

x11 = np.random.normal(10, 2, 20).reshape(20,1)

x21 = np.random.normal(5, 2, 20).reshape(20,1)

x12 = np.random.normal(5, 3, 20).reshape(20,1)

x22 = np.random.normal(10, 3, 20).reshape(20,1)

x13 = np.random.normal(10, 2, 20).reshape(20,1)

x23 = np.random.normal(15, 3, 20).reshape(20,1)

X1 = np.hstack((x11,x21))

X2 = np.hstack((x12,x22))

X3 = np.hstack((x13,x23))

X = np.vstack ((X1,X2,X3))

Y = np.vstack ((np.zeros((20,1)),np.ones((20,1)),2*np.ones((20,1))))

from sklearn.linear_model import LogisticRegression

softmax_reg = LogisticRegression(multi_class=”multinomial”,solver=”lbfgs”, C=10)

logreg = softmax_reg.fit(X, Y.reshape(60,))

logreg.fit(X, Y.reshape(60,))

x_min, x_max = X[:, 0].min() – .5, X[:, 0].max() + .5

y_min, y_max = X[:, 1].min() – .5, X[:, 1].max() + .5

h = .02 # step size in the mesh

xx, yy = np.meshgrid(np.arange(x_min, x_max, h), np.arange(y_min, y_max, h))

Z = logreg.predict(np.c_[xx.ravel(), yy.ravel()])

Z = Z.reshape(xx.shape)

plt.figure(1, figsize=(4, 3))

plt.pcolormesh(xx, yy, Z, cmap=plt.cm.Paired)

plt.plot(X[0:20, 0], X[0:20, 1],’ro’,X[20:40, 0], X[20:40, 1],’bo’,X[40:60, 0], X[40:60, 1],’go’)

plt.show()

Discussion Assignment

 Hello, Please find the discussion related questions. It should be more than 450 words with combined 6 questions. Need to submit this by 8 PM EST today.

Questions Starts from here :-

Let’s assume that you have an existing relational database.

  • What options do you have for removing a table from the database?
  • Is it possible to modify a table, i.e., adding or removing a column or changing a column’s type? 
  • Can you remove any table at any time?
  • What happens to foreign key references when a table is dropped?
  • Are there restrictions on dropping tables?
  • Can you modify any table in any way or are there limits?

Do some research on this focusing on SQLite as the database. What are the SQL statements for such activities? Provide examples.

Post your findings by the due date and respond to at least one other person in your assigned group within 48 hours after the due date. Contrast what they have found with what you have.

Note that we will grade your first post only and your reply. Do not make “dummy posts”. Of course, if you consult or use any external sources, cite them and do not directly copy from sources.

No posts or replies are accepted after 48 hours after the due date.

Excel_2G_Condiments_Inventory

 

#Excel_2G_Condiments_Inventory

Project Description:

#In the following project, you will edit a worksheet that summarizes  the inventory of Condiments and Toppings at the Valley View facility 

#Open   the Excel workbook Student_Excel_2G_Condiments_Inventory.xlsx   downloaded with   this project.

#Change the Theme to Ion. Rename   Sheet1 as Condiments and Sheet2 as Toppings. Click the Condiments sheet tab   to make it the active sheet.
 

  #If the theme is not available, click Browse for Themes, navigate  to the files   you downloaded with this project, and then select Ion.thmx.

#To the right of column B, insert   two new columns to create new  blank columns C and D. By using Flash Fill in   the two new columns,  split the data in column B into a column for Item # in   column C and  Category in column D. Type Item # as the column title in column C and Category as the column title in column   D. Delete column B. Cut column C, Category,   and paste it to column G. Delete the empty column C.  

#Display the Toppings worksheet,   and then repeat Step 3 on this worksheet.

#Without grouping the sheets,   make the following calculations in both worksheets:
   • In cell B4, enter a function to sum the Quantity in Stock data, and  then   apply Comma Style with zero decimal places to the result.
   • In cells B5:B8, enter formulas to calculate the Average, Median,  Lowest,   and Highest retail prices, and then apply the Accounting  Number Format.

#Without grouping the sheets,   make the following calculations in both worksheets:
   • In cell B10, enter a COUNTIF function to determine how many different types   of Relish are in stock on the Condiments   sheet and how many different types of Salsa are in stock on the Toppings worksheet.
 

#Without grouping the sheets,   make the following calculations in both worksheets:
   • In cell G14 type Stock Level.
   • In cell G15, enter an IF function to determine the items that must be   ordered. If the Quantity in Stock is less than 75, the Value_if_true is Order. Otherwise, the Value_if_false is OK. Fill the formula down through   all the rows.

#Without grouping the sheets,   apply the following formatting in both worksheets:
   • Apply Conditional Formatting to the Stock Level column so that Text that   Contains the text Order  are formatted with Bold Italic, a Font Color using in the fifth    column, the first color, and a Fill color set to No Color. Apply  Gradient   Fill Red Data Bars to the Quantity in Stock column.
 

#In the Condiments sheet, format   the range A14:G42 as a table with  headers and apply Sky Blue, Table Style   Light 20. If the table style  is not available, choose a similar style. Insert   a Total Row, filter  by Category for Relish, and then Sum the Quantity in   Stock column.  Record the result in cell B11.

#Clear the filter from the table.   Sort the table on the Item #  column from Smallest to Largest, and then remove   the Total Row. On the  Page Layout tab, set Print Titles so that row 14   repeats at the top  of each page.

In the Toppings sheet, format   the range A14:G42 as a table with  headers and apply Light Green, Table Style   Light 19. If the table  style is not available, choose a similar style. Insert   a Total Row,  filter by Category for Salsa, and then Sum the Quantity in Stock    column. Record the result in cell B11.

#Clear the filter from the table.   Sort the table on the Item #  column from Smallest to Largest, and then remove   the Total Row. On the  Page Layout tab, set Print Titles so that row 14   repeats at the top  of each page, and then save your workbook.

#Group the two worksheets. Merge   and center the title in cell A1  across the range A1:G1 and apply the Title   cell style. Merge and  center the subtitle in cell A2 across the range A2:G2   and apply the  Heading 1 cell style. AutoFit Columns A:G. Center the   worksheets  Horizontally, and then change the Orientation to Landscape.

#Save your workbook and then   ungroup the sheets. Click the Toppings  sheet tab, and then insert a new   worksheet. Change the sheet name to Summary and then widen columns A:D to 170 pixels.   Move the Summary sheet so that it is the first sheet in the workbook.

#In cell A1, type Valley View   Inventory Summary.   Merge & Center the title across the range A1:D1, and then apply the Title   cell style. In cell A2, type As of June 30 and then Merge & Center the text across the   range A2:D2. Apply the Heading 1 cell style.

#On the Condiments sheet, copy   the range A4:A8. Display the Summary  sheet and Paste the selection to cell   A5. Apply the Heading 4 cell  style to the selection.

#In the Summary sheet, in cell   B4, type Condiments. In cell C4, type Toppings. In cell D4, type Condiments/Toppings. Center the column titles, and   then apply the Heading 3 cell style.

#In cell B5, enter a formula that   references cell B4 in the  Condiments sheet so that the Condiments Total Items   in Stock displays  in B5. Create similar formulas to enter the Average Price,   Median  Price, Lowest Price, and Highest Price from the Condiments sheet into    the Summary sheet in the range B6:B9.

#Enter formulas in the range   C5:C9 that reference the Total Items  in Stock and the Average Price, Median   Price, Lowest Price, and  Highest Price cells in the Toppings worksheet.

#In the range D5:D9 of the   Summary sheet, insert Column sparklines  using the values in the Condiments   and Toppings columns (insert in  each cell individually). Format the   sparklines using the first five  styles in the first row in their given order.   To apply the Sparkline  style, on the Design tab, in the Style group, click   More, and apply  the first five styles in the first row.
 

#To the range B5:C5, apply Comma   Style with zero decimal places,  and confirm that the Accounting Number Format   is applied to the range  B6:C9. Center the Summary worksheet Horizontally and   change the  Orientation to Landscape. Insert a custom footer in the left   section  with the file name. 

LAB 0-The Basics Code Include

  

LAB 0-The Basics Code Include name, lab…..LAB 0-The basics
Code
Include name, lab #, and date
Output at bottom as a comment
Output as a separate file
The problem you are solving is as follows (adapted from Lab 0 Word document):This program is going to have just one function. Its name will be main. In fact every program in ‘C++’ will have a function called main. The computer needs to know where the execution starts.
int main()
{
return 0;
}
Inside those curly brackets and before the return statement you will be typing lots of print statements.
cout<<“NAME:t”;
cout <<“E-MAIL:t”;
cout <<”MAJOR:t”;
cout << “COMPUTER EXPERIENCE:t”;
After each of the COUT statements given above, write another statement to output the information. So you will have at least eight statements in all.
You will submit 1) the .cpp file with both the code and the output shown as a comment at the bottom, and 2) the .txt file showing the output only.