Any Approach for Case Sensitive Columns in SQLite
up vote
0
down vote
favorite
I have requirement of having same column names but in case sensitive manner for iOS project.
For Example:
CREATE TABLE TEST ( name TEXT, Name TEXT );
I know that SQLite's columns are case insensitive.
My current approach is using hash function to create unique number for each string.
func hashcode(columnname) -> String { }
I can use this hash code as my column name.
Is there any better approach for this problem?
sqlite sqlite3
add a comment |
up vote
0
down vote
favorite
I have requirement of having same column names but in case sensitive manner for iOS project.
For Example:
CREATE TABLE TEST ( name TEXT, Name TEXT );
I know that SQLite's columns are case insensitive.
My current approach is using hash function to create unique number for each string.
func hashcode(columnname) -> String { }
I can use this hash code as my column name.
Is there any better approach for this problem?
sqlite sqlite3
1
If you need case sensitive columns then you do something really wrong in your design.
– juergen d
Nov 19 at 11:52
Thanks for reply @juergend. Yes it is bad design for static tables. In my case, tables are created dynamically where my columns are defined by users. User can give Case Sensitive column names. If Sqlite supports this, It would be easy to implement my use case. :)
– Vigneshkumar G
Nov 19 at 12:26
1
tables are created dynamically - that is even worse.
– juergen d
Nov 19 at 12:47
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have requirement of having same column names but in case sensitive manner for iOS project.
For Example:
CREATE TABLE TEST ( name TEXT, Name TEXT );
I know that SQLite's columns are case insensitive.
My current approach is using hash function to create unique number for each string.
func hashcode(columnname) -> String { }
I can use this hash code as my column name.
Is there any better approach for this problem?
sqlite sqlite3
I have requirement of having same column names but in case sensitive manner for iOS project.
For Example:
CREATE TABLE TEST ( name TEXT, Name TEXT );
I know that SQLite's columns are case insensitive.
My current approach is using hash function to create unique number for each string.
func hashcode(columnname) -> String { }
I can use this hash code as my column name.
Is there any better approach for this problem?
sqlite sqlite3
sqlite sqlite3
asked Nov 19 at 11:51
Vigneshkumar G
113
113
1
If you need case sensitive columns then you do something really wrong in your design.
– juergen d
Nov 19 at 11:52
Thanks for reply @juergend. Yes it is bad design for static tables. In my case, tables are created dynamically where my columns are defined by users. User can give Case Sensitive column names. If Sqlite supports this, It would be easy to implement my use case. :)
– Vigneshkumar G
Nov 19 at 12:26
1
tables are created dynamically - that is even worse.
– juergen d
Nov 19 at 12:47
add a comment |
1
If you need case sensitive columns then you do something really wrong in your design.
– juergen d
Nov 19 at 11:52
Thanks for reply @juergend. Yes it is bad design for static tables. In my case, tables are created dynamically where my columns are defined by users. User can give Case Sensitive column names. If Sqlite supports this, It would be easy to implement my use case. :)
– Vigneshkumar G
Nov 19 at 12:26
1
tables are created dynamically - that is even worse.
– juergen d
Nov 19 at 12:47
1
1
If you need case sensitive columns then you do something really wrong in your design.
– juergen d
Nov 19 at 11:52
If you need case sensitive columns then you do something really wrong in your design.
– juergen d
Nov 19 at 11:52
Thanks for reply @juergend. Yes it is bad design for static tables. In my case, tables are created dynamically where my columns are defined by users. User can give Case Sensitive column names. If Sqlite supports this, It would be easy to implement my use case. :)
– Vigneshkumar G
Nov 19 at 12:26
Thanks for reply @juergend. Yes it is bad design for static tables. In my case, tables are created dynamically where my columns are defined by users. User can give Case Sensitive column names. If Sqlite supports this, It would be easy to implement my use case. :)
– Vigneshkumar G
Nov 19 at 12:26
1
1
tables are created dynamically - that is even worse.
– juergen d
Nov 19 at 12:47
tables are created dynamically - that is even worse.
– juergen d
Nov 19 at 12:47
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53374060%2fany-approach-for-case-sensitive-columns-in-sqlite%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
If you need case sensitive columns then you do something really wrong in your design.
– juergen d
Nov 19 at 11:52
Thanks for reply @juergend. Yes it is bad design for static tables. In my case, tables are created dynamically where my columns are defined by users. User can give Case Sensitive column names. If Sqlite supports this, It would be easy to implement my use case. :)
– Vigneshkumar G
Nov 19 at 12:26
1
tables are created dynamically - that is even worse.
– juergen d
Nov 19 at 12:47