Fuzzy Sets decision making under information of uncertainty
Vansh Goel ISM (1).pptx
1. ISM LAB FILE
- BY VANSH GOEL
- BCOM (H) SECTION - C
- ENROLLMENT NO - 14817788820
2. 1) Steps to Install MySQL
Step 1: Go to the official website of MySQL and scroll down. Then you will see an option to
choose the Operating System. Choose Windows.
Step 2: After that, you will see two options to Download. Choose the mysql-installer-web-
community.
• Once, you click on Download, you will be redirected to a page :In the page, just click on
the option of “No thanks, just start my download.” Once, you click on this option, you will
see that MySQL Installer is getting downloaded.
Step 3: After MySQL Installer gets downloaded, double click on it, and you will see that the
MySQL installer Community is getting installed. Once, it is downloaded you will see a
screen. In the dialog box, just check in in the radio button and accept the License Agreement.
After that, click on Next.
Step 4: In the next wizard, you have to choose the setup type. Basically, this is where you
choose which features you wish to install. Here choose the option Full and click on Next.
This option will install MySQL Server, MySQL Shell, MySQL Router, MySQL Workbench,
MySQL Connectors, documentation, samples and examples and much more.
3. Step 5: Once you click on Next, you might see that some features may fail to install due to
lack of requirements. So, either you can resolve them, or can skip them, by clicking on Next.
Next, you will see a dialog box asking for your confirmation of a few products not getting
installed. So, you can just click on Yes.
As soon as you click on Next, you will see the list of the products which will get installed. So,
if you are fine with the products, go ahead and click on Execute.
Once you hit on Execute, you will see that the products are getting installed.
Now, once the installation is complete, click on Next.
Next, you have to configure the Server and Router. So, in the dialog box, click on Next.
Step 6: In the below wizard, you can either choose the Standalone MySQL Replication or the
InnoDB Cluster based on your requirement and then click on Next.
Step 7: Once, you click on Next, you have to mention the server configuration and click on
next.
Step 8: Now, you have to choose the authentication method.
4. Step 9: Next, you have to mention the MySQL Root Password and again click on Next.
Step 10: Finally, you have to choose whether you want to start the server or not or leave it as
it is. Now, the wizard will give you a list of the configurations which will be applied. So, if
you agree with the configuration click on Execute. Once the execution is done, click on
Finish. This will finish the configuration of Server.
Step 11: In the next wizard that comes up, you can choose to configure the Router. So just
click on Next and click on Finish.
Step 12: Once, you click on Finish, you will see the following wizard, to Connect to server.
Here mention the root password, which you had set in the previous steps. Check if the
connection is successful, by clicking on the Check button and then click on Execute. Now,
once the configuration is complete click on Next.
Step 13: Once, you click on Next, choose the configurations applied and click on Execute.
After the configurations get applied, you will see a screen. So, here just click on Finish.
Step 14: Now, to check whether MySQL is installed or not, you can open the MySQL Shell
and mention the root password.
5. 2) Types of SQL Commands
SQL commands are instructions. It is used to
communicate with the database. It is also used
to perform specific tasks, functions, and queries
of data.
SQL can perform various tasks like create a
table, add data to tables, drop the table, modify
the table, set permission for users.
Types of SQL Commands
There are five types of SQL commands: DDL,
DML, DCL, TCL, and DQL.
6. (1) Data Definition Language (DDL):
DDL changes the structure of the table like creating a table, deleting a table, altering a table,
etc. All the command of DDL are auto-committed that means it permanently save all the
changes in the database.
Here are some commands that come under DDL:
1) Create - It is used to create a new table in the database.
Syntax:
CREATE TABLE TABLE_NAME (COLUMN_NAME DATATYPES[,....]);
2) Alter - It is used to alter the structure of the database. This change could be either to
modify the characteristics of an existing attribute or probably to add a new attribute.
Syntax:
To add a new column in the table
ALTER TABLE TABLE_NAME ADD COLUMN_NAME COLUMN-definition;
7. 3) Drop - It is used to delete both the structure and record stored in the table.
Syntax:
DROP TABLE TABLE_NAME;
4) Truncate - It is used to delete all the rows from the table and free the space containing the
table.
Syntax:
TRUNCATE TABLE TABLE_NAME;
(2) Data Manipulation Language (DML):
DML commands are used to modify the database. It is responsible for all form of changes in
the database. The command of DML is not auto-committed that means it can't permanently
save all the changes in the database. They can be rollback.
8. Here are some commands that come under DML:
1) Select - This is the same as the projection operation of relational algebra. It is used to select
the attribute based on the condition described by WHERE clause.
Syntax:
SELECT expressions FROM TABLES WHERE conditions;
2) Insert - The INSERT statement is a SQL query. It is used to insert data into the row of a
table.
Syntax:
INSERT INTO TABLE_NAME (COL 1, COL 2, COL 3,.... COL N) VALUES (VALUE 1,
VALUE 2, VALUE 3, .... VALUE N);
3) Update - This command is used to update or modify the value of a column in the table.
Syntax:
UPDATE TABLE_NAME SET [COLUMN_NAME 1= VALUE 1,... COLUMN_NAME N
= VALUE N] [WHERE CONDITION]
9. 4) Delete - It is used to remove one or more row from a table.
Syntax:
DELETE FROM TABLE_NAME [WHERE CONDITION];
(3) Data Control Language (DCL):
DCL commands are used to grant and take back authority from any database user.
Here are some commands that come under DCL:
1) Grant
2) Revoke
a) Grant: It is used to give user access privileges to a database.
b) Revoke: It is used to take back permissions from the user.
(4) Transaction Control Language (TCL):
TCL commands can only use with DML commands like INSERT, DELETE and UPDATE
only . These operations are automatically committed in the database that's why they cannot be
used while creating tables or dropping them.
10. Here are some commands that come under TCL:
1) Commit - Commit command is used to save all the transactions to the database.
Syntax:
COMMIT;
2) Rollback - Rollback command is used to undo transactions that have not already
been saved to the database.
Syntax:
ROLLBACK;
• Save Point - It is used to roll the transaction back to a certain point without rolling
back the entire transaction.
Syntax:
SAVEPOINT SAVEPOINT_NAME;
11. Constraints
i) Keys play an important role in the relational database.
ii) It is used to uniquely identify any record or row of data from the
table. It is also used to establish and identify relationships between
tables.
3) Keys in SQL
12. Types of Keys:
1) Super Key – A super key is a group of single or multiple keys which identifies rows in a table.
2) Primary Key – is a column or group of columns in a table that uniquely identify every row in that table.
Rules for defining Primary key:
• Two rows can’t have the same primary key value
• It must for every row to have a primary key value.
• The primary key field cannot be null.
• The value in a primary key column can never be modified or updated if any foreign key refers to that primary
key.
3) Candidate Key – is a set of attributes that uniquely identify tuples in a table. Candidate Key is a super key
with no repeated attributes.
4) Alternate Key – is a column or group of columns in a table that uniquely identify every row in that table.
5) Foreign Key – is a column that creates a relationship between two tables. The purpose of Foreign keys is to
maintain data integrity and allow navigation between two different instances of an entity.
6) Composite Key – is a combination of two or more columns that uniquely identify rows in a table. The
combination of columns guarantees uniqueness, though individual uniqueness is not guaranteed.
7) Unique Key - A unique key is a set of one or more than one fields/columns of a table that uniquely identify a
record in a database table. The unique key and primary key both provide a guarantee for uniqueness for a
column or a set of columns. There is an automatically defined unique key constraint within a primary key
constraint.
13. 4) Integrity constraints in SQL
Types Of Constraints in MySQL:-
i. Not Null Constraints
ii. Unique Constraints
iii. Primary Key
iv. Foreign Key
v. Check Constraints
vi. Default Constraints