Question

Define and describe the importance of SQL queries. Provide examples of two SQL queries in your...

Define and describe the importance of SQL queries. Provide examples of two SQL queries in your Discussion Board post and explain the expected results from the SQL query

0 0
Add a comment Improve this question Transcribed image text
Answer #1

What is SQL?

1. Structured Query Language, an ANSI -American National Standards Institute. Standard language for accessing databases.

Data has 2 formats,

i. File Format (Old one, ex: Notepad, MS Word, Acrobat Reader etc....

ii. Table Format (Using this format accessing and managing data is easy.

2. SQL was first appeared in 1974 by IBM and it is Free Software(any body can use with free of cost..

3. Using SQL we can Access Oracle, Sybase, DB2, SQL Server, MySQL, DB/400 and other Database Management Systems

4. SQL is used for Database Developers, Database Testers, and Database Administrators.

i. Database Developers - Develop databases for Software Applications

ii. Database Testers - Conduct Database Testing (manual Testing and Automated Testing.

iii. Database Administrators - perform all activities related to maintaining a successful database environment.

5. Important uses of SQL are,

i. Creating new databases

ii. Creating new tables in a database

iii. Inserting records in a database

iv. Updating records in a database

v. Deleting records from a database

vi. Retrieving data from a database

vii. Executing queries against a database

viii. Creating stored procedures in a database

ix. Creating views in a database

x. Setting permissions on tables, procedures, and views

Etc…

create a table to store information about weather observation stations:
-- No duplicate ID fields allowed

CREATE TABLE STATION
(ID INTEGER PRIMARY KEY,
CITY CHAR(20),
STATE CHAR(2),
LAT_N REAL,
LONG_W REAL);

populate the table STATION with a few rows:

INSERT INTO STATION VALUES (13, 'Phoenix', 'AZ', 33, 112);
INSERT INTO STATION VALUES (44, 'Denver', 'CO', 40, 105);
INSERT INTO STATION VALUES (66, 'Caribou', 'ME', 47, 68);

query to look at table STATION in undefined order:

SELECT * FROM STATION;

ID CITY STATE LAT_N LONG_W
13 Phoenix AZ 33 112
44 Denver CO 40 105
66 Caribou ME 47 68

query to select Northern stations (Northern latitude > 39.7):
-- selecting only certain rows is called a "restriction".

SELECT * FROM STATION
WHERE LAT_N > 39.7;

ID CITY STATE LAT_N LONG_W
44 Denver CO 40 105
66 Caribou ME 47 68
Add a comment
Know the answer?
Add Answer to:
Define and describe the importance of SQL queries. Provide examples of two SQL queries in your...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT