Posts

Showing posts from August, 2019

SQL SYNTAX

SQL Create Database :  MySQL: CREATE DATABASE database_name; Oracle: In oracle database one can create the tables directly.  SQL Drop Database : MySQL: DROP DATABASE database_name; SQL Rename Database : MySQL: RENAME  DATABASE  old_db_name  TO  new_db_name; SQL server using T-SQL: ALTER   DATABASE  old_name  MODIFY   NAME  = new_name;  SQL Select Database : MySQL: USE  DATABASE  database_name;  SQL Create Table : create   table   "tablename"   ( "column1"   "data type" ,  "column2"   "data type" ,  "column3"   "data type" ,  ...  "columnN"   "data type" );    NOTE: The datatype for MySQL is 'int' while for Oracle and SQLServer keyword used is 'number'.  Example: CREATE   TABLE  Employee (EmployeeID  int ,  FirstName  varchar (255), LastName ...

Data Structures

Image
INTRODUCTION: Data Structures is a representation of the logical relationship existing between the individual elements of data. It is the way of organizing all data items that considers not only the elements stored but also their relationship to each other. It specifies: Organization of data Accessing Methods Degree of associativity  Processing alternatives for information ALGORITHM + DATA STRUCTURE = PROGRAM     PRIMITIVE DATA STRUCTURES: Directly operated by machine instructions. Different representations on different computers. Examples include int, float, char, pointer, etc.  NON-PRIMITIVE DATA STRUCTURES: Derived from primitive data structures. Forms a group of Homogeneous or Heterogeneous data structures. LINEAR DATA STRUCTURES: Elements are connected in a linear fashion in sequence memory locations. Can be traverses in a single run. There are two ways to represent linear data structure in memory:  Static Memory Al...