4 ms·
Yes. But the whole point of sqlite is that i don't have to type in more code. Can't it just do all that for me? I should add that I know it is a minimal light
by projectramo 10y ago
Yes.
But the whole point of sqlite is that i don't have to type in more code. Can't it just do all that for me?
I should add that I know it is a minimal lightweight database, and that there are other ones that are much more feature rich and more complicated.
- dorfsmay 10y agoNo, the whole point of sqlite is to be able to use a relational data model instead of a text file. It sounds like you are needing a Relational Database server. PosgreSQL, DB2 and Oracle aren't that difficult to install on a laptop. I highly recommend using the same product in dev and prod.
- mikeash 10y agoI think you're looking at the wrong layer. SQLite is a specific database implementation, there's no reason to expect it to provide a wrapper around some other implementation too. One potential problem is that not all databases are created equal. SQLite may support features that other databases don't (or vice versa), or they may both support the same feature but with different syntax, and so code that works with one backend may not work with another. In any case, it sounds like you're after some sort of wrapper that can provide access to different database backends without your code needing to know or care what the current backend is. Something like ODBC would seem to fit the bill, and there is a SQLite driver for it.
- jimbokun 10y agoYou keep asking this and keep getting the same answer. Why do you expect the answer to change if you ask more times?
- projectramo 10y agoBecause the answer is not the answer to the question I asked, so if you think it is, I didn't ask it the right way. If I ask: -- why can't sqlite just scale for me. And you say: -- Well, its meant to be lightweight. There are other more powerful databases, or you can add more code to sqlite to make it scale. Its not that I didn't know all those things. Those were the premise to the question I asked.
- Kalium 10y agoThe things that make a database scale are fundamentally at odds with the things that make a database zero-configuration. You can get one or the other. The thing you want, a zero-configuration self-tuning automagical smart RDBMS, is not considered feasible. There. An answer to the question you asked. Incidentally, if you think that's unsatisfactory answer, I remind you that you're on a website linked to a startup accelerator.
- dorfsmay 10y ago> why can't sqlite just scale for me. Because it's not a client/server implementation, it's a single embedded library, and because part of the requirements were to use a single data file. Therefore, each process (all completely independent) accessing that file: -needs to lock the entire file (rather than tables/rows) -needs to flush and close the file after each write -cannot prioritize I/O across processes, one file open the file, read or write, close the file (as opposed to do all the writes at once for example) -cannot cache very effectively, every time a process writes, all the other processes have to re-load the file etc...