6
How to create a simple database without using a server?
I believe the answer would be no, but check the following:
I’m at work and I don’t have access to the databases or even the servers. This way I can work only on the local network and shared folders.
I can not connect USB to the machine and also I am not computer admin.
The information I need to store is few and simple, without the need to use a database.
- The people who will make changes or inclusions in this information are a working team, with no possibility of simultaneous editions.
- Not everyone can edit the code through the editor, because of this looking for other ways to include information on the page.
The idea would be to create a simple form in IE8, because I only have access to it.
- HTML : It has two presses one for insertion and another that receives the information
- Knob: "Save" this runs a
documento1.js
which identifies the entered fields and saves the fields in any extension.
What do I have:
- I can store by Javascript the information typed in a file
.js
among others. - I can save the file as for example
documento2.js
, giving a var to each input field, so I can identify the fields later. - The
documento2.js
click onhead
HTML, so any update to the document giving F5 HTML access.
What I lack:
I need the form that will return results to automatically recognize the fields in the documento2.js
.
<td name="recebe" id="Campo01">
(aqui o codigo que preciso para trazer um resultado que esteja no documento2.js com a identificação "Campo01")
</td>
*If necessary I could change the file extension to save the information, I just need HTML to reload this file on head
and populate some fields according to the data of this file.
Or is there a less complicated solution to work saving information off?
I think creating an XML file would be the right thing to do
– CesarMiguel
Via HTML5 you have Local Storage at your disposal: http://www.html5rocks.com/en/features/storage
– OnoSendai
You need this information to be portable? (i.e. that you can transport them from the computer A pro B) if the answer is nay, you can use something like Local Storage, Indexed DB or Web SQL. If it is yes, maybe it is better to use an HTTP mini-server that you can load on a USB stick, for example (there are several language and technology options to implement this).
– mgibsonbr
Onosendai: I won’t be able to use Google Chrome, as not everyone who views it will. mgibsonbr: Yes I need that the information contained in the page can be viewed on other computers on the same network.
– Cleverson
@Cleverson The Local Storage is supported on virtually every browser, including IE8. But that’s irrelevant, since what you want is a little more complicated... I don’t know if I can answer this question in this format, because it’s a little too wide, but I’ll try.
– mgibsonbr
Couldn’t you make your machine a web server with a database? (of course, this only makes sense if there is no restriction on this: some kind of computer policy).
– cantoni
Or could use a Sqlite would not be practical ?
– Otto
Maybe I’m talking nonsense but what if I use a SQLITE database file with Noje.JS? As far as I could see is how the blog platform Ghost opera.
– Bruno Augusto
You have to be careful with Dead-Lock, this can occur every time a user has locked a record in a table and your next step will be to lock a record in a table related to the first, but if this record is locked by another user, the first user will be paralyzed, because, will be waiting for the second user to release the record in use, so that then can lock it and continue its task.
– Alex Schmitt