Subject Re: complex indexes vs index key fields
From Akshat Kapoor <akshat.kapoor@kapoorsons.in>
Date Fri, 31 Jul 2020 20:06:49 +0530
Newsgroups dbase.getting-started

> The MySQL documentation covers everything you need but it doesn't  get
> you started in SQL.  There are, however, plenty of SQL tutorials on the
> Internet.  I found https://www.w3schools.com/sql/default.asp useful as
> it highlights the fact, and gives examples, that different SQL servers
> use different syntax for some operations.
>
> The tutorials do, unfortunately, only cover the basics.  The syntax is a
> bit different to doing the same things in dBASE but it shouldn't give
> you any problems.  Once you get a bit deeper into SQL you should be able
> to get any help you need in the sql-server newsgroup.

Very True.

> All tables MUST have a primary key otherwise you won't be able to UPDATE
> or DELETE specific records.  This is often an autoinc type field but it
> can, in fact, consist of multiple fields.  For instance, the primary key
> for your energydata could be a combination of siteId and eTimestamp.

I prefer autoinc as they do not require any maintenance. SiteID and
eTimestamp can serve as a combination but what will be there to prevent
accidental duplicates.
But I never encountered this kind of situation before hence cannot say.

> Something to bear in mind is that there are no soft deletes in SQL.  In
> ..dbf files records are not physically removed from the table when they
> are deleted.  They can actually be brought back using the RECALL command
> as long as this is done before the table is PACKed.  In SQL gone is
> gone.  It helps to have regular backups "just in case".  I don't use
> MySQL but Akshat will be able to help you with this.

Gone is GONE.
For backups I would recommend viewing the last few posts of the thread
"How can I restore MySQL database from a recovered hard disk" by Emeka
on 13th July 2020

That program is not for MySQL alone. With just change in a few lines of
the commands it can be used for firebird also, or for any other RDBMS
which offers command line utilities for backups.


Regards
Akshat


Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0