mysql – Primary index vs clustered vs non clustered vs secondary index

Primary key is used to uniquely identify each row in a table. It has to be unique and cannot be nullable.

All other indexes are secondary.

A clustered index is the index upon which the rows are logically ordered in a table. Some database engines always cluster on a primary key (e.g. InnoDB). Some database engines can cluster on secondary indexes. Some don’t support clustering at all.

Do you get Kubuntu 18.04.3 multi-monitor support to launch apps on the primary screen?

Setting up a second display (HDMI output) on a laptop (Lenovo z70) with NVidia card / drivers (Kubuntu 18.04.3) and in the display settings, I set up the second monitor so that it is above the laptop / primary display (above in the display) there is a settings dialog).

But when I start a new application, it starts on the 2nd screen. Only if I set up my screen layout so that the screen of my laptop (primary) is to the left of the second screen, will it work with apps that start on the primary screen.

Running rxandr didn't change anything:
PRIMARY = "eDP-1-1"
SECONDARY = "HDMI-1-1"
xrandr –output $ {PRIMARY} –primary –mode 1920×1080 –pos 0x0 –rotate normal
–output $ {SECONDARY} –mode 1920×1080 –above $ {PRIMARY}
– output DP-1-1 –off
– Output HDMI-1-2 – off

The only way to make this work is to right-click an app's title bar. More Actions -> Special Window Settings -> First Placement – Force – Under the Mouse

Why does the "primary" screen setting only work if it is to the left of the other screens, and is there a way to do this other than removing multiple menu levels from an app title bar?

dnd 5e – Can I use a spiked shield as a weapon in my primary hand and is it a simple or warlike weapon?

Can I use a barbed shield in my primary hand as a weapon and is it a simple or warlike weapon?

The Lizardfolk entry in MM (p.204) contains a status block that contains the following elements:

  • STR 15 (+2)
  • Armor class 15 (natural armor, shield)
  • Multi-attack. The lizard people carry out two melee attacks, each with a different weapon.
  • Barbed shield. Melee weapon attack: Hitting +4 will reach 5 feet, one goal. Beat: 5 (1d6 + 2) piercing damage.

It also includes 3 other melee attack options (Bite, Heavy Club, and Javelin), presumably for use with multi-attack.

I want a spiked shield (1d6 + StrMod) in my & # 39; primary & # 39; Use your hand and leave my other hand empty. Is there anything in RAW that indicates that the Spiked Shield is a weapon that is prohibited in 5e?

The PHB (p.147) has a section on improvised weapons:

An improvised weapon contains every object that you can use in one or two
Hands like broken glass, a table leg, a pan, a wagon wheel,
or a dead goblin. An improvised weapon often resembles an actual weapon
Weapon and can be treated as such.

If you look at the graphic of the lizard people in the MM, you can clearly see a shield on the left arm, which consists of a kind of tortoiseshell and has two rather large spines that protrude forward (like a double-strike dagger mounted on the shield). It definitely looks like a weapon … well it is DM Fiat whether it is "like an actual weapon?

The PHB (p.146) has the following to say about weapon skills:

Your race, class and performance can certainly give you competence
Weapons or categories of weapons. The two categories are simple and
belligerent. Most people can use simple weapons with skill. These
Weapons include mace, mace and other weapons commonly found in the
Hands of citizens. Combat weapons, including swords, axes and
Polearms require more specialized training to be used effectively.

This means that there are two categories – simple and martial. The question then is, would this barbed shield "Do you need more specific training to use (d) effectively?""

And one last thing … When it comes to using the shield as an improvised weapon, keep the +2 to AC if, according to Jeremy Crawford, you use it as an improvised weapon.

SQL Server – Does Automatic Primary Key Increment Prevent Concurrent Inserts?

I have a SQL Server log table that is constantly being inserted. I want to revise the design of this table.

We are currently using a GUID as a PK because the software can generate it and we simply insert it. Hopefully, multiple insertions won't block each other. However, UniqueId is not a very efficient PK for a table, and our indexes are very large and fragmented.

If I change this column to a long With auto-increment activated. Will this become a simultaneous insertion bottleneck?

I don't need my primary key in any order. Just a unique id for this line?

Duplication – If all the associated attributes of an intended primary key are identical, is it still a real primary key?

I'll start with an example. If i have one person Table with the intended primary key Id::

+----+------+------------+-------------+
| Id | name |    DoB     |     SSN     |
+----+------+------------+-------------+
|  1 | John | 1901-01-01 | 111-11-1111 |
|  2 | Jane | 1902-02-02 | 222-22-2222 |
|  3 | John | 1901-01-01 | 111-11-1111 |
+----+------+------------+-------------+

Note Ids 1 & 3 have the same attributes; They both represent the same person.

Based on what we know about the theory behind what constitutes a primary key, I think it is well summarized here:

  • The primary key must uniquely identify each record.
  • A record's primary key value cannot be null.
  • The primary key value must exist when the record is created.
  • The primary key must remain stable. You cannot change the primary key fields.
  • The primary key must be compact and contain as few attributes as possible.

Consider the first bullet "The primary key must uniquely identify each record."In my example, I assume that everyone Id represents uniqueness, depends on what should really be considered unique. Another database entry? Yes. Another person (what should the records represent)? No.

So several times Ids represent what is functionally the same subject that produces the data that is present in 2 data sets. A kind of "two-to-one ID". I have not read anything that deals directly with the scenario presented in my example because it is a PK or not.

  1. Does this example violate the theory behind what constitutes a primary key?
    1. If not, does this example show a violation of major principles of database architecture, or can this concept be reduced to something as simple as "data duplication – cleanup"?

Many thanks.

mysql – Optimize primary key and index settings for multiple join tables

I have given these tables as follows.

  1. Order This is the main table where all details are stored, e.g. For example, the customer ID, the merchant ID, and the rider ID assigned to it. The order details such as total, subtotal, taxes and also customer data such as address width, length. In addition, all details are saved, e.g. B. when the order was accepted, finished and delivered.
CREATE TABLE `orders` (
  `orderID` varchar(12) NOT NULL,
  `customerID` mediumint NOT NULL,
  `merchantID` smallint NOT NULL,
  `riderID` smallint NOT NULL,
  `orderDateTime` timestamp NOT NULL,
  `subTotal` float NOT NULL,
  `tax` float NOT NULL,
  `total` float NOT NULL,
  `quantity` tinyint NOT NULL,
  `customerAddress` varchar(150) NOT NULL,
  `customerLatitude` float(10,8) NOT NULL,
  `customerLongitude` float(10,8) NOT NULL,
  `paymentID` varchar(30) NOT NULL,
  `paymentType` tinyint NOT NULL,
  `instructions` varchar(100) NOT NULL,
  `orderType` tinyint NOT NULL,
  `orderAcceptedDateTime` timestamp NOT NULL,
  `merchantUserAcceptedID` smallint NOT NULL DEFAULT '0',
  `orderAcceptedNotify` tinyint NOT NULL DEFAULT '0',
  `orderReadyDateTime` timestamp NOT NULL,
  `merchantUserReadyID` smallint NOT NULL DEFAULT '0',
  `orderReadyNotify` tinyint NOT NULL DEFAULT '0',
  `orderInDeliveryDateTime` timestamp NOT NULL,
  `orderInDeliveryNotify` tinyint NOT NULL DEFAULT '0',
  `orderPickerOrDeliveryDateTime` timestamp NOT NULL,
  `orderCancelDateTime` timestamp NOT NULL,
  `orderStatus` tinyint NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;


ALTER TABLE `orders`
  ADD PRIMARY KEY (`orderID`),
  ADD KEY `customerID` (`customerID`),
  ADD KEY `merchantID` (`merchantID`),
  ADD KEY `riderID` (`riderID`);
COMMIT;
  1. The second table is the orderLine. In principle, all articles relating to a specific order are saved in the table. Therefore, it refers to the order table above.
CREATE TABLE `orderLine` (
  `orderID` varchar(12) NOT NULL,
  `customerID` mediumint NOT NULL,
  `itemID` mediumint NOT NULL,
  `itemQuantity` tinyint NOT NULL,
  `itemPrice` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;


ALTER TABLE `orderLine`
  ADD PRIMARY KEY (`orderID`,`customerID`,`itemID`);
COMMIT;
  1. CustomerMessageLog is basically the order table above. We have this orderAcceptedNotify field that changes its value. The default is 0, then 1, which means that the order is accepted by the retailer, and 2 if the user has already been notified. Therefore, we save the message in this log so that the user can see all messages in the log. There can be different message IDs for different message types.
CREATE TABLE `customerMessageLog` (
  `orderID` varchar(12) NOT NULL,
  `customerID` mediumint NOT NULL,
  `messageID` tinyint NOT NULL,
  `messageDateTime` timestamp NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

ALTER TABLE `customerMessageLog`
  ADD PRIMARY KEY (`orderID`,`customerID`,`messageID`);
COMMIT;
  1. All notifications to the driver are stored in this table.
CREATE TABLE `riderMessageLog` (
  `orderID` varchar(12) NOT NULL,
  `customerID` mediumint NOT NULL,
  `riderID` smallint NOT NULL,
  `messageID` tinyint NOT NULL,
  `messageDateTime` timestamp NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;


ALTER TABLE `riderMessageLog`
  ADD PRIMARY KEY (`orderID`,`customerID`,`riderID`,`messageID`);
COMMIT;
  1. All messages communicated to the dealer are stored in this table.
CREATE TABLE `merchantMessageLog` (
  `orderID` varchar(12) NOT NULL,
  `customerID` mediumint NOT NULL,
  `merchantID` smallint NOT NULL,
  `messageID` tinyint NOT NULL,
  `messageDateTime` timestamp NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

ALTER TABLE `merchantMessageLog`
  ADD PRIMARY KEY (`orderID`,`customerID`,`merchantID`,`messageID`);
COMMIT;

The challenge now is that I have set the order ID to DDMMYYHHMMSS, which I receive from the user phone before the order is submitted for payment. Why I did this is the reason for the payment gateway that I have to order. On the other hand, I could also set it as an automatic increment and also insert all orders and order lines before payment. However, if the payment fails, this is another problem to deal with the inserted order and orderLine. So which method is the most effective. Also, do I want to hash the primary one when it is shown to the user?

mysql – How can I use the same primary key as a foreign key for multiple tables?

I am working on a school project. I have a table with employees with a specific employee ID. The employee ID in this table is the primary key. I have already set the employee ID as a foreign key for another table and am trying to use it as a foreign key for another table. How can I do that? I am currently receiving an error message saying "Duplicate foreign key". Thank you so much!

The primary microphone works, but the secondary microphone does not. The phone I have is an HTC Desire

They can hear me perfectly when I make a call, but when I plug in the headphone video chat, I make a video or put it on the speakerphone. It is transmitted and goes past the primary microphone to the secondary microphone. Can I get around this anyway and only use the primary microphone? I tried to clean the little hole but it made it worse.

loop – No new plugins or themes can be added on a WordPress multisite network from the primary site as an administrator. Error: ERR_TOO_MANY_REDIRECTS

I can't add new plugins or themes in a WordPress multisite network from the primary site as super administrator. It shows this error: ERR_TOO_MANY_REDIRECTS. However, I can access all pages, log into each site's dashboard, or even make changes to existing codes for installed plugins or themes. I cannot install new ones and the network is in a loop.

However, the problem can be avoided if I disable the multisite option with the following code in wp-config.php:

define('MULTISITE', false);
define('SUBDOMAIN_INSTALL', false);

Is there a permanent solution to this, where I don't have to deactivate my multisite network to add new plugins or themes?

Here is a copy of my wp-config.php (authentication / secrets have been removed for security reasons):

Here is a copy of my .htaccess:

# BEGIN WordPress
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - (L)

# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ (R=301,L)

RewriteCond %{REQUEST_FILENAME} -f (OR)
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - (L)
RewriteRule ^(wp-(content|admin|includes).*) $1 (L)
RewriteRule ^(.*.php)$ $1 (L)
RewriteRule . index.php (L)


# END WordPress

I tried the following:

  1. Deleting the browsing history, cookies and cache did not work
  2. Deactivating all active plug-ins from the primary location did not work
  3. Disable current topic - didn't work
  4. Renaming the .htaccess file to something else - didn't work

I tried to run the url via redirect-checker.org. This is the message you provided. The first URL is the URL that opens when I click on "Add new plugin". The second URL is the URL that WordPress redirects and gets stuck in the loop.

http://example.com/wp-admin/plugin-install.php
302 Found

http://example.com/wp-login.php?redirect_to=http%3A%2F%2Fexample.com%2Fwp-admin%2Fplugin-install.php&reauth=1
200 OK

I would appreciate your kind help and look forward to your reply.

cheers