Tutorial Zone
Thursday, August 22, 2024
Disk Operating System
Monday, December 18, 2023
CREATE TABLE Statement
CREATE TABLE Statement
A 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)
);
Sunday, September 17, 2023
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)
0+0 = 0
|
0+1= 1
|
1+0= 1
|
1+1= 1
|
- Boolean Multiplication (AND Operation)
0.0 = 0
|
0.1= 0
|
1.0= 0
|
1.1= 1
|
Control Structures in Programming Languages
Control Structures in Programming Languages
- Sequential flow
- Conditional flow
- Iteration 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.
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....)StructureIf (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
Language | Year | Developed By |
---|---|---|
Algol | 1960 | International Group |
BCPL | 1967 | Martin Richard |
B | 1970 | Ken Thompson |
Traditional C | 1972 | Dennis Ritchie |
K & R C | 1978 | Kernighan & Dennis Ritchie |
ANSI C | 1989 | ANSI Committee |
ANSI/ISO C | 1990 | ISO Committee |
C99 | 1999 | Standardization Committee |
Features of C Language
C is the widely used language. It provides many features that are given below.
- Simple
- Machine Independent or Portable
- Mid-level programming language
- structured programming language
- Rich Library
- Memory Management
- Fast Speed
- Pointers
- Recursion
- Extensible
Flow Control Structure of Programming
Control Structure
SQL (Structure Query Language)
What is SQL?
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.