Oracle SQL vs Oracle PL/SQL [closed] - sql

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have to learn Oracle SQL for work and am very tempted by the O'Reilly book 'Oracle PL/SQL Programming' as it has been so highly reviewed. However, I am unclear as to whether or not PL/SQL is a different language to SQL or if it is just a superset or if it something else. Can someone please help me here? Thanks.

SQL is a data query and manipulation langauge. PL/SQL is a procedural programming language.
PL/SQL is Turing complete language, with syntax for building complicated programmes. It also has a large number of libraries which give it a great range of capabilties. However, undoubtedly its main use is building stored procedures which embed SQL statements for retrieving and working with data. So to that extent PL/SQL is a superset of SQL.
Although in earlier versions of the database the PL/SQL SQL engine lagged behind the database engine so some SQL functionality was not available in PL/SQL. Since 9i Oracle has mad a concerted effort to keep the two in step, and its pretty hard to find anything we can do in pure SQL which we cannot also do in PL/SQL.

it is a superset.
all of SQL plus some PROCEDURAL extensions - so you can have variables, loops, conditional logic etc.

Related

Was the Original SQL Written in Assembly or C? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I know that vendors have their own subset of the Original SQL Language that are written in C (Like for Postgre SQL) or MS-SQL Server (C++) etc....
So, was the original SQL written in C, or was it created itself in Assembly? I couldn't really find a definite answer on what it's original language roots are (besides the history and such)
A quick history search on Oracle yielded:
In the late 70s, around the time Ingres was getting started at UC Berkeley, three guys working on a contract for the CIA got together and started a company called Relational Software, Inc.
Their first product was a relational database called Oracle. The
founders decided to use the C language for development. This would
later become important when they decided to start porting to different
platforms.
They also decided to support SQL as the internal data access language.
This would also become a very important factor to its success. In
1979, Relational Software was the only company making an SQL compliant
database. If anyone ever asks you who wrote the first SQL database,
you now know the answer: Oracle.
So the answer is C - according to Burleson Consulting.
PL/I.
From A History and Evaluation
of System R:
An interpreter program was written in PL/I to execute statements
in the high-level SQL (formerly
SEQUEL) language on top
of XRM.
The prototype for System R was developed in 1974-75.
http://www.tutorialspoint.com/sql/sql-databases.htm
1979 - Version 2.0 of Oracle was released and it became first commercial relational database and first SQL database. The company changed its name to Relational Software Inc. (RSI).
1983 - Oracle released version 3.0, rewritten in C language and ran on multiple platforms.

learning how to write complex stored procedures [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
i'm looking for good books and tutorials
about writing complex stored procedures along with common tricks and best practices
commonly used by DBAs.
all i usually find is the basic SQL Statement tutorials ,
what i need are some good examples of Complex Data Selection
along with common tricks of how to correctly and efficiently filter data
for selection between multiple tables .
i release this is hard to find , because Complex DB's are usually built
only in large projects and not for tutorials , but for the least i would like to find commonly used method applied by DBAs
thanks in advance.
You can use below site for download Ebook about SQL server complex stored procedure :
1- COMPLEX STORED PROCEDURE IN SQL
2- STORED PROCEDURES
3- Google Ebook
There are lots of site but I find This site is very helpful for my SQL Server learning. It is very informative site for database developers. If you want to read books then probably you can pick on from Microsoft press.
You should look at The Guru's Guide To Transact SQL by Ken Henderson, a bit old, but probably still the best book about T-SQL :)

User friendly SQL query program? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I doubt this could exist, but crazier things do. Is there a program or place where I could enter in just the tables/columns, and some criteria options and it will generate a working SQL query code for me?
I know there are programs that will make the code look all nice, but I mean truly generate the code/joins/FROMS/etc.
Actually with Microsoft SQL Server Management Studio you have tools for everything.
You just need to learn the basics, but almost everything can be done with pre-made code for you.
You can create a table by just Right-Clicking on a database and select Create Table. From there you just have to fill the column names and the rows.
You can fill you rows with something similar without using the T-SQL language directly.
There are too many tools for me to list them all here but it is really User-Friendly.
I do recommend you go and learn SQL. It is really easy to learn the basics and so useful.
If you really want a software that generates the code for you you can google SQL Genetator.
I found this. Although I don't recommend using a code generator.
As everyone already commented, SQL Server Management Studio (SSMS) is your tool to go. But I guess you are asking for something that maybe requires a little bit less knowledge of the underlying tSQL language.
A sample could be MS SQL Code Factory I once recommended to some advanced user of a system I used to work and for him it was enough to do simple and some mid-adavanced queries.
But definitely you should aim to learn tSQL and then apply your knowledge together with a tool like SSMS to create all the queries you need, there is "almost" no limit on what you can achieve, and it is fun too as #Polynomial stated

common language for any RDBMS technology [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
We are looking for a common language for any RDBMS technology. I mean if I write a query in SQL Server that query will also have to work on any RDBMS like oracle, mysql etc.
Can anyone help get me started?
There is an ANSI standard for SQL that's (mostly) supported by most database servers. As long as you stick to that subset of the SQL language functionality offered by your database server your queries will be portable.
However, many of the more sophisticated features of your dbms won't be usable as they are not part of the ANSI standard, and thus implemented in a proprietary way by each dbms vendor - crosstabs are an example of this problem.
Two things, You could use ANSI standard but not all the RDBMS support all the ANSI standard. Also, ANSI standard are only for SQL and not fo,r say their programming language like Tsql for sql server and pl/sql for oracle etc.
2nd and most important point why would you want to use the same code in different RDBMS. Database systems are totally differnet.Some RDBMS are good in doing some things and not good in other things. Thus if you implement one code then it might not be the best optimized code for some of RDBMS's. Thus I would suggest that write the code based on the strengths and weakness of a RDBMS.If it is going to be different then so be it.
Most important thing, are you trying to do some benchmark before deciding the RDBMS. Also, what purpose it will solve to have same data and code on different RDMBS. You will be wasting lots of moeny on license. server etc as code will do the same work on all the RDBMS.

What the best resource to learn ANSI SQL? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I don't mean "Basic SQL", but strongly the specs and the difference between the specs and the implementations between great databases (like SQL Server, Oracle, etc).
(source: amazon.com)
SQL In a Nutshell by O'Reilly and Associates. It covers all 5 major SQL Dialects, the differences between them, and does that for each function/feature listed. (ANSI SQL99, Oracle, MySql, Postgres, and SQL Server).
The number one way of learning the differences is to work in the various databases.
SQL Server, Oracle, and MySql all offer free (express) editions. Also, if you want to step up a bit you can get the developer version of SQL Server for about $50.
Oracle:
http://www.oracle.com/technology/products/database/xe/index.html
SQL Server
http://www.microsoft.com/express/sql/default.aspx
MySQL
http://dev.mysql.com/downloads/
Simple things to do:
create a database
create a table
do simple insert/update/delete (CRUD) operations
do inner / outer joins.
http://sqlzoo.net/
PostgreSQL the world's more advanced opensource and more ANSI SQL-compliant database
Various RDBMS ANSI SQL-conformance: http://troels.arvin.dk/db/rdbms/