Posts

What is the architecture of a DBMS?

Image
DBMS Architecture The DBMS design depends upon its architecture. The basic client/server architecture is used to deal with a large number of PCs, web servers, database servers and other components that are connected with networks. The client/server architecture consists of many and a workstation which are connected via the network. DBMS depends upon how users are connected to the database to get their request done. Types of DBMS Architecture Database architecture can be seen as a single tier or multi-tier. But logically, database architecture is of two types like:  2-tier architecture  and  3-tier architecture . 1-Tier Architecture In this architecture, the database is directly available to the user. It means the user can directly sit on the DBMS and uses it. Any changes done here will directly be done on the database itself. It doesn't provide a handy tool for end users. The 1-Tier architecture is used for development of the local application, where ...

What is 1G, 2G, 3G, 4G, and 5G technology?

1G - First Generation Cell phones began with 1G technology in the 1980s. 1G is the first generation of wireless cellular technology. 1G supports voice only calls. 1G is analog technology, and the phones using it had poor battery life and voice quality, little security, and were prone to dropped calls. The maximum speed of 1G technology is 2.4 Kbps. 2G - Second Generation Cell phones received their first major upgrade when their technology went from 1G to 2G. This leap took place in Finland in 1991 on GSM networks and effectively took cell phones from analog to digital communications. The 2G telephone technology introduced call and text encryption, along with data services such as SMS, picture messages, and MMS. Although 2G replaced 1G and is superseded by later technology versions, it's still used around the world. The maximum speed of 2G with General Packet Radio Service (GPRS) is 50 Kbps. The speed is 1 Mbps with Enhanced Data Rates for GSM Evolution (EDGE). Before...

What is the uses of int compareTo () method in Java?

Java.lang.String.compareTo() There are  three  variants of  compareTo()  method. This article depicts about all of them, as follows 1. int compareTo(Object obj)   :  This method compares this String to another Object. Syntax : int compareTo(Object obj) Parameters : obj : the Object to be compared. Return Value : The value 0 if the argument is a string lexicographically equal to this string; a value less than 0 if the argument is a string lexicographically greater than this string; and a value greater than 0 if the argument is a string lexicographically less than this string. public class Test {    public static void main(String args[]) {       String str1 = "Strings are immutable";       String str2 = new String("Strings are immutable");       String str3 = new String("Integers are not immutable");       int result ...

What is char charAt (int index) in Java, and how can I use it?

Java String charAt() method The Java String charAt() method returns the character at the specified index. The index value should lie between 0 and length()-1. Signature: public char charAt(int index) Parameter: index- Index of the character to be returned. Return: returns character at the specified position. Exception: StringIndexOutOfBoundsException- If index is negative or greater then the length of the String. Example: To show working of  charAt()  method class Gfg {      public static void main(String args[])      {          String s = "Welcome! to Java Planet" ;              char ch = s.charAt( 3 );          System.out.println(ch);              ch = s.charAt( 0 );          Syst...

What are concatenating strings in Java, and how do you use it?

String Concatenation in Java In java, string concatenation forms a new string  that is  the combination of multiple strings. There are two ways to concat string in java: By + (string concatenation) operator By concat() method 1) String Concatenation by + (string concatenation) operator Java string concatenation operator (+) is used to add strings. For Example: class TestStringConcatenation1{ public static void main(String args[]){ String s="Sachin"+" Tendulkar"; System.out.println(s);//Sachin Tendulkar } } Output:Sachin Tendulkar The  Java compiler transforms  above code to this: String s=(new StringBuilder()).append("Sachin").append(" Tendulkar).toString(); In java, String concatenation is implemented through the StringBuilder (or StringBuffer) class and its append method. String concatenation operator produces a new string by appending the second operand onto the end of the first operand. The string concatenation oper...

What is the use of Thread.sleep() method in Java?

Thread.sleep() : The  java.lang.Thread.sleep(long millis)  method causes the currently executing thread to sleep for the specified number of milliseconds, subject to the precision and accuracy of system timers and schedulers. Declaration Following is the declaration for  java.lang.Thread.sleep()  method public static void sleep(long millis) throws InterruptedException Parameters millis  − This is the length of time to sleep in milliseconds. Return Value This method does not return any value. Exception InterruptedException  − if any thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown. Example The following example shows the usage of java.lang.Thread.sleep() method. import java.lang.*; public class ThreadDemo implements Runnable { Thread t; public void run() {  for (int i = 10; i < 13; i++) {  System.out.println(Thread.currentThread().ge...

What are DBMS languages?

Image
Database Language A DBMS has appropriate languages and interfaces to express database queries and updates. Database languages can be used to read, store and update the data in the database. Types of Database Language   1. Data Definition Language DDL  stands for  D ata  D efinition  L anguage. It is used to define database structure or pattern. It is used to create schema, tables, indexes, constraints, etc. in the database. Using the DDL statements, you can create the skeleton of the database. Data definition language is used to store the information of metadata like the number of tables and schemas, their names, indexes, columns in each table, constraints, etc. Here are some tasks that come under DDL: Create:  It is used to create objects in the database. Alter:  It is used to alter the structure of the database. Drop:  It is used to delete objects ...