<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Data type</title><link>https://communities.bentley.com/products/projectwise/f/projectwise-di-forum/232502/data-type</link><description>Hello Community 
 Looking at a detail description of each Data Type we can choose when creating Attributes. 
 I wanted to better understand long terms impact when selecting one versus another and the difference between them. 
 I also see NatIve Data Type</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Data type</title><link>https://communities.bentley.com/thread/751701?ContentTypeID=1</link><pubDate>Thu, 02 Feb 2023 15:55:46 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:1d95d309-0bc2-4711-aa90-ce06f2f184ee</guid><dc:creator>JessicaReed Reed</dc:creator><description>&lt;p&gt;Hi there! I understand where you&amp;#39;re coming from; choosing the right data type can greatly impact your data analysis. It&amp;#39;s good to take the time to really understand the difference between each option and what their long-term implications might be.&lt;br /&gt;Regarding the &amp;quot;Native Data Type&amp;quot; option, I&amp;#39;m not sure what that specifically refers to in your context, but you might also want to consider taking a look at some resources on &lt;a href="https://blog.coupler.io/top-data-integration-tools/"&gt;how to choose data integration tools&lt;/a&gt;. It can help you understand what factors to consider when evaluating different data integration solutions and help ensure you&amp;#39;re making the best choice for your needs. &lt;span&gt;how to choose data integration tools&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data type</title><link>https://communities.bentley.com/thread/721239?ContentTypeID=1</link><pubDate>Wed, 13 Jul 2022 11:58:52 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:ca1b270e-cb71-4a63-b66d-e6f19fb1ffc5</guid><dc:creator>Luc Poulin</dc:creator><description>&lt;p&gt;Thank you Kevin&lt;/p&gt;
&lt;p&gt;Much appreciate&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data type</title><link>https://communities.bentley.com/thread/721048?ContentTypeID=1</link><pubDate>Tue, 12 Jul 2022 15:08:52 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:bd8c30db-f187-4db9-9ab6-9081545b15d5</guid><dc:creator>Kevin van Haaren</dc:creator><description>&lt;p&gt;Oh, DOUBLE is for decimal numbers. Forgot that one. i don&amp;#39;t usually use it.&lt;/p&gt;
&lt;p&gt;Also, beware the trap of thinking somethine will always be a number, you&amp;#39;ll get burned when it suddenly isn&amp;#39;t (for example, US Zip codes suddenly adding a -#### to the end of what was a 5 digit number). I also never store phone numbers as numbers, always strings.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data type</title><link>https://communities.bentley.com/thread/721047?ContentTypeID=1</link><pubDate>Tue, 12 Jul 2022 15:06:29 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:40d77fb7-9bc6-4b4b-b0f0-bb38c9714b6e</guid><dc:creator>Kevin van Haaren</dc:creator><description>&lt;p&gt;The data types are specific to the database server you are using. If you are using SQL Server as your database most of the data types are here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.microsoft.com/en-us/sql/t-sql/data-types/data-types-transact-sql?view=sql-server-ver16"&gt;https://docs.microsoft.com/en-us/sql/t-sql/data-types/data-types-transact-sql?view=sql-server-ver16&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;there is also a good list here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.w3schools.com/sql/sql_datatypes.asp"&gt;https://www.w3schools.com/sql/sql_datatypes.asp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Turning on native datatypes allows you to type in one of the data types for your database server that isn&amp;#39;t in the drop down list. I would avoid this until you are very, very, sure of what you are doing (I&amp;#39;ve still never done it)&lt;/p&gt;
&lt;p&gt;Generally I use 3 types:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NVARCHAR - Text&lt;/li&gt;
&lt;li&gt;INT - &amp;quot;small&amp;quot; numbers =&amp;gt; max/min of +/- 2 billion&lt;/li&gt;
&lt;li&gt;BIGINT - &amp;quot;big numbers&amp;quot; =&amp;gt; max/min of&amp;nbsp;&lt;span&gt;-9,223,372,036,854,775,808 to&amp;nbsp;9,223,372,036,854,775,807&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;Occasionally i use CHAR with a length of 1 to store Y/N values, but the logic on&amp;nbsp;that gets hard, i probably should start using BOOLEAN for those types (that&amp;#39;s a native type though)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;SQL Server has a maximum row length of 8000 bytes so you want to pick INT (4 bytes/number) and BIGINT (8 bytes/number) for the appropriate data you&amp;#39;re using. Undersizing is hard to fix. I generally only need BIGINT when storing file sizes in bytes or time stamps in milliseconds, other engineering applications may have more use cases.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;the NVARCHAR and NCHAR are the datatypes for unicode strings. I prefer this as it handles a much wider range of characters correctly (including emoji) better. Setting the length of NVARCHAR is tricky. I usually estimate the biggest string I plan on storing and double that. Generally I pick 25, 50 or 100 unless it&amp;#39;s a generic &amp;quot;comments&amp;quot; or &amp;quot;notes&amp;quot; field in which case I&amp;#39;ll usually go to 200 or even 500. People names and Company Names I think I usually pick 50. Not sure if I&amp;#39;ve gotten burned on that yet. email typically 50 but I may start using 100, there are some incredibly long email addresses.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Here&amp;#39;s microsoft&amp;#39;s info on NCHAR and NVARCHAR.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql?view=sql-server-ver16"&gt;docs.microsoft.com/.../nchar-and-nvarchar-transact-sql&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>