Page 1 of 5

SQLite

Posted: Sun Nov 30, 2014 2:21 pm
by SimonT
Hello.

I’m proud to announce that I implemented in the STHS a new functionality that I was thinking about for a long time, a flat file SQL database! It’s based on SQLite (http://www.sqlite.org/), a software library that implements a self-contained, server less, zero-configuration, transactional SQL database engine. Using php code (http://php.net/manual/en/book.sqlite.php), you can easily read this flat file SQL database and create a custom website with it. Since there is no MySQL database to run in the backend, it easy to setup, to maintain and to support (Ok, this part is for me only). Another advantage is that the database will get recreated from scratch by the STHS each time you output it. This means that to update your website, you simply need to upload the STHS database file each day like the other HTML file and STHS Client file; no funky database update with time-out or error.

You can find the information about the database here: http://sths.simont.info/DatabaseInfo.php
You’ll see the name of the database tables, their corresponding schema (Field Name & Data Type) and some extra information about some field name.

In the version 2.2.7, the databases will be available to output via manual command because I’m not 100% sure the code is bug prove. Doing SQL Insert command when you have over 60 columns is very error prone work. :( In 2.2.7, I want to give you the possibility to look at the DB and report errors or missing information (Data or Field Type) in the database.

Note: There is multiple of Windows Software that allows you to open a SQLite database. I’m using this one:http://sqlitedbrowser.sourceforge.net/

In the next months, I want to create a brand new STHS Website based on this STHS SQL database in PHP and offer it to everyone who used the STHS. The PHP code will be free of charge and you’ll be able to edit yourself after you download it from the STHS website. If anyone in interested in collaborating with me on this project, please contact me.

Thank you.

Re: SQLite

Posted: Sun Nov 30, 2014 3:19 pm
by LHSIadmin
dit moi ce que tu veux comme aide

Re: SQLite

Posted: Mon Dec 01, 2014 12:55 am
by ynohtna
wow that seems awesome! I keep having on the back of my mind to learn xpath to somehow read the xml files... I didn't feel like somehow loading csv's into MySQL... hope sqlite will be easier to deal with! Just don't have many minutes in the day to simply run the sim and upload files for my GMs :)

I keep promising these guys a better website, hopefully it will work out!

Can't wait to try it out.

Re: SQLite

Posted: Mon Dec 01, 2014 7:06 am
by RPHALabs
Simon,

This is absolutely fantastic. Well done. I am very excited to test this out and see what kind of results I can get.
I have gone through all the data tables, and the only addition request I could possibly see is to add the intProRankingOrder field that matches the League.xml file to one of the tables like the TeamProInfo or the TeamProStat. But this is very awesome

Thank you for your hard work

Re: SQLite

Posted: Tue Dec 02, 2014 7:06 pm
by SimonT
RPHALabs wrote:I have gone through all the data tables, and the only addition request I could possibly see is to add the intProRankingOrder field that matches the League.xml file to one of the tables like the TeamProInfo or the TeamProStat.
Done and HTML Link has been updated.

Re: SQLite

Posted: Sun Dec 07, 2014 10:22 pm
by SimonT
Hey guy.

With 2.2.7, you can now output the SQLLite Database with this manual command: 'Output SQLite Database’

If nobody report issue in the next 3 months, I'll put the option to allow the database to be output automatically in the next version.

Re: SQLite

Posted: Tue Dec 09, 2014 11:54 am
by SimonT
Note : I just find out the command will not work if you don't have the DLL available on your computer. :(

You can download the DLL here : http://sths.simont.info/DownloadFiles.p ... iteDll.zip and copy it in the same folder that your current .exe file.

Re: SQLite

Posted: Tue Dec 16, 2014 10:02 am
by shamrocks
How is the testing going with this? Do you have a demo website based on the SQLite data?

Re: SQLite

Posted: Tue Dec 16, 2014 12:29 pm
by myRPHA.com
I have outputted the STHS.db file and it is now in the hands of my RPHALabs people for analysis. I am waiting to hear the feedback. That's where the RPHA stands so far. Not sure about Simon's testing or anyone else.

Re: SQLite

Posted: Tue Dec 16, 2014 7:11 pm
by Str_QNHL
all my website is based on the CSV files so again .....please keep the CSV files up to date
and add the new info

Re: SQLite

Posted: Wed Dec 17, 2014 9:56 pm
by SimonT
I have 2 php file based on this (Pro and Farm Schedule) but I'll probably take me months to do this. The fact that I suck in CSS and design (As you can see by the STHS lack of design) doesn't help either. :(

Re: SQLite

Posted: Sat Dec 20, 2014 11:08 am
by JimToupet
SimonT offering a relationnal database will help many developper but I don't think that would change what is actually do with XML and CSV as the code is already there and running.

There's two things that would really, really help any web developpers :

- adding the season year (or id, or any unique season identification). Now, the way that work, importing a CSV, using XML or SQLlite ask to have as much table or file that you have simulated seasons. That's tough to maintain to any non or occasionnal developper.
- in the same way, be sure that ANY ID in all table/structure will be unique over time.

My 2 cents.

Re: SQLite

Posted: Sat Dec 20, 2014 11:19 am
by JimToupet
SimonT wrote:I have 2 php file based on this (Pro and Farm Schedule) but I'll probably take me months to do this. The fact that I suck in CSS and design (As you can see by the STHS lack of design) doesn't help either. :(
Proof of concept don't ask to be beautifull, just provide an "how to" to the community is enough for now I think. As the STHS developper, listen to the community, provide new stuff like that, it's already a big job.

Don't put on your shoulder to provide a full web portal. As a STHS user, I would prefer that energy is put to STHS over a portal.

Badly, I don't have enough time to build a team to create a portal or any site template but I'm sure somebody will be able to doing this shortly.

Re: SQLite

Posted: Fri Dec 26, 2014 5:40 am
by MarkSestero
I would be interested in collaborating with you on this.

Re: SQLite

Posted: Fri Dec 26, 2014 10:53 am
by SimonT
Cool. Send me an email and I'll exchange idea.