Maximum Length of Data in a BLOB Column in MySQL

Giri Raju
Updated on 20-Jun-2020 08:30:05

4K+ Views

As we know that BLOB is a binary large object that can hold a variable amount of data. The different TEXT objects offer a range of storage space from 255 bytes to 4 Gb. Following table shows the storage of different kinds of BLOB data type −Type of BLOBMaximum amount of Data that can be storedOverhead TINYBLOBUp to 255 bytes1 byteBLOBUp to 64 Kb2 bytes MEDIUMBLOBUp to 16 Mb3 bytes LONGBLOBUp to 4 Gb1 Bytes

Sort Words of a Sentence in Ascending Order using Python

karthikeya Boyini
Updated on 20-Jun-2020 08:29:57

1K+ Views

In order to sort the words of a sentence in ascending order, we first need to split the sentence into words using space as the splitting point. For simplicity, we'll only be splitting on space and let the punctuation be there. We can use replace or regex to remove that as well.Once we split the sentence, we can sort the words lexicographically(like in a language dictionary) using either sort or sorted methods depending on whether we want to sort the array in place or sort it, then return a new array.In place sorting: when we want to sort the array/list ... Read More

MySQL CONCAT Function for Combining Table Columns

Samual Sam
Updated on 20-Jun-2020 08:29:24

147 Views

We can use the output of CONCAT() function which is applied to the column/s of a MySQL with the column/s of another MySQL table. It can be done with the help of MySQL join.ExampleFor example, we have two table ‘Student’, having the details like id, Name, Last_name, Address and Subjects of the students, and ‘Remarks’, having the id and comments about the students. Now, the following query can combine CONCAT() function with another table column −mysql> Select * from remarks; +------+-------------+ | ID   | Comment     | +------+-------------+ | 1    | Good        | | ... Read More

Tokenize Text Using NLTK in Python

karthikeya Boyini
Updated on 20-Jun-2020 08:27:52

872 Views

Given a character sequence and a defined document unit, tokenization is the task of chopping it up into pieces, called tokens, perhaps at the same time throwing away certain characters, such as punctuation. In the context of nltk and python, it is simply the process of putting each token in a list so that instead of iterating over each letter at a time, we can iterate over a token.For example, given the input string −Hi man, how have you been?We should get the output −['Hi', 'man', ', ', 'how', 'have', 'you', 'been', '?']We can tokenize this text using the word_tokenize ... Read More

Wildcard Characters with MySQL CONCAT Function

Jai Janardhan
Updated on 20-Jun-2020 08:26:10

764 Views

As we know that wildcards are characters that help search data matching complex criteria. Wildcards are used in conjunction with LIKE comparison operator or NOT LIKE comparison operator. MySQL allows us to match the data, from the output of CONCAT() function, with the help of wildcard and comparison operators LIKE or NOT LIKE. An example from ‘Student’ table is given to make it clearer.Examplemysql> Select CONCAT(Name, ' ', Last_name) AS NAME from student Where CONCAT(Name, ' ', Last_Name) LIKE '%Kumar%'; +---------------+ | NAME          | +---------------+ | Gaurav Kumar  | | Harshit Kumar | +---------------+ ... Read More

Fiber Optic Communications

Samual Sam
Updated on 20-Jun-2020 08:23:46

3K+ Views

In fiber optic communication, data is transmitted from the source to the destination by sending light pulses through optical fibers. It changes electrical pulses to light signals and vice versa for communication. Fiber optic communications are preferred when a huge amount of data needs to be transmitted across large distances.The process of communication using fiber optics has the following steps −Conversion of input electrical data to light signals : The data to be sent by the sender is in the form of electrical signals. These signals are converted to light pulses by the transmitter circuitry using a light source. A ... Read More

Transmission of Light Through Fiber

karthikeya Boyini
Updated on 20-Jun-2020 08:23:07

7K+ Views

In fiber optic communication, signals are transmitted through an optical fiber. This is based upon certain characteristics of light, namely refraction and total internal reflection.RefractionWhen a light ray goes from a denser transmission medium to a rarer one or vice versa, then its direction changes at the interface of the two medium. This phenomenon is called refraction of light.The density of an optical medium is measured in refractive index. Higher the refractive index, denser it is.The angle between the incident ray and the normal is called angle of incidence Θi, while the angle between the refracted ray and the normal ... Read More

Fiber Cables

Samual Sam
Updated on 20-Jun-2020 08:22:49

2K+ Views

Optical fiber cables are transparent, flexible fibers made up of glass or plastic through which light waves can pass. A bunch of fiber optic cables is shown in the following diagram −Structure of a Fiber – Optic CableA cross section of a fiber optic cable reveals three parts −Core −  It is the innermost portion of an optical fiber through which light propagates. It is cylindrical in shape and it made up of a flexible glass of high refractive index. The diameter of the core of a single mode fiber is 8 – 10 μm while multimode fibers are 50 ... Read More

What MySQL Returns When Passing NULL in CONCAT Function

Rishi Raj
Updated on 20-Jun-2020 08:22:31

138 Views

As we know that CONCAT() function will return NULL if any of the argument of it is NULL. It means MySQL will return NULL if we pass column name, containing a NULL value, as one of the arguments of CONCAT() function. Following is an example of ‘Student’ table to explain it.ExampleIn this example, we are concatenating the values of two strings and at 5th row one, the value is NULL hence the concatenation result is also NULL.mysql> Select Name, Address, CONCAT(Name, ' Resident of ', Address)AS 'Detail of Student' from Student; +---------+---------+---------------------------+ | Name    | Address | Detail ... Read More

Comparison of Fiber Optics and Copper Wire

karthikeya Boyini
Updated on 20-Jun-2020 08:22:26

5K+ Views

Fiber optic cables are finding increasing usage due to a number of advantages over the traditional copper wires. However, there are a few flipsides in its usage too.Advantages of Fiber Optics Cables over Copper WiresFiber optic cables transmit data at much higher speed than copper wires. This is because the speed of light is greater than the speed of electrons.Fiber optic cables have a much larger bandwidth of over 60 Tbps in comparison to 10 Gbps bandwidth of copper wires.Fiber optic cables have very low attenuation. Repeaters need to be added only after every 50 km as compared to 5 ... Read More

Advertisements