Learn to Code via Tutorials on Repl.it

← Back to all posts
Database tips
LiamDonohue (167)

#1 Backup weekly

Why? Because something might get corrupted, and you wont lose all your data because guess what? you were smart and backed up you data

#2 Store Your Database on a separate server

I know this may seem difficult, but its actually pretty easy. All you need is a computer running Windows 2000 or later (it actually runs better on an Linux computer, but i could not find any spec requirements for that) and an Apache 2.4 Server

#3 Call any tables containing sensitive data

something random, like Funkybannanasplit

#4 Use MySQL opposed to SQLite

Why? Because MySQL is more secure

any suggestions? just tell me

Commentshotnewtop
CaptainAnon (88)

Autoescape user input before running it.

CaptainAnon (88)

What makes you think MySQL is more secure than SQLite?

LiamDonohue (167)

Both the SQLite and MYSQL have certain advantages. SQLite is file-based — the database consists of a single file on the disk, which makes it extremely portable and reliable. ... MySQL is secured, which makes it highly advanced, too. It can even handle a good amount of data and hence can be used at-scale.
@CaptainAnon

CaptainAnon (88)

@LiamDonohue I don't think this should be a consideration when writing code for a service, providing you use an ORM. You can start by using SQLite and if that doesn't scale well enough for your needs (because your application becomes popular) you can switch to something like Postgres. I'd argue that being a single file on the disk (rather than a server) means that there is no database server to be hacked (because of poor user configuration, etc.)

JacksonCowie (281)

Maybe use better formatting in your posts. E.g-Don't use Headers everywhere, Embolden more important parts of text etc...