IT Questions and Answers :)

Friday, December 6, 2019

In SQL, what does the ON UPDATE CASCADE command ensure?

In SQL, what does the ON UPDATE CASCADE command ensure?

  • Encryption
  • Data integrity
  • Normalization
  • Materialized views 
 In SQL, what does the ON UPDATE CASCADE command ensure?

EXPLANATION

In the SQL 2003 standard there are 5 different referential actions:
  1. CASCADE
  2. RESTRICT
  3. NO ACTION
  4. SET NULL
  5. SET DEFAULT
To answer the question:
  1. CASCADE
    • ON DELETE CASCADE means that if the parent record is deleted, any child records are also deleted. This is not a good idea in my opinion. You should keep track of all data that's ever been in a database, although this can be done using TRIGGERs. (However, see caveat in comments below).
    • ON UPDATE CASCADE means that if the parent primary key is changed, the child value will also change to reflect that. Again in my opinion, not a great idea. If you're changing PRIMARY KEYs with any regularity (or even at all!), there is something wrong with your design. Again, see comments.
    • ON UPDATE CASCADE ON DELETE CASCADE means that if you UPDATE OR DELETE the parent, the change is cascaded to the child. This is the equivalent of ANDing the outcomes of first two statements.
  2. RESTRICT
    • RESTRICT means that any attempt to delete and/or update the parent will fail throwing an error. This is the default behaviour in the event that a referential action is not explicitly specified.
      For an ON DELETE or ON UPDATE that is not specified, the default action is always RESTRICT`.
  3. NO ACTION
    • NO ACTION: From the manual. A keyword from standard SQL. In MySQL, equivalent to RESTRICT. The MySQL Server rejects the delete or update operation for the parent table if there is a related foreign key value in the referenced table. Some database systems have deferred checks, and NO ACTION is a deferred check. In MySQL, foreign key constraints are checked immediately, so NO ACTION is the same as RESTRICT.
  4. SET NULL
    • SET NULL - again from the manual. Delete or update the row from the parent table, and set the foreign key column or columns in the child table to NULL. This is not the best of ideas IMHO, primarily because there is no way of "time-travelling" - i.e. looking back into the child tables and associating records with NULLs with the relevant parent record - either CASCADE or use TRIGGERs to populate logging tables to track changes (but, see comments).
  5. SET DEFAULT
    • SET DEFAULT. Yet another (potentially very useful) part of the SQL standard that MySQL hasn't bothered implementing! Allows the developer to specify a value to which to set the foreign key column(s) on an UPDATE or a DELETE. InnoDB and NDB will reject table definitions with a SET DEFAULT clause.
As mentioned above, you should spend some time looking at the documentation, here.


Share:

Which Microsoft solution makes use of FSMO roles in its servers?

Which Microsoft solution makes use of FSMO roles in its servers?

  • Microsoft SQL
  • Microsoft Sharepoint
  • Microsoft Active Directory
  • Microsoft Exchange 2013 

 
Which Microsoft solution makes use of FSMO roles in its servers?

EXPLANATION

Because an Active Directory role is not bound to a single DC, it is referred to as a Flexible Single Master Operation (FSMO) role. Active Directory has five special roles that are vital for the smooth running of AD as a multi-master system.
Some functions of AD require an authoritative master to which all Domain Controllers can refer. These roles are installed automatically and normally you would not move them. However if you de-commission a DC and DCPROMO fails to run correctly or if you have a catastrophic failure of a DC you will need to know about these roles to recover or transfer them to another DC.


Share:

Thursday, December 5, 2019

Which of the following is not a standard US PSTN telecommunications method? E1/BRI SIP/VOIP T1/PRI Analog/POTS

Which of the following is not a standard US PSTN telecommunications method?

  • E1/BRI
  • SIP/VOIP
  • T1/PRI
  • Analog/POTS 

 
Which of the following is not a standard US PSTN telecommunications method?

EXPLANATION

Analog or Plain Old Telephone Service (POTS) are your standard (essentially) one line in per call telephone lines.  These were fairly inefficient for larger organizations due to the sheer volume of calls needed and the number of physical lines that would be needed to accomplish many concurrent calls, for example a call center needing the ability to work with 45 concurrent calls would need essentially 45 Analog lines (although, later uses of the lines could incorporate some usage of more than one call per physical line), which is both costly and takes up a large volume of real-estate (space).
In order to make multiple concurrent calls across one physical medium, the US telecommunications industry began to use T1 or PRI lines - which could support up to 23 concurrent calls over one "line" (or circuit).  So, for that same business to make approximately 45 concurrent calls, only *2* circuits would be required.
As demands increased yet again and higher-speed backbone connections became available, VoIP (Voice over Internet Protocol) or SIP trunks have become the de-facto standard for high-usage / high-volume (and even low-volume) environments.  The concurrent call limit per SIP or VoIP trunk is essentially limitless, bound *in-theory* only by the amount of bandwidth available to the destination/origin.
BRI circuits are essentially the same (or extremely similar) to the North American/US T1/PRI circuits, however, they are only found overseas/in European countries and NOT in the US.
*This question and the answers, including this explanation, are a simplification of many PSTN and Telecommunications terms and technologies.  Additional details and information can be found by searching Wikipedia, as well as other scholarly resources,  for the aforementioned terms,

SOURCE

https://en.wikipedia.org/wiki/Public_switched_telephone_network
Share:

Tuesday, December 3, 2019

Which is not a standard communication port for SMTP traffic?

Which is not a standard communication port for SMTP traffic?

  • 465
  • 110
  • 587
  • 25 

Which is not a standard communication port for SMTP traffic?

EXPLANATION

Communication between mail servers generally uses the standard TCP port 25 designated for SMTP

Mail clients however generally don't use this, instead using specific "submission" ports.
Mail services generally accept email submission from clients on one of:
  • 587
  • 465

SOURCE

https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol

Share:

What popular form of Mac specific malware discovered in July 2018 will enable remote login, enable screen sharing, add permissions for malicious actors, add remote login capabilities for all users, and add its own user account to a Mac?

What popular form of Mac specific malware discovered in July 2018 will enable remote login, enable screen sharing, add permissions for malicious actors, add remote login capabilities for all users, and add its own user account to a Mac?

  • Redyms
  • Kovter
  • OSX.Calisto
  • OSX.Imuler 
What popular form of Mac specific malware discovered in July 2018 will enable remote login, enable screen sharing, add permissions for malicious actors, add remote login capabilities for all users, and add its own user account to a Mac?

EXPLANATION

Discovered in the July of 2018 by Symantec, the OSX.Calisto Trojan remained undetected for at least two years. Apparently,
the backdoor was first uploaded to VIrusTotal in 2016. This malware can essentially provide malicious actors with full control over your Mac device and full access to the entirety of your data.

SOURCE

https://www.vipre.com/blog/mac-malware-cybersecurity/



Share:

Monday, December 2, 2019

DMARC builds on what other 2 industry standards to authenticate email?

DMARC builds on what other 2 industry standards to authenticate email?

  • DKIM and SPF
  • DKIM and SMTP
  • SPF and SMTP
  • DKIM and IMAP 
DMARC builds on what other 2 industry standards to authenticate email?

EXPLANATION

DMARC, which stands for “Domain-based Message Authentication, Reporting & Conformance”, is an email authentication, policy, and reporting protocol.
It builds on the widely deployed SPF and DKIM protocols, adding linkage to the author (“From:”) domain name, published policies for recipient handling of authentication failures, and reporting from receivers to senders, to improve and monitor protection of the domain from fraudulent email.

SOURCE

https://dmarc.org/
Share:

Wednesday, November 27, 2019

Excluding the host adapter, how many devices can be connected to a single narrow SCSI bus?

Excluding the host adapter, how many devices can be connected to a single narrow SCSI bus?

  • 8
  • 32
  • 7
  • 12 

EXPLANATION

Up to 8 devices can be attached to a single SCSI bus. One of these is the host adapter, leaving room for 7 'real' devices.

SOURCE

http://ask.microsemi.com/app/answers/detail/a_id/1971/~/how-many-scsi-devices-can-be-attached-on-a-scsi-controller%3F
Share:

Popular Posts