Monday, January 12, 2015

SQL

SQL

April 2014. This is the last month before the end of my Advanced C++ course Spring semester.

So far, I have been able to write all my programs and complete all specifications in the requirements list of the assignments. That is always a milestone to complete a fully functional program that meets all requirements.

I have been spending this time earning a living tutoring Java, C++, Raptor, Python, and JavaScript programming, computer fundamentals, Microsoft Windows 7, Word, Excel, and PowerPoint. I can also tutor Visual Basic, C, and Microsoft Access, but no students have come by the Tutorial Lab to learn these tools.

Around this time, I have noticed that a lot of the job ads for programmers in the online postings also require a knowledge of SQL. So I decided to learn some SQL also.

SQL stands for Structured Query Language. It is the standard language to communicate with a relational database or a DBMS software. DBMS software stores data into two-dimensional tables. SQL language or a version of SQL is used to access the data in the DBMS.

SQL can be used as a stand-alone query to a DBMS and it can also be embedded in a program, like a program written in C. The SQL code can be outside a method or inside a method.

The SQL language is not a true programming language because it is not Turing complete. A Turing complete language, like Java, is able to write a solution for any problem, assuming there is a solution.

The following is an SQL code to create a table named Students.

CREATE TABLE Students
(
StudentID int,
LastName varchar(100),
FirstName varchar(100),
CourseNumber varchar(50),
CourseTitle varchar(50),
);

The following is the SQL code to insert a record in the above created table.

INSERT INTO Students (StudentID, LastName, FirstName, CourseNumber, CourseTitle)
VALUES ('Sindayen', 'John', 'CIT 230', 'Advanced Java');

This specific blog page completes all the terms enumerated in this blog’s subheading.

CYK:
What type of database model do DBMS use?
What are the two dimensions of a table?
What does an SQL code query?

Happy SQLing!

John Sindayen

No comments:

Post a Comment