Vikyath Ram has Published 150 Articles

How to get the list of all databases using JDBC?

Vikyath Ram

Vikyath Ram

Updated on 30-Jul-2019 22:30:26

3K+ Views

You can get the list of databases in MySQL using the SHOW DATABASES query.show databases;Following JDBC program retrieves the list of databases by executing the show databases query.Exampleimport java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; public class ShowDatabasesExample {    public static void main(String args[]) throws Exception {     ... Read More

How to get column count in a ResultSet in JDBC?

Vikyath Ram

Vikyath Ram

Updated on 30-Jul-2019 22:30:26

5K+ Views

You can get the column count in a table using the getColumnCount() method of the ResultSetMetaData interface. On invoking, this method returns an integer representing the number of columns in the table in the current ResultSet object.//Retrieving the ResultSetMetaData object ResultSetMetaData rsmd = rs.getMetaData(); //getting the column type int column_count = rsmd.getColumnCount();Let us ... Read More

Multi-access Channels and Random Access Channels

Vikyath Ram

Vikyath Ram

Updated on 30-Jul-2019 22:30:26

750 Views

Multi-access ChannelsMulti-access channels are network channels that allow several transmitters to communicate with a common receiver via a shared channel. These channels are also called multiple access (MAC) channels. The network channel may be a single cable or optical fiber connecting multiple nodes, or a portion of the wireless spectrum.Random ... Read More

How to create a table in Oracle using JDBC?

Vikyath Ram

Vikyath Ram

Updated on 30-Jul-2019 22:30:26

2K+ Views

You can create a table in a database using the CREATE TABLE query.SyntaxCREATE TABLE table_name(    column1 datatype,    column2 datatype,    column3 datatype,    .....    columnN datatype,    PRIMARY KEY( one or more columns ) );To create a table in a database using JDBC API you need to ... Read More

How to remove a record from an existing table in oracle database using JDBC API?

Vikyath Ram

Vikyath Ram

Updated on 30-Jul-2019 22:30:26

435 Views

You can remove a particular record from a table in a database using the DELETE query.SyntaxDELETE FROM table_name WHERE [condition];To delete a record from a table using JDBC API you need to −Register the Driver: Register the driver class using the registerDriver() method of the DriverManager class. Pass the driver class name ... Read More

How to count rows – count (*) and Java

Vikyath Ram

Vikyath Ram

Updated on 30-Jul-2019 22:30:26

8K+ Views

The SQL Count() function returns the number of rows in a table. Using this you can get the number of rows in a table.select count(*) from TABLE_NAME;Let us create a table with name cricketers_data in MySQL database using CREATE statement as shown below −CREATE TABLE cricketers_data(    First_Name VARCHAR(255),    Last_Name VARCHAR(255),   ... Read More

Bit-Map Protocol

Vikyath Ram

Vikyath Ram

Updated on 30-Jul-2019 22:30:26

3K+ Views

Bit-map protocol is a collision free protocol that operates in the Medium Access Control (MAC) layer of the OSI model. It resolves any possibility of collisions while multiple stations are contending for acquiring a shared channel for transmission.In this protocol, if a station wishes to transmit, it broadcasts itself before ... Read More

Token Passing in Bit-Map Protocol

Vikyath Ram

Vikyath Ram

Updated on 30-Jul-2019 22:30:26

2K+ Views

Bit-map protocol is a collision free protocol that operates in the Medium Access Control (MAC) layer of the OSI model. It resolves any possibility of collisions while multiple stations are contending for acquiring a shared channel for transmission. In this protocol, if a station wishes to transmit, it broadcasts itself ... Read More

FTP protocol client in Python

Vikyath Ram

Vikyath Ram

Updated on 30-Jul-2019 22:30:26

828 Views

The all important The FTP class in ftplib module implements the client side of the FTP protocol.To establish connection with a FTP server, obtain FTP object.con=FTP(hostname)The FTP class supports following methods −connect()Connect to the given host and port. The default port number is 21, as specified by the FTP protocol ... Read More

Package extension utility in Python

Vikyath Ram

Vikyath Ram

Updated on 30-Jul-2019 22:30:26

525 Views

When you want to add to the module search path for a specific package and work with resources included in a package, you need to use pkgutil module from Python library. It includes functions for changing the import rules for Python packages. It is also possible to load non-code resources ... Read More

Advertisements