• Welcome to SQLitening Support Forum.
 

News:

Welcome to the SQLitening support forums!

Main Menu

Descriptive name for a table

Started by Fim, March 02, 2017, 12:17:18 PM

Previous topic - Next topic

Fim

Are there any tricks to give a table a descriptive name like"Ink
Fim W

Bern Ertl

What do you mean by "tricks"?  Naming tables/columns is a lot like naming a variable in your code.  You can use long, descriptive names that help with readability/maintenance or you can use short, non-descriptive names that provide some convenience for typing (but are terrible for readability/maintenance).

One consideration is whether or not you want anyone (end user, 3rd party developer) to be able to look at your database and figure out your data schema. 

cj

#2
Maybe something like this where you can work with the first 3 letters?
t01IRA
t02APL
t03ARB
t67ART

Bern Ertl

Oh, upon re-reading the OP I now understand the question was about handling table/column names that contain characters like "

cj

#4

Doesn't work with SQLite Expert Professional 3.5.96.2516

http://www.sqliteexpert.com/history.html
The latest version is 4.2.0.745
Bern is correct.  The author should be contacted.
I did not buy the update or use the 30-day trial of 4.2.0.745.

First image from SQLite Expert Professional showing an error.
Second image from PowerBASIC.


%KillDatabase=1
#INCLUDE "sqlitening.inc" 'fim1.bas   
FUNCTION PBMAIN () AS LONG
LOCAL x AS LONG
IF %KillDatabase THEN KILL "cj.db3":ERRCLEAR

slOpen "cj.db3","C"
slexe "create table if not exists Ink

Fim

Many thanks for any advice and your dedication. But I have probably not been able to bring out what I'm after, I want to have two names on a table, and a short name, eg. IRA as well as a longer descriptive such as Purchase-Order-lines. What I can understand is not possible. So we end the matter.
/Fim W
Fim W

cj