Store with SQLite

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Store with SQLite

Shiro Ogawa
I started using SQLite for Store in wv8.0 Windows 7 and found it very convenient to use for Store in a single user environment. There is no need to run a server program. All the information is stored in one file. This makes backup and moving data base among computers simple and reliable.

I use 32 bit vm in 64 bit OS, so copied 32 bit sqlite3.dll in "\Windows\SysWOW64\"

"Source Code Management Guide P46-0138-09" has errors in Configuring Store/SQLite Setup in page 3-7. 

At Step 3.
For the database Environment string, enter the absolute or relative
(to the current VisualWorks image directory) location where the
SQLite database file should be created.

I found the string must be a database table name, not the location. If only a table name is entered, the table is made in the image directory. If the table be created in another directory, the full path must be entered, such as "C:\\Cincom\\Store\\StoreTable" (in Windows environment, back slashes must be doubled as they are treated as escape character). 

At Step 9.
When you are prompted for a database identifier, enter a string
that will uniquely identify this Store database within your
organization.

I think this database identifier is ignored. What counts is the database table name in Environment string.

James Robertson's video, 

which Aik-Siong Koh mentioned, was very helpful. Thanks James, I wish you kept doing webcasting.

Shiro Ogawa


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Store with SQLite

Niall Ross (Cincom)
Dear Shiro,

>I started using SQLite for Store in wv8.0 Windows 7 and found it very
>convenient to use for Store in a single user environment. There is no need
>to run a server program. All the information is stored in one file. This
>makes backup and moving data base among computers simple and reliable.
>
>I use 32 bit vm in 64 bit OS, so copied 32 bit sqlite3.dll in
>"\Windows\SysWOW64\"
>
>"Source Code Management Guide P46-0138-09" has errors in Configuring
>Store/SQLite Setup in page 3-7.
>
>At Step 3.
>*For the database Environment string, enter the absolute or relative*
>*(to the current VisualWorks image directory) location where the*
>*SQLite database file should be created.*
>
>I found the string must be a database table name, not the location.
>
Do you mean it must be the full filename, not just the directory
location in which the file resides?  That is correct (and is the
intended meaning of the text).

(What you actually write implies the filename needs to be the name of a
table in the database but that is not so and I assume that is not what
you mean.).

>If only
>a table name is entered, the table is made in the image directory. If the
>table be created in another directory, the full path must be entered, such
>as "C:\\Cincom\\Store\\StoreTable" (in Windows environment, back slashes
>must be doubled as they are treated as escape character).
>  
>
Doubling of \ is not needed in my Windows environment:  both
    C:\Cincom\Store\SomeTableName
and
    C:\Cincom\Store\SomeOtherFilename
work fine for me.

>At Step 9.
>*When you are prompted for a database identifier, enter a string*
>*that will uniquely identify this Store database within your*
>*organization.*
>
>I think this database identifier is ignored. What counts is the database
>table name in Environment string.
>  
>
You will see this string in Store and RB windows in your image,
identifying the database you are looking at or the database(s) to which
your packages are reconciled.  You are quite right that the Store
Connection dialog accepts the full or relative path.  What I assume you
mean is that the Store connection-defining code does not call
#addLogical:environment: so that if you create a database in
    C:\Cincom\Store\MyFilename.db
and give it Store name
    'ShiroStoreDB'
then you will see 'ShiroStoreDB' in the title bar of a published
components window when connected to it but you will not be able to replace
    C:\Cincom\Store\MyFilename.db
with
    'ShiroStoreDB'
in your Store connection dialog.  This could be added;  it would need
calls of #addLogical:environment: and #removeLogical: to be hooked into
the Store connection-creation dialog.  I'm guessing the reason it has
not been is that most people simply save their Store connection when
they first define it, so finding it in the drop-down is even easier than
a short logical name would be.

>James Robertson's video,
>http://www.jarober.com/blog/blogView?showComments=true&printTitle=Setting_Up_Store_for_SQLite&entry=3451210218
>,
>
>which Aik-Siong Koh mentioned, was very helpful. Thanks James, I wish you
>kept doing webcasting.
>  
>
Sadly, James died about a year ago.  I too feel the loss of his
contributions, and his engaging personality.

            HTH
                   Niall Ross

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Store with SQLite

Shiro Ogawa
Thanks Niall. Yes, I thought "location" at Step 3 meant directory, not the file name. It would be less confusing, something like "database file name" is used. Or it would be nice if examples were given.

For doubling the back slashes, I tested with C, and it is necessary to do so. I doubled the back slashes when I tried in vw8.0, and it worked. So I misunderstood that doubling was necessary. 

I am not an expert on SQLite (and any database systems), so the following is my understanding of Store and database system. Please correct me if I am wrong. I think that SQLite is quite different from other database systems. I used PostgreSQL, and the environment string is used to connect to (login to) a database, which can have a number of tables for different Store repository. So  you have to specify the particular database table you want. SQLite database is determined by the database file name, which shows up in the Environment string. It seems that Database Identifier in SQLite, is not doing any work. Is it used just for reminder purposes?

Shiro

On Mon, Mar 23, 2015 at 11:44 AM, Niall Ross (Cincom) <[hidden email]> wrote:
Dear Shiro,

I started using SQLite for Store in wv8.0 Windows 7 and found it very
convenient to use for Store in a single user environment. There is no need
to run a server program. All the information is stored in one file. This
makes backup and moving data base among computers simple and reliable.

I use 32 bit vm in 64 bit OS, so copied 32 bit sqlite3.dll in
"\Windows\SysWOW64\"

"Source Code Management Guide P46-0138-09" has errors in Configuring
Store/SQLite Setup in page 3-7.

At Step 3.
*For the database Environment string, enter the absolute or relative*
*(to the current VisualWorks image directory) location where the*
*SQLite database file should be created.*

I found the string must be a database table name, not the location.

Do you mean it must be the full filename, not just the directory location in which the file resides?  That is correct (and is the intended meaning of the text).

(What you actually write implies the filename needs to be the name of a table in the database but that is not so and I assume that is not what you mean.).

If only
a table name is entered, the table is made in the image directory. If the
table be created in another directory, the full path must be entered, such
as "C:\\Cincom\\Store\\StoreTable" (in Windows environment, back slashes
must be doubled as they are treated as escape character).
 
Doubling of \ is not needed in my Windows environment:  both
   C:\Cincom\Store\SomeTableName
and
   C:\Cincom\Store\SomeOtherFilename
work fine for me.

At Step 9.
*When you are prompted for a database identifier, enter a string*
*that will uniquely identify this Store database within your*
*organization.*

I think this database identifier is ignored. What counts is the database
table name in Environment string.
 
You will see this string in Store and RB windows in your image, identifying the database you are looking at or the database(s) to which your packages are reconciled.  You are quite right that the Store Connection dialog accepts the full or relative path.  What I assume you mean is that the Store connection-defining code does not call #addLogical:environment: so that if you create a database in
   C:\Cincom\Store\MyFilename.db
and give it Store name
   'ShiroStoreDB'
then you will see 'ShiroStoreDB' in the title bar of a published components window when connected to it but you will not be able to replace
   C:\Cincom\Store\MyFilename.db
with
   'ShiroStoreDB'
in your Store connection dialog.  This could be added;  it would need calls of #addLogical:environment: and #removeLogical: to be hooked into the Store connection-creation dialog.  I'm guessing the reason it has not been is that most people simply save their Store connection when they first define it, so finding it in the drop-down is even easier than a short logical name would be.

James Robertson's video,
http://www.jarober.com/blog/blogView?showComments=true&printTitle=Setting_Up_Store_for_SQLite&entry=3451210218
,

which Aik-Siong Koh mentioned, was very helpful. Thanks James, I wish you
kept doing webcasting.
 
Sadly, James died about a year ago.  I too feel the loss of his contributions, and his engaging personality.

           HTH
                  Niall Ross



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Store with SQLite

Maarten Mostert

All database systems have different approaches of how to connect to them. They sort of come down to the same thing but they all have issues.

If you load the glorp test packages you can see more examples. 

 

regards,

 

@+Maarten,

> "Shiro Ogawa" <[hidden email]> |

Thanks Niall. Yes, I thought "location" at Step 3 meant directory, not the file name. It would be less confusing, something like "database file name" is used. Or it would be nice if examples were given.

For doubling the back slashes, I tested with C, and it is necessary to do so. I doubled the back slashes when I tried in vw8.0, and it worked. So I misunderstood that doubling was necessary. 
I am not an expert on SQLite (and any database systems), so the following is my understanding of Store and database system. Please correct me if I am wrong. I think that SQLite is quite different from other database systems. I used PostgreSQL, and the environment string is used to connect to (login to) a database, which can have a number of tables for different Store repository. So  you have to specify the particular database table you want. SQLite database is determined by the database file name, which shows up in the Environment string. It seems that Database Identifier in SQLite, is not doing any work. Is it used just for reminder purposes?
Shiro

On Mon, Mar 23, 2015 at 11:44 AM, Niall Ross (Cincom) <[hidden email]> wrote:
Dear Shiro,

I started using SQLite for Store in wv8.0 Windows 7 and found it very
convenient to use for Store in a single user environment. There is no need
to run a server program. All the information is stored in one file. This
makes backup and moving data base among computers simple and reliable.

I use 32 bit vm in 64 bit OS, so copied 32 bit sqlite3.dll in
"\Windows\SysWOW64\"

"Source Code Management Guide P46-0138-09" has errors in Configuring
Store/SQLite Setup in page 3-7.

At Step 3.
*For the database Environment string, enter the absolute or relative*
*(to the current VisualWorks image directory) location where the*
*SQLite database file should be created.*

I found the string must be a database table name, not the location.

Do you mean it must be the full filename, not just the directory location in which the file resides?  That is correct (and is the intended meaning of the text).

(What you actually write implies the filename needs to be the name of a table in the database but that is not so and I assume that is not what you mean.).

If only
a table name is entered, the table is made in the image directory. If the
table be created in another directory, the full path must be entered, such
as "C:\\Cincom\\Store\\StoreTable" (in Windows environment, back slashes
must be doubled as they are treated as escape character).
 
Doubling of \ is not needed in my Windows environment:  both
   C:\Cincom\Store\SomeTableName
and
   C:\Cincom\Store\SomeOtherFilename
work fine for me.

At Step 9.
*When you are prompted for a database identifier, enter a string*
*that will uniquely identify this Store database within your*
*organization.*

I think this database identifier is ignored. What counts is the database
table name in Environment string.
 
You will see this string in Store and RB windows in your image, identifying the database you are looking at or the database(s) to which your packages are reconciled.  You are quite right that the Store Connection dialog accepts the full or relative path.  What I assume you mean is that the Store connection-defining code does not call #addLogical:environment: so that if you create a database in
   C:\Cincom\Store\MyFilename.db
and give it Store name
   'ShiroStoreDB'
then you will see 'ShiroStoreDB' in the title bar of a published components window when connected to it but you will not be able to replace
   C:\Cincom\Store\MyFilename.db
with
   'ShiroStoreDB'
in your Store connection dialog.  This could be added;  it would need calls of #addLogical:environment: and #removeLogical: to be hooked into the Store connection-creation dialog.  I'm guessing the reason it has not been is that most people simply save their Store connection when they first define it, so finding it in the drop-down is even easier than a short logical name would be.

James Robertson's video,
http://www.jarober.com/blog/blogView?showComments=true&printTitle=Setting_Up_Store_for_SQLite&entry=3451210218
,

which Aik-Siong Koh mentioned, was very helpful. Thanks James, I wish you
kept doing webcasting.
 
Sadly, James died about a year ago.  I too feel the loss of his contributions, and his engaging personality.

           HTH
                  Niall Ross


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Store with SQLite

Mark Roberts
In reply to this post by Shiro Ogawa
Hi Shiro,

I'm just chiming in here to say that we will amend the documentation to
try and clarify two of the points you raised. It probably won't happen
until the next release later this year, but it's a simple enhancement
and an AR is in the queue.

Best regards,

M. Roberts
Cincom Systems, Inc.

On 3/24/2015 11:49 AM, Shiro Ogawa wrote:

> I am not an expert on SQLite (and any database systems), so the
> following is my understanding of Store and database system. Please
> correct me if I am wrong. I think that SQLite is quite different from
> other database systems. I used PostgreSQL, and the environment string
> is used to connect to (login to) a database, which can have a number
> of tables for different Store repository. So  you have to specify the
> particular database table you want. SQLite database is determined by
> the database file name, which shows up in the Environment string. It
> seems that Database Identifier in SQLite, is not doing any work. Is it
> used just for reminder purposes?
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc