Jump to content
FrancescoDiMuro

Which programming language deserves to be learned?

Recommended Posts

Earthshine

many are very similar too. learning a new one isn't that big a deal if you already understand how similar ones work.


My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
FrancescoDiMuro

Good morning guys! :)

Thanks again for your "support" :)

@matwachich So, do you think is a good idea involve AutoIt and SQLite UDF on a "Management" project?

Probably, the database file will be on our company server, and sometimes, a maximum of 3 people could query the database ( to retrieve information, so, no new records or updates ).

@jchd Do you think SQLite fits well in a project like this? 

I'd like to have your opinion too, just because, since I am here, I've always seen you talking about databases and, mainly, SQLite :)

Thanks again guys!

Best Regards.


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites
jchd

Despite SQLite being a serverless RDBMS it works like a charm in this configuration. Even if DB writes take place intermitently you shouldn't have any issue. If you have to issue writes, I'll show you how to build your SQL statements blocks to avoid deadlocks and pitfalls.

It's very easy to build a simple sketch application and try it in close to real-world conditions. The DB design will be, as always and regardless of the actual DB engine used, the key factor to speed and flexibility for future evolutions. If that doesn't fit your requirements, you can always switch to a full-fledged client-server engine but I don't see any urge given your description.

If you need advices regarding the DB design, just ask. I warmly recommend first trying SQLite Expert to build the DB and all the queries you'll be using. It makes it very easy to change the DB design on the fly until everything works smoothly. Only then start coding your app.


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites
FrancescoDiMuro

Good morning @jchd:)
Yes, it would be very helpful if you could suggest to me ( or to the community! ) some tips to build an efficient DB :)

It would be nice if you could a sort of "list" of "Things to do if you want to create an efficient DB" :D

7 minutes ago, jchd said:

but I don't see any urge given your description.

Yes, I don't :)
In our company, the application would be used from 3/4 maximum users, and maximum 2 of them could write to the DB in the same time.
Thanks a lot for your help :)

Best Regards.


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites
jchd

OK. Then follow this guide:

Use transactions. For each connection to the DB, set a very large timeout (_SQLite_SetTimeout) like 30 minutes or such. The timeout has to be larger than any possible sequence of transactions issued by other processes. Even if the actual meaning and reasonning behind this sentence escapes you now, don't hesitate to use a largish (huge) value.

Enclose each sequence of SQL statements in "begin immediate; ...; commit" transaction. Keep transactions simple and fast!

Things not to do: inside a given transaction, read (select) a number of rows, display them to the user and wait until (s)he modifies stuff and then write back (update). If the user pauses for lunch (or dies or his/her PC crashes...) in the middle of this transaction, other users will see a locked DB.

Instead if this situation may arise, use an extra column to indicate "row is being locked for possible update". So in a first transaction, you select rows, update them to mark them locked and commit. After that display them for possible update, then in a second transaction, update data and mark rows as unlocked. If another process selects rows marked as locked for update pending, show them as such and do't allow change on them. Alternatively, you can as well refuse showing anything and inform the second user that another process is working on (some of) the same data. What to do in this case depends on the context.

Following these simple rules, you're not going to encounter deadlocks or inconsistancies.

About good design practices, SQLite doesn't differ from any SQL engine. If you need advice on that, don't hesitate to ask by explaining the context, the various entities you'll be dealing with, their constraints and the relationships between entities (columns).


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites
Earthshine
Posted (edited)

If you get all those C# Tutorials done and want to do GUI apps, you should really invest some time learning the Model-View-ViewModel (MVVM) design pattern. much has been written. Good tutorials published. this is Advanced stuff though

https://msdn.microsoft.com/en-us/magazine/dd419663.aspx

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×