Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Introduction to Database Management- Wiley Pathways ISM: 9780470101865 Answer th

ID: 3759955 • Letter: I

Question

Introduction to Database Management- Wiley Pathways ISM: 9780470101865

Answer the questions using complete sentences; I need to write an essay on these questions.

Define logical operator, and list and describe five types. (see info pg 198)

List and describe three basic DML statements and provide an example of the standard syntax for each. (see info pg 208)

--------------------------------------------------------------------------------------------------------

198 UNDERSTANDING THE SQL LANGUAGE Table 6-2: Comparison Operators Operator Description Equal to. The operand values are equal Greater than. The value of the left operand is greater than the value of the right operand. Greater than or eaual to. The value of the leit operand 1s greater than or equal to the value of the right operand Less than, The value of the left operand is less than the value of the right operand Less than or equal to. The value of the left operand is less than or equal to the value of the right operand Not equal to. The value of the left operand is not equal to the value of the right operand Not. Used to reverse the operand logic. For example, you can usetor not egual to or for not less than decision statenents that take an action depending on the result of a logical oper- ation, such as: "If A AND B are true, then perform an action." The most com mon logical operators are shown in Table 6-3 In addition to these operators, there are special operators that are used with subqueries. A subquery iS a special way of retrieving information where one query is dependent on another query. A discussion of subqueries is beyond the scope of this chapter. We should, however, look at a couple of examples of using common logical operators. We're going to use them in the SELECT statement WHERE clause. This time, we'll be querying the CUSTOMER table shown in Figure 6-4. Table 6-3: Logical Operators Operator AND BETWEEN LIKE NOT OR Description Evaluates to TRUE if both Boolean expressions are TRUE. Evaluates to TRUE if the operand is within a range. Evaluates to TRUE if the operand matches a pattern Reverses the value of any other Boolean operator. Evaluates to TRUE if either Boolean expression is TRUE.

Explanation / Answer

DML Statements with Examples and Sysntax are written below.

Data Manipulation Language (DML) statements are used for managing data in database.
DML commands are not auto-committed. It means changes made by DML command are not permanent to database,
it can be rolled back.

Three DML Basic Commands are:
INSERT
UPDATE
DELETE

1. INSERT Command:

Insert command is used to insert data into a table. Following is its general syntax,

INSERT into table-name values(data1,data2,..)

Consider a table Student with following fields.

Student(S_id,S_Name,age);
INSERT into Student values(101,'Adam',15);

Example to Insert NULL value to a column

Both the statements below will insert NULL value into age column of the Student table.

INSERT into Student(id,name) values(102,'Alex');
or
INSERT into Student values(102,'Alex',null);

The above command will insert only two column value other column is set to null.

Example to Insert Default value to a column:

INSERT into Student values(103,'Chris',default);

Suppose the age column of student table has default value of 14.

Also, if you run the below query, it will insert default value into the age column, whatever the default value may be.

INSERT into Student values(103,'Chris')

UPDATE Command:
Update command is used to update a row of a table. Following is its general syntax,

UPDATE table-name set column-name = value where condition;

Example:
update Student set age=18 where s_id=102;

Example to Update multiple columns:
UPDATE Student set s_name='Abhi',age=17 where s_id=103;

Delete command:

Delete command is used to delete data from a table. Delete command can also be used with condition to delete a particular row. Following is its general syntax,

DELETE from table-name;

Example to Delete all Records from a Table

DELETE from Student;

The above command will delete all the records from Student table.

Example to Delete a particular Record from a Table

DELETE from Student where s_id=103;

But I have confusion with already written the Logical operators description and it's funality of a each command. so what I am thinking is you need sql commands exmaples for Logical opeartors am i correct. Please let me know so that I can provide the those also.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote