Thursday, August 22, 2024

Disk Operating System

A disk operating system (DOS) is a type of operating system that manages data on a disk storage device. It was widely used in the 1980s and 1990s, particularly on IBM-compatible personal computers. Understanding DOS commands is essential for users who still rely on DOS for certain tasks or for those who want to learn about the history of computing. DOS commands are also useful for troubleshooting and fixing problems on older systems. The purpose of this article is to provide an overview of basic and advanced DOS commands, as well as tips for using them effectively.


Definition of Disk Operating System(DOS)
A disk operating system (DOS) is a type of computer software that helps manage files and data stored on a computer's disk drive. It is like the traffic cop for a computer's hard drive, organizing and directing the flow of information. DOS used to be the primary operating system used on older computers, but nowadays it is mostly used for specific tasks or for troubleshooting older systems.


Advantages of using Disk Operating System(DOS)

We use disk operating systems (DOS) for several reasons, including −

File management − DOS provides a command-line interface for managing files and directories on a disk storage device. It allows users to copy, move, rename, delete, and view files and directories.

Program execution − DOS allows users to execute programs or applications directly from the command line. This was an important feature in the early days of computing when graphical user interfaces (GUIs) were not yet widely available.

Troubleshooting and system maintenance − DOS can be used for troubleshooting and repairing issues on older systems, as it provides a low-level interface to the hardware and file system.

Learning computing basics − Learning DOS commands is a good way to understand the basics of computing, including file systems, operating systems, and programming.


Types of DOS Commands

Internal Commands − Internal commands are the commands that are built into the command interpreter or the command prompt of the DOS operating system. These commands do not require a separate executable file to run and can be used directly from the command prompt.

External Commands − External commands in DOS are commands that are not built into the command interpreter, but are separate executable files that need to be located in the system's path or directory to be executed from the command prompt. External commands are usually more complex and are used for more advanced tasks than internal commands.






Internal DOS Commands
Internal or Basic DOS commands are simple and essential commands that users can use to interact with the file system and execute simple tasks. Here are some examples of basic DOS commands −

DIR − Displays a list of files and directories in the current directory.

CD − Changes the current directory to a specified directory.

MD − Creates a new directory.

RD − Removes an empty directory.

COPY − Copies a file from one location to another.

DEL − Deletes a file.

REN − Renames a file or directory.

TYPE − Displays the contents of a text file.

ECHO − Displays messages or turns command echoing on or off.

VER − Displays the version number of the operating system.

DATE − Displays or sets the system date.

TIME − Displays or sets the system time.

CLS − Clears the screen.

PROMPT − Change the command prompt.

TREE − Displays a graphical representation of the directory structure.

FC − Compares two files or sets of files and displays the differences between them.

FIND − Searches for a specific string of text in a file or files.

FINDSTR − Searches for a specific string of text in a file or files, with advanced search options.

PATH − Displays or sets the system's path variable, which tells the system where to look for executable files.

SET − Displays or sets the values of environment variables, which are used by the system and other programs.

SHIFT − Changes the position of command line arguments.

SORT − Sorts the contents of a file alphabetically or numerically.

TIMEOUT − Pauses the command processor for a specified number of seconds.

VERIFY − Turns file verification on or off.

VOL − Displays the volume label and serial number of a disk

APPEND − Allows programs to open data files in specified directories as if they were in the current directory.

ASSOC − Displays or modifies file extension associations

ATTRIB − Displays or modifies the attributes of a file.

BREAK − Controls the handling of extended keyboard CTRL+C and CTRL+BREAK input.

CHCP − Displays or sets the active code page number.

CHKDSK − Checks a disk for errors and attempts to repair them.

CLIP − Redirects command output to the Windows clipboard.

COMP − Compares the contents of two files or sets of files.

CONVERT − Converts a FAT partition to NTFS.

DEBUG − Starts Debug, a command-line tool for testing and debugging executable programs.

DISKCOMP − Compares the contents of two floppy disks.

DISKCOPY − Copies the entire contents of one floppy disk to another.

DOSKEY − Provides command-line editing and recall capabilities.

FCBS − Sets the number of file control blocks used by the system.

GRAPHICS − Turns graphics mode on or off.

External DOS Commands
ATTR − Displays or changes file attributes.

BOOTCFG − Configures, queries, or changes in the system startup settings.

CHOICE − Allows for a choice to be made from a list of options.

CIPHER − Displays or changes the encryption of directories and files on NTFS volumes.

CMDKEY − Creates, lists, or deletes stored user names and passwords or credentials.

COMMAND − Starts a new instance of the command interpreter.

DEBUGGER − Starts the kernel debugger for debugging the operating system.

DEFRAG − Optimizes the file system and increases the performance of the computer.

DISKPART − Manages disks, partitions, and volumes from the command line.

DRIVERQUERY − Displays a list of installed device drivers.

EVENTCREATE − Writes an entry to the application event log.

EXIT − Exits the command interpreter or batch script.

FORMAT − Formats a disk for use with Windows.

FSUTIL − Displays or configures file and volume properties.

HELP − Provides help information for Windows commands.

IPCONFIG − Displays network settings information.

LINK − Creates hard links and symbolic links to files and directories.

MMC − Starts Microsoft Management Console, a system administration tool.

NBTSTAT − Displays statistics for NetBIOS over TCP/IP protocols.

NET − Manages network resources, such as computers, printers, and services.

OPENFILES − Displays information about open files and the users who opened them.

PACKAGER − Packages and unpackages files to and from CAB files.

PING − Verifies network connectivity.

RDPSIGN − Signs Remote Desktop Protocol (RDP) files.

REMOTEACCESS − Manages remote access connections and virtual private network (VPN) connections.

SC − Configures and manages Windows services.

SCHTASKS − Schedules commands and programs to run at specific times or events.

SFC − Scans and verifies the integrity of all protected system files and replaces incorrect versions with correct Microsoft versions.

SHUTDOWN − Shut down or restart the local or remote computer.

TASKLIST − Displays a list of all running processes on the computer.







Monday, December 18, 2023

CREATE TABLE Statement

 

CREATE TABLE Statement

Table is a combination of rows and columns. For creating a table we have to define the structure of a table by adding names to columns and providing data type and size of data to be stored in columns.

Syntax:

CREATE table table_name(

Column1 datatype (size),

column2 datatype (size),

.

.

columnN datatype(size)

); 

CREATE TABLE Customer(
    CustomerID INT PRIMARY KEY,
    CustomerName VARCHAR(50),
    LastName VARCHAR(50),
    Country VARCHAR(50),
    Age int(2),
  Phone int(10) 

); 

Friday, September 15, 2023

Boolean Algebra

Boolean algebra is the branch of algebra in which the values of the variables are the truth values true and false. Mathematician George Boole Invented a new kind of algebra- the algebra of logic in the year 1854 popularly known as Boo

lean Algebra or Switching Algebra. Boolean algebra can be used to simplify the design of logic circuits. This method perform mathematical operation. An alternative method called the Karnaugh map can be used for the simplification of Boolean equations with up to four input variables.










Basic Laws of Boolean Algebra



  • Boolean Addition (OR Operation)
Boolean method involves variables having values of either a binary  1 or 0. The basic rules of Boolean addition are given below:


0+0 = 0
0+1= 1
1+0= 1
1+1= 1
  • Boolean Multiplication (AND Operation)
The basic rules of the Boolean multiplication method are as follows:
0.0 = 0
0.1= 0
1.0= 0
1.1= 1

Control Structures in Programming Languages

 

Control Structures in Programming Languages


Control Structures are  a way to specify flow of control in programs.  It basically analyzes and chooses in which direction a program flows based on certain parameters or conditions. There are three basic types of logic, or flow of control


  1. Sequential flow
  2. Conditional flow
  3. Iteration flow
1. Sequential Logic (Sequential Flow)

Sequential logic as the name suggests follows a serial or sequential flow in which the flow depends on the series of instructions given to the computer. Unless new instructions are given, the modules are executed in the obvious sequence. The sequences may be given, by means of numbered steps explicitly. Also, implicitly follows the order in which modules are written. Most of the processing, even some complex problems, will generally follow this elementary flow pattern.






Conditional Flow

In this flow structure instructions are proceed on this basis of given conditions.  The structures which use these type of logic are known as Conditional Structures. These structures can be of three types:

  • Single Flow (Only If)
    If (condition) then:
         [Module A]   
    [End of If structure]

Double Flow (If... Else....)Structure
If (Condition), then:
     [Module A]
Else:
     [Module B]
[End if structure]





C Language

 

Introduction of C Language

C is a general-purpose, procedural programming language. It was initially developed by Dennis Ritchie in the year 1972 at the Bell Telephone Laboratories . It was mainly developed as a system programming language to write an operating system. The main features of C language include low-level access to memory, a simple set of keywords, and clean style, these features make C language suitable for system programmings like an operating system or compiler development.



Basic Function of C Language

C programming language is a MUST for students and working professionals to become a great Software Engineer specially when they are working in Software Development Domain. I will list down some of the key advantages of learning C Programming:

  • Easy to learn

  • Structured language

  • It produces efficient programs

  • It can handle low-level activities

  • It can be compiled on a variety of computer platforms

Facts about C

  • C was invented to write an operating system called UNIX.

  • C is a successor of B language which was introduced around the early 1970s.

  • The language was formalized in 1988 by the American National Standard Institute (ANSI).

  • The UNIX OS was totally written in C.

  • Today C is the most widely used and popular System Programming Language.

  • Most of the state-of-the-art software have been implemented using C.


History of C Programming


The C programming language came out of Bell Labs in the early 1970s. According to the Bell Labs paper The Development of the C Language by Dennis Ritchie, “The C programming language was devised in the early 1970s as a system implementation language for the nascent Unix operating system. Derived from the  language BCPL, it evolved a type structure; created on a tiny machine as a tool to improve a meager programming environment.” Originally, Ken Thompson, a Bell Labs employee, desired to make a programming language for the new Unix platform. Thompson modified the BCPL system language and created B. However, not many utilities were ever written in B due to its slow nature and inability to take advantage of PDP-11 features in the operating system. This led to Ritchie improving on B, and thus creating C.
LanguageYearDeveloped By
Algol1960International Group
BCPL1967Martin Richard
B1970Ken Thompson
Traditional C1972Dennis Ritchie
K & R C1978Kernighan & Dennis Ritchie
ANSI C1989ANSI Committee
ANSI/ISO C1990ISO Committee
C991999Standardization Committee


Features of C Language

C is the widely used language. It provides many features that are given below.

  1. Simple
  2. Machine Independent or Portable
  3. Mid-level programming language
  4. structured programming language
  5. Rich Library
  6. Memory Management
  7. Fast Speed
  8. Pointers
  9. Recursion
  10. Extensible


Flow Control Structure of Programming


Control Structure







SQL (Structure Query Language)

What is SQL?

SQL stands for Structured Query Language. SQL became a standard of the American National Standards Institute (ANSI) in 1986, and of the International Organization for Standardization (ISO) in 1987.

SQL is Structured Query Language, which is a computer language for storing, manipulating and retrieving data stored in a relational database.

Applications of SQL

SQL is one of the most widely used query language over the databases. I'm going to list few of them here:

·        Allows users to access data in the relational database management systems.

·        Allows users to describe the data.

·        Allows users to define the data in a database and manipulate that data.

·        Allows to embed within other languages using SQL modules, libraries & pre-compilers.

·        Allows users to create and drop databases and tables.

·        Allows users to create view, stored procedure, functions in a database.

·        Allows users to set permissions on tables, procedures and views.


SQL Commands

1.   DDL - Data Definition Language

2.     DML - Data Manipulation Language

·        SELECT

·        INSERT

·        UPDATE            

·        DELETE

3.     DCL - Data Control Language

·        GRANT

·        REVOKE

4.   TCL – Transaction Control Language

    • COMMIT
    • ROLLBACK
    • SAVEPOINT


Data Integrity

The following categories of data integrity exist with each RDBMS −

  • Entity Integrity − There are no duplicate rows in a table.

  • Domain Integrity − Enforces valid entries for a given column by restricting the type, the format, or the range of values.

  • Referential integrity − Rows cannot be deleted, which are used by other records.

  • User-Defined Integrity − Enforces some specific business rules that do not fall into entity, domain or referential integrity.



SQL Constraints

Constraints are the rules enforced on data columns on a table. These are used to limit the type of data that can go into a table. This ensures the accuracy and reliability of the data in the database.

Constraints can either be column level or table level. Column level constraints are applied only to one column whereas, table level constraints are applied to the entire table.

Following are some of the most commonly used constraints available in SQL −

 

NOT NULL Constraint − Ensures that a column cannot have a NULL value.

DEFAULT Constraint − Provides a default value for a column when none is specified.

UNIQUE Constraint − Ensures that all the values in a column are different.

PRIMARY Key − Uniquely identifies each row/record in a database table.

FOREIGN Key − Uniquely identifies a row/record in any another database table.

CHECK Constraint − The CHECK constraint ensures that all values in a column satisfy certain conditions.