Difference Question
Difference Question
QUESTIONS ON DIFFERENCE
RAM ROM
RAM is Random Access Memory ROM is Read-only Memory
Expensive Cheaper
High Speed Slow Speed
Data in RAM can be modified, erased, or read. Data in ROM can only be read, it cannot be modified
or erased.
The data stored in RAM is used by the Central The data stored in ROM is used to bootstrap the
Processing Unit (CPU) to process current computer.
instructions
Temporary Permanent
Low level languages are used to write the While high level languages are used to write the
system software. application software.
It is a general-purpose software. While its a specific purpose software.
Without system software, the stops system While without application software system always
can’t run. runs.
System software runs when the system is While application software runs as per the user’s
turned on and stop when the system is turned request.
off.
Example: System software is operating Example: Application software are Photoshop, VLC
system(Windows, Linux), etc. player etc.(MS Words, Paint, Adobe Reader)
1. Interactive mode
Script Mode, is used when the user is working with more than one single code or a block of code.
Useful for small programs of one or two lines
2. Script mode
Interactive mode is used when an user wants to run one single line or one block of code. If one
needs to write a long piece of Python code or if the Python script spans multiple files, interactive
mode is not recommended. In script mode, You write your code in a text file then save it with
a .py extension.
Useful for large programs
S= ‘MANGILAL ‘
X = 123
Y = 1.23
Z = X + Y
W = S * 2
In Explicit Type Conversion, users convert the data type of an object to required data type.
We use the built-in functions like int(), float(), str(), etc to perform explicit type conversion.
This type of conversion is also called typecasting because the user casts (changes) the data type of the
objects.
X = float( 55 //11 )
Y = int(input(“Enter you Number “)) # string is converted to int
Event Syntax Error vs Logical Error
** A syntax error is an error in the syntax of a A logical error is an error in a program that
sequence of characters or tokens that is causes it to operate incorrectly but not to
intended to be written in a particular terminate abnormally.
programming language.
Occurrence A syntax error occurs due to fault in the A logical error occurs due to a fault in the
program syntax. algorithm./ method / formulae
Detection In compiled languages, the compile indicates The programmer/user has to detect the error
the syntax error with the location and what by himself.
the error is.
Simplicity It is easier to identify a syntax error. It is comparatively difficult to identify a
logical error.
================================================================
SQL MySQL
SQL is a query programming language that MySQL is a relational database management system that
manages RDBMS. uses SQL.
SQL is primarily used to query and operate MySQL allows you to handle, store, modify and delete
database systems. data and store data in an organized way.
SQL does not support any connector. MySQL comes with an in-built tool known as MySQL
Workbench that facilitates creating, designing, and
building databases.
SQL follows a simple standard format without MySQL has numerous variants and gets frequent
many or regular updates. updates.
SQL supports only a single storage engine. MySQL offers support for multiple storage engines along
with plug-in storage, making it more flexible.
SQL does not allow other processors or even MySQL is less secure than SQL, as it allows third-party
its own binaries to manipulate data during processors to manipulate data files during execution.
execution.
1. CHAR datatype is used to store character VARCHAR datatype is used to store character
strings of fixed length strings of variable length
2. In CHAR, If the length of the string is less In VARCHAR, If the length of the string is less than
than set or fixed-length then it is padded the set or fixed-length then it will store as it is
with extra memory space. without padded with extra memory spaces.
3. CHAR stands for “Character” VARCHAR stands for “Variable Character”
4. Storage size of CHAR datatypes is equal to The storage size of the VARCHAR datatype is equal
n bytes i.e. set length to the actual length of the entered string in bytes.
5. We should use the CHAR datatype when We should use the VARCHAR datatype when we
we expect the data values in a column are expect the data values in a column are of variable
of the same length. length.
6. CHAR takes 1 byte for each character VARCHAR takes 1 byte for each character and some
extra bytes for holding length information
9. Better performance than VARCHAR Performance is not good as compared to CHAR
Structured Query Language(SQL) as we all know is the database language by the use of which we can
perform certain operations on the existing database and also we can use this language to create a
database. SQL uses certain commands like Create, Drop, Insert, etc. to carry out the required tasks.
These SQL commands are mainly categorized into four categories as:
1. DDL – Data Definition Language
2. DQL – Data Query Language
3. DML – Data Manipulation Language
4. DCL – Data Control Language
5. TCL – Transaction Control Language
DDL (Data Definition Language):
DDL or Data Definition Language actually consists of the SQL commands that can be used to define the
database schema. List of DDL commands: CREATE: DROP: ALTER:
DML(Data Manipulation Language): The SQL commands that deals with the manipulation of
data present in the database belong to DML or Data Manipulation Language and this includes
most of the SQL statements.
List of DML commands:
INSERT : It is used to insert data into a table.
UPDATE: It is used to update existing data within a table.
DELETE : It is used to delete records from a database table.
DCL (Data Control Language):
DCL includes commands such as GRANT and REVOKE which mainly deal with the rights, permissions, and
other controls of the database system.
List of DCL commands:
GRANT: This command gives users access privileges to the database.
REVOKE: This command withdraws the user’s access privileges given by using the GRANT command.
Drop Table is used to remove a table completely. You can drop and then recreate a table, but you will
lose all the data it. If that's an issue, then Alter is the preferred solution. However, not all changes you
might want to a table definition can be done with Alter, so your only option might be to drop/create.