Open BlaiseItUp opened 3 years ago
I understand C# variables, but javascript seems to hve more broad variables that later get specified (like with new date getting specified in the '()') and tsql has variables that seem somewhat redunant to me (int vs smallint for instance) DataTypes HW.xlsx
@ssavely Partly what you are seeing is the difference in a strongly-typed language and loosely-typed language. Javascript figures out what the type is by what is given to it. It is the same as when we use 'var' in C# instead of typing with string when defining a variable.
In this assignment you will do an exercise, where you will find some of the different datatypes, and how they differ between C# (.net), TSQL, and Javascript...
For C#
For TSQL
For Javascript -
[x] Review this article on javascript primitive datatypes. And this on date and time.
[x] This may be helpful to get the min, max and size of javascript types.
[x] This helpful when dealing with Date/Time in excel, often times we are needing to import data from someone else's spreadsheet. Date/Time can be problematic. Please note: Excel has many different data types.
If you need more references, please search the internet as needed.
The comparison
Data Types
[x] This assignment has an attached spreadsheet. Download it, and filling the missing cells (green). Turn the spreadsheet into a comparison chart for each of the data types you have discovered. Some types in one language may not have any equivalent, or may have multiple. ie. DateTime in c# may be associated with the following TSQL types: date, datetime2, datetime, time, smalldatetime. not all types will have min and max values, just fill in the ones that are applicable, or use google to find the values if it is not stated in each of these pages. In the case of multiples in a set like "char(50)", we just want the size of 1 of them. I included the names of the TSQL data types to get you started.
[x] When your finished, create a new comment to this issue, and attach the spreadsheet and tag your trainer using the "@" when typing the comment. Some of the types don't really compare, or don't have applicable min and max values. So don' rack your brain, even if it appears incomplete. Your trainer will point out if you missed something that is important.
When you are finished, create a new comment to this issue, and attach the spreadsheet and tag your trainer using the "@" when typing the comment.
DataTypes.xlsx