Subject Re: complex indexes vs index key fields
From Gaetano <gaetanodd@hotmail.com>
Date Mon, 3 Aug 2020 05:53:13 +1000
Newsgroups dbase.getting-started


Thanks, https://www.w3schools.com/sql/default.asp is indeed the link
that comes back on top of the options for any SQL syntax search, I found
it useful.

"followed up" from Thunderbird ;)
(I used "reply" the first time but that didn't have the expected result...)

On 01/08/2020 00:36, Akshat Kapoor wrote:
>> 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


Thanks, that

>> 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