Share
Explore BrainMass

SQL

SQL's roots stretch as far back as the early 1970s when IBM needed a language to manipulate their internal databases. In those first days, it was known as SEQUEL, Structured English Query Language, but this acronym was later shortened by dropping the 'English' to SQL. From this relational algebra- and tuple relational calculus-based language, SQL was picked up by various groups and went through many revisions until it resembled the most popular relational database management language we know today.

SQL was one of the first commercial languages to rise to the challenge of implementing the ideas in Edgar F. Codd's relations model of a database, though there was some divergence between that model and the actual possible implementations of SQL. Still, it was described in Codd's influential 1970 paper “A relational Model of Data for Large Shared Data Banks”1. It will be no surprise then that SQL was adopted by the American National Standards Institute in 1986 and by the International Organization for Standards just one year later2. SQL has not rested easy in its place, however; it has been enhanced with extra features in the years since. Some of the extensions added by different SQL vendors may interfere with the standard, however, causing some vendor lock-in and a drop in portability so one must be alert as to which flavor of SQL they are using.

Using its data definition and data manipulation subsets, SQL can deal with a vast range of desired database tasks. Data insertion, querying, updating and deletion, schema creation and modification, and data access control are all vital tasks that SQL handles efficiently and elegantly. Querying is perhaps the most common operation performed from that use and is done via declarative SELECT statements. These simple statements provide powerful functionality, allowing one to retrieve data with specific search parameters (including regular expressions) from one or more tables, or a joined version of one or more tables. Fortunately, SELECT statements in their standard form do no enforce any persistent effects on the database itself, though some non-standard versions can. Despite including some procedural elements, SQL is often counted among the declarative languages.

More recently, SQL also served as a basis for the most popular open-source relational database management systems3 that enjoy wide use in web applications - MySQL and SQLite.

 

References:

1.  Codd, Edgar F (June 1970). "A Relational Model of Data for Large SHared Data Banks". Communications of the ACM (Association for Computing Machinery) 13 (6): 377–87. doi: 10.1145/362384.362685. Retrieved 2013-07-22.

2. "ISO/IEC 9075-1:2008: Information technology - Database languages - SQL - Part 1: Framework (SQL/Framework)". 

3. "DB-Engines Ranking". Retrieved 29 July 2013.

Access SQL queries

sing the Microsoft Access database Teresa'sTrees, write SQL statements for the given tasks. Once complete, copy the SQL statements from Microsoft Access and paste them in a Microsoft Word document that will be submitted along with part II of the assignment. Write an SQL statement: To display all the information from the Cu

Poor/Good example of SQL query

Write 2 SQL queries, one that is poorly written and one that is written well. The examples can be basic and simple. Explain what is bad about the poor example and what is good about the well written example.

Computer: SQL Data Table

I am trying to get my SQL data table to pass but it will not, can you me thanks. Here is the code: SET echo on; DROP TABLE COURSE CASCADE CONSTRAINTS; DROP TABLE XCLASS CASCADE CONSTRAINTS; DROP TABLE STUDENT CASCADE CONSTRAINTS; DROP TABLE ENROLL CASCADE CONSTRAINTS; CREATE TABLE COURSE( CRS_CODE VARCHAR(8) N

Query1 Write a SQL statement to display Students' First and Last Name. Query2 Write a SQL statement to display the Major of students with no duplications. Do not display student names. Query3 Write a SQL statement to display the First and Last Name of students who live in the Zip code 88888. Query4 Write a SQL statement to display the First and Last Name of students who live in the Zip code 88888 and have the major of Biology. Query5 Write a SQL statement to display the First and Last Name of students who live in the Zip code 88888 or 88808. Do not use IN. Query6 Write a SQL statement to display the First and Last Name of students who have the major of Biology or Math. Use the SQL command IN. Query7 Write a SQL statement to display the First and Last Name of students who have the Status greater than 1 and less than 10. Use the SQL command BETWEEN. Query8 Write a SQL statement to display the First and Last Name of students who have a last name that starts with an S. Query9 Write a SQL statement to display the First and Last Name of students having an a in the second position in their first names. Query10 Write a SQL expression to display the Status and a sum of the Status of each Status value as SumOfStatus. Group by Status and display the results in descending order of SumOfStatus.

Query1 Write a SQL statement to display Students' First and Last Name. Query2 Write a SQL statement to display the Major of students with no duplications. Do not display student names. Query3 Write a SQL statement to display the First and Last Name of students who live in the Zip code 88888. Query4 Write a SQL statement to di

Database and Database Manipulation Language

In this case assignment, you will write the SQL statement to work on the community library database. Following are the tasks you are required to perform: 1. Populate data to the tables in your database 2. Retrieve the contact details of library customers 3. Retrieve the contact details of library customers who live in cer

Forms and Reports

A. Create a report for each of the following requirements. Reports may be created using the wizard or an SQL query. Reports should follow the formatting guidelines given in the next step. Reports should be named as indicated below (e.g., Report1, Report2, etc.). Report1: Show Instructor information (Instructor_ID, First_Name

Writing SQL Statements

1. List the name, city, state, and phone number of each customer not located in Washington (state). Organize the list alphabetized by state and city within each state. Within each city, order the customer names alphabetically with last name followed by first name. 2. List the names of the vendors who supply at least one of the

SQL Query: Student Information

Query1 Write a SQL statement to display Students' First and Last Name. Query2 Write a SQL statement to display the Major of students with no duplications. Do not display student names. Query3 Write a SQL statement to display the First and Last Name of students who live in the Zip code 88888. Query4 Write a SQL statem

SQL Statement

a. You have been asked to write a SQL statement that will delete ConsumerID 45678. b. Save your SQL query as SQLQuery1D1 and execute the statement. c. Create an SQL statement that will delete all records that are from the state of California or Texas. d. Save your SQL query as SQLQuery1D2 and execute the statement. e. Make a

Operational vs Dimensional Databases, and XML.

1. What are the differences between the characteristics of an operational database and a dimensional database? 2. What is XML, and why is it useful? 3. What is an XML Schema document? 4. How can XML be used with a DBMS?

Programming SQL Statements to Retrieve Data from a Database

Please Complete in Script. Write SQL statements that will retrieve the following data from a database, using Subqueries and Joins. Using the Northwind database, write a SQL SELECT statement that will retrieve the data for the following questions: 1. For each order, display the Company Name, City, and the Country for the

Provide scripts that simulate the activity required by the assignment.

Part 1. The professor states: "I have modified the assignment this semester to allow you all to either: Bypass the Oracle Database requirement and only provide scripts that simulate the activity required by the assignment. Hopefully this will eliminate the frustration typically encountered with trying to gain access t

Creating Tables Using SQL Server

Complete the following tasks: 1. Download and install SQL Server 2008, Express Edition. o Refer to Appendix A of the textbook. 2. Open and run the attached script to create the Northwind database. o To download the script, click here. 3. Create the following tables in the Northwind database: o Regions table Column N

Providing scripts without using Oracle

I do not understand how to provide scripts that would build tables, insert data and query data from tables. Please get me started with this and I will add the data if someone can get me in the right direction. Our instruction states, "Bypass the Oracle Database requirement and only provide scripts that simulate the activity req

SQL Statement for Retrieving Data

Please provide the answer in the order that need to run the script without an error. Using the Northwind database, write a SQL SELECT statement that will retrieve the data for the following questions: ** Please refer to attachment for the full question description **

Database Systems SQL Statement Examples

Write 2 SQL statements a piece (SELECT INSERT, UPDATE,DELETE) based upon database tables of your choice (i.e. customers, orders, vendors etc). In total, there would be 8 SQL statements (2 for each of the commands (SELECT, INSERT, UPDATE, DELETE). Please show the WHERE clause in a few of them to demostrate the filtering of the re

Relational databases

We are operating on relational databases. Databases are classified according to their function (i.e. what they do) and they are classified according to their structure (i.e. the way they save and organize the data). What other kinds of databases exist? Why have relational databases replaced the other types of databases?

DATABASE DESIGN

3. An indexed file for the inventory data on disk and its index table are as follows: Disk file Disk Address Record Key Item Name Quantity Price 43 130 Pen 300 $4 20 12 Paper 200 $5 05 23 Disk

SQL Statements for Order Processing Database

See the attached file. One of your team members are a little rusty on their SQL skills, but needed to create the SQL Select statements that would produce running summary files for reports on the following: Customer volume by month CustomerID, Month, Total shipments, Total weight Driver performance by month Driver ID, Mo

Explicit SQL Statement

Given the attached tables (see attachment): 1- Provide an explicit JOIN SQL statement that returns the store ID, store name, manager employee first and last name fields, manager employee grade, the city and state fields of the store. Only unique rows should be returned. Note that the 4th field in the Employee table is the em

Write SQL queries using Between, Like and Union.

Using the example databases and tables below, write SQL queries using Between, Like and Union. - Write a SQL query that joins two tables in the example database and uses BETWEEN to restrict record selection. (Use salary to restrict the data.) - Write a SQL query that joins two tables in the example database and uses BETWEEN

Write a SQL query that returns the names of the students

Write a SQL query that returns the names of the students (lname, fname), and the major of the major with most students. If more than one major is tied for most students, then list all the names of the students from both majors (as well as the majors). Order the results by major (in the case of a tie) and then alphabetically by

Database Design for Fernando

Fernando Culebra has always been fascinated by skateboards. Fernando has won several contests, both locally and nationally. His interest in skateboards led him to open Fernando's Skate Shop in Denton, Maine. Fernando sells street, trick, and children's skateboards. The store has only been open for a couple of months, yet sales h

Write SQL queries to answer several requirements such as finding the last names, birth dates, and phone numbers of all mechanics who have earned at least $50000 from contracts on Boeing 747 airplanes. Find the average amount of money that it has taken to do maintenance on each different model of jumbo jet.

Consider the 3 tables with these attributes: TABLE MECHANIC ( LAST_NAME VARCHAR(50), BIRTHDATE DATETIME, PHONE_NO CHAR(10) ) TABLE AIRPLANE ( SERIAL_NO CHAR(12), MODEL VARCHAR(40), CAPACITY INT ) TABLE WORKS_ON ( MECHANIC_LAST_NAME VARCHAR(50), MECHANIC_BIRTHDATE DATETIME, AIRPLANE_SERIAL_NO CHAR(12),

Write SQL queries to answer the following questions

Kindly refer to the "CREATE TABLE" commands given at the end to answer the following questions. (1a) Did the SQL programmer enforce the constraint that every doctor practices in a unique hospital? If so, how? If not, how do you know, and how, if at all, could this constraint have been implemented? (1b) Did the SQL programmer

Create the following SQL queries.

Create the following queries on the attached ITD640_B database and save them all in a file called ITD640_P5.SQL . Remember to define what database to use with a USE statement. - Using a join, get the full details of all the employees who are working on the Harvest Ball promotion. - Get the promotion names (duplicates elimi

If Else then, parameter queries, object priveleges: Perform the following tasks below by using the correct SQL statements. Create the statements in Oracle by using the following steps (SQL > SQL commands > Enter Command).

L_lunches table LUNCH_ID LUNCH_DATE EMPLOYEE_ID DATE_ENTERED 1 16-NOV-05 201 13-OCT-05 2 16-NOV-05 207 13-OCT-05 3 16-NOV-05 203 13-OCT-05 4 16-NOV-05 204 13-OCT-05 6 16-NOV-05 202 13-OCT-05 7 16-NOV-05 210 13-OCT-05 8 25-NOV-05 201 14-OCT-05 9 25-NOV-05 208 14-OCT-05 12 25-NOV-05 204 14-OCT-05 13 25-NOV-05

Tables, Forms, and Reports

Word document, SQL Statement (zipped) Start Access, and then open the FirmPays database located in the LE4 folder extracted from the zip file in IP3. Open the query named "June 2". View the query in SQL, and answer the following questions: 1. Which tables are used in the query? 2. Which fields are displayed in the query

SQL Queries

I have tried there two queries, but I am told that I am not doing something right. Here are the criteria I used to write the queries and my current answers. 1. Write a SELECT statement that lists the StudentID, FirstName, LastName, and GPA of freshman (FR) whose GPA is 3.5 or higher. Use only the Student table. My query: SEL