Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Good practice for column name length
Message
From
01/02/2017 11:36:23
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Microsoft SQL Server
Category:
Database design
Miscellaneous
Thread ID:
01647250
Message ID:
01647259
Views:
41
>Hi,
>
>Currently my application stores all preferences in several XML files. I am working on converting this approach to storing the preferences in a SQL Server table. The table name will be Preferences. In the XML files, the tag names usually correspond to the preference (for easy reading). For example, it could be 'require_labor_entry_when_closing_order'. I am thinking of replicating this XML tag names into the field/column names in the SQL Server. So the field in the SQL server table will be 'require_labor_entry_when_closing_order' type: Char(1).
>
>Is having these long field/column names in SQL Server a bad practice? TIA

IMHO long names are fairly well. However, you are saying "preferences", then looks like there is a problem in design. I wouldn't expect you to have 'require_labor_entry_when_closing_order' as a field name but rather as a value in "Property" name column. You could save your properties as:

Property, Value ( some more additional fields if you want like Section, ValueType ...).

Otherwise having many preferences might mean to go over allowed column count.
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform