What is the best way to practice SQL language?

I’m new in database world and want to practice SQL language. I’ve been playing around with Oracle XE, but I realized it’s not very practical to play around with SQL using XE since its sql editor is not user friendly to debug the script. I’m trying to build schemas from scratch and play around with it using SQL. What is the best way to do this?
Thanks in advance

Valerie Debonair wrote:
I’m new in database world and want to practice SQL language. I’ve been playing around with Oracle XE, but I realized it’s not very practical to play around with SQL using XE since its sql editor is not user friendly to debug the script. I do not think that is a valid criticism at all. The basic tools needed to learn SQL is SQL*Plus and a willingness to learn.
There is no "+debugging+" for SQL either... except to break it into simpler steps, testing that... and perhaps using "+explain plan+" to get the execution plan.
Granted that SQL*Plus is not the best tool for displaying data... but then learning SQL should be done using small data sets (not too many columns and few rows) - as even a small data set can represent all the data model complexities needed for learning SQL.
The examples you use, the test tables and the practical exercises used in the learning process are by far more important how "pretty" the tool being used is.
FWIW, I do 99% of all my SQL work and PL/SQL development using SQL*Plus - it is a very capable tool.

Similar Messages

  • What is the best way to add i18n to an existing custom CMS system (build with C#)?

    I am currently responsible for an existing CMS, built a few years ago with C# .Net and a few clients are requesting to have their website
    in Spanish. The websites are pre-populated with pages from a library and currently the application has no support for i18n. What is the quickest way to allow the client to have his website in Spanish? And what is the best way to allow any language?
    I understand those are two different answers, but I want to plan for future and at the same time provide a quick solution to please the clients.

    I suggest that you move your post to the below asp.net forum for a better assistance on this, this forum is for C# code related issues:
    http://forums.asp.net/
    Fouad Roumieh

  • What is the best way of returning group-by sql results in Toplink?

    I have many-to-many relationship between Employee and Project; so,
    a Employee can have many Projects, and a Project can be owned by many Employees.
    I have three tables in the database:
    Employee(id int, name varchar(32)),
    Project(id int, name varchar(32)), and
    Employee_Project(employee_id int, project_id int), which is the join-table between Employee and Project.
    Now, I want to find out for each employee, how many projects does the employee has.
    The sql query that achieves what I want would look like this:
    select e.id, count(*) as numProjects
    from employee e, employee_project ep
    where e.id = ep.employee_id
    group by e.id
    Just for information, currently I am using a named ReadAllQuery and I write my own sql in
    the Workbench rather than using the ExpressionBuilder.
    Now, my two questions are :
    1. Since there is a "group by e.id" on the query, only e.id can appear in the select clause.
    This prevent me from returning the full Employee pojo using ReadAllQuery.
    I can change the query to a nested query like this
    select e.eid, e.name, emp.cnt as numProjects
    from employee e,
    (select e_inner.id, count(*) as cnt
    from employee e_inner, employee_project ep_inner
    where e_inner.id = ep_inner.employee_id
    group by e_inner.id) emp
    where e.id = emp.id
    but, I don't like the complication of having extra join because of the nested query. Is there a
    better way of doing something like this?
    2. The second question is what is the best way of returning the count(*) or the numProjects.
    What I did right now is that I have a ReadAllQuery that returns a List<Employee>; then for
    each returned Employee pojo, I call a method getNumProjects() to get the count(*) information.
    I had an extra column "numProjects" in the Employee table and in the Employee descriptor, and
    I set this attribute to be "ReadOnly" on the Workbench; (the value for this dummy "numProjects"
    column in the database is always 0). So far this works ok. However, since the numProjects is
    transient, I need to set the query to refreshIdentityMapResult() or otherwise the Employee object
    in the cache could contain stale numProjects information. What I worry is that refreshIdentityMapResult()
    will cause the query to always hit the database and beat the purpose of having a cache. Also, if
    there are multiple concurrent queries to the database, I worry that there will be a race condition
    of updating this transient "numProjects" attribute. What are the better way of returning this kind
    of transient information such as count(*)? Can I have the query to return something like a tuple
    containing the Employee pojo and an int for the count(*), rather than just a Employee pojo with the
    transient int inside the pojo? Please advise.
    I greatly appreciate any help.
    Thanks,
    Frans

    No I don't want to modify the set of attributes after TopLink returns it to me. But I don't
    quite understand why this matters?
    I understand that I can use ReportQuery to return all the Employee's attributes plus the int count(*)
    and then I can iterate through the list of ReportQueryResult to construct the Employee pojo myself.
    I was hesitant of doing this because I think there will be a performance cost of not being able to
    use lazy fetching. For example, in the case of large result sets and the client only needs a few of them,
    if we use the above aproach, we need to iterate through all of them and wastefully create all the Employee
    pojos. On the other hand, if we let Toplink directly return a list of Employee pojo, then we can tell
    Toplink to use ScrollableCursor and to fetch only the first several rows. Please advise.
    Thanks.

  • What is the best way to deal with memory leak issue in sql server 2008 R2

    What is the best way to deal with memory leak issue in sql server 2008 R2.

    What is the best way to deal with memory leak issue in sql server 2008 R2.
    I have heard of memory leak in OS that too because of some external application or rouge drivers SQL server 2008 R2 if patched to latest SP and CU ( may be if required) does not leaks memory.
    Are you in opinion that since SQL is taking lot of memory and then not releasing it is a memory leak.If so this is not a memory leak but default behavior .You need to set proper value for max server memory in sp_configure to limit buffer pool usage.However
    sql can take more memory from outside buffer pool if linked server ,CLR,extended stored procs XML are heavily utilized
    Any specific issue you are facing
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • What is the best way to Optimize a SQL query : call a function or do a join?

    Hi, I want to know what is the best way to optimize a SQL query, call a function inside the SELECT statement or do a simple join?

    Hi,
    If you're even considering a join, then it will probably be faster.  As Justin said, it depends on lots of factors.
    A user-defined function is only necessary when you can't figure out how to do something in pure SQL, using joins and built-in functions.
    You might choose to have a user-defined function even though you could get the same result with a join.  That is, you realize that the function is slow, but you believe that the convenience of using a function is more important than better performance in that particular case.

  • What is the best way to match back 3rd party vendor data to our SQL Server Database?

    So we have this 3rd party data that we need to match back to our database. We have determined that the "ID" column that the 3rd party is sending us back data is a concatenated key of our member's SSN, Gender, and CCYYMMDD Birthdate. In 90% of the
    cases, we can match back on this. However, the other 10% we have to try a couple of different ways...using our Member #, using what is called a HFCA #.
    We are talking about 10s and 20s of data here...NOT thousands.
    What is the best way to handle this via SSIS? A SQL Server Stored Procedure to cursor through the 3rd party data or multiple INSERT-SELECT statements trying to marry back the data? My thought process was to cursor through each record, try and match on our
    90% match, and then determine if we have a match or not, and then if we do not, then try our other means. Should I SELECT 1 to see which matching criteria to go with? So in other words, for the first match...
    IF EXISTS(SELECT 1 FROM TableName WHERE ColumnName1 = .....) BEGIN....ELSE...Blah Blah Blah
    or simply continue doing INSERT-SELECTS...
    I guess I am asking about the efficiency of using a cursor within a SQL Server Stored Procedure here.
    Thanks for your review and am hopeful for a reply.

    You are asking a SSIS question but posted in tsql - which is it?  But before you go further, which matching logic should have priority?  Member # or the SSN/gender/birthdate? Note that the priority does not depend on matching success percentage. 
    In other words, you may prefer to match on member # first (even though it has a lower success ratio but a higher confidence ratio), followed by ssn..., followed by whatever. 
    In any case, this sounds much more like a SSIS logic issue.  Your questions regarding cursors and stored procedures seem premature at this point. OTOH it may depend on what you are actually trying to accomplish.  

  • I am trying to rebuild my iPhoto library and noticed my backup contains aliases (pointers?) and not the actual file. What's the best way to rebuild my library?

    I am trying to rebuild my iPhoto library and noticed my backup contains aliases (pointers?) and not the actual file. What's the best way to rebuild my library?
    Facts:
    In moving to a new iMac, I copied the iPhoto library to an external HDD assuming that I would point the new iMac to the backed up iPhoto Library
    All worked fine when I pointed the new library but noticed that some folders contained aliases and not the original file. So when I attempt to open that photo it can't find it because the alias is pointing to another drive.
    I do have all original photos from a couple of external HDDs. In the folders titled, "Originals" (from older versions of iPhoto) and "Masters" (from current iPhoto)
    I'm thinking I can create a new folder and drop the original files and make that my new iPhoto library. Is there a better way to rebuild my library? I do not want to create any future aliases.
    Thanks in advance for any help!

    do you have a strongly recommended default "managed" library (the iPhoto preference to "copy imported items to the iPhoto library is in its checked state) or a referenced library - you have unchecked that option?
    It sounds like you have a referenced library and are now experiancing one of the very siginificant drawbacks of a referenced library and one of the many reasons they are strongly not recommended
    Also note that iPhoto '11 may use alises in the originals folder as part of the upgrade
    It is important that we understand exactly what you have and what is not sorking - what error messages you are getting
    You must NEVER make any changes of any sort to the structure of content of the iPhoto library - there are no user servicable parts in it  --  and you can not rebuild yoru librtary - only iPhoto ir iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ -  can rebuild a library unless you are a SQL programmer and understand the structure that iPhoto uses
    LN

  • I want to upgrade my Imac from tiger 10.4.11 to Mac OS 10.6 Snow Leopard. What is the best way to do this.

    I have just purchased an iphone 4 and it needs me to have the latest itunes on my computer.  I have not upgraded by computer for some time and thought this is probably the time to do it. My computer is an imac intel with Tiger 10.4.11. I want to upgrade my Imac from tiger 10.4.11 to Mac OS 10.6 Snow Leopard or higher.  What is the best way to do this?  Appreciate any help as I am out of practice. I used to be an old hand at this, but things have moved on since I didn't upgrade or use my computer as much!

    Catherina wrote:
    ...  What is the best way to do this?
    The best way, really the only way, is to purchase Snow Leopard.
    Online (UK): http://store.apple.com/uk/product/MC573/mac-os-x-106-snow-leopard
    Elsewhere: call the phone number in the Apple Online Store.
    Apple's price is $19.99, £14.00, €18.
    Snow Leopard is not available to download from any legitimate source.
    Once you install Snow Leopard, upgrade iTunes to version 10.7 or the latest, iTunes 11.
    iTunes 10.6.3 is the last version of iTunes to support Mac computers with Mac OS X 10.5.8 with either Intel or PowerPC processors, but since you have an Intel iMac, the best solution is to purchase Snow Leopard. Leopard is no longer available from Apple and prices from aftermarket vendors can be unreasonably high.

  • What's the best way to load balance multiple protocols on one vserver?

    Hi,
    We have a CSM blade on a 6513, in bridge mode. I'm just wondering what is the best way to serve HTTP and HTTPS (or any two or more ports) from the same group of servers. As I see it, we have two options:
    1. Don't set a port on the vserver, so it is load balancing "any" or "tcp". This is easy but I want to be sure there isn't a downside to this, other than the obvious security issue.
    2. Create multiple vservers and point them at the same serverfarm. I tried this and I got some odd results with the health checks.
    Any ideas? Thanks a lot.

    you listed the only 2 options available.
    The advantage of solution #2 is that you can apply specific config for each protocol ie: for HTTP you can turn 'persistent rebalance' if needed.
    If you want to use specific probes [not icmp], it is also a good practice to create a different serverfarm for each protocol.
    Like this, if the HTTP service goes down but not the server, you can still have other protocols loadbalanced.
    Regards,
    Gilles.
    Thanks for rating this answer.

  • What is the best way to migrate from Forms to ADF?

    We are in a big quagmire. Our company has been into Oracle Forms development for over 15 years. We have applications developed in Forms 6i and 10g. We have about 5 products and these 5 products have about 25 to 30 different versions. i.e. we maintain about 30 different versions of our applications. Each version of the application has about 100 forms and 100 reports.
    Now, since Forms has come to the End of life from 11g we want to move to ADF. We tried Forms to ADF migration tools but failed. So now we have decided to manually rewrite the applications in ADF.
    Our Forms / PL/SQL developers, designers and analysts (total about 40) are all Oracle Forms people. They have no experience in Java.
    What I want to know is:
    (1.) What is the BEST way to achieve this?
    (2.) Do we have to learn Java, JSF and ADF?? (i.e. All 3)?
    (3.) Is it mandatory to learn JSF??
    (4.) Assuming, comprehensive training can be given, how long will it take for Forms people to learn ADF?
    (5.) What type of training will be required?? (Java, JSF, ADF, JDeveloper etc.)
    (6.) How LONG will this take? i.e. to train all 40 and then get rewrite an application of 100+ forms and 100+ reports? (Ballpark is OK).
    (7.) Any other technologies we should learn??
    Edited by: user12240205 on Jul 18, 2012 5:48 AM

    Obvoiusly the longer you have for training the better but I think the minimum would be
    1) Java skills - I think to start off, 1 or two days reading something like Head First Java http://www.amazon.com/Head-First-Java-Kathy-Sierra/dp/0596009208
    2) I'd then get "The Quick Start Guide to Fusion Development" http://www.amazon.com/Quick-Start-Oracle-Fusion-Development/dp/0071744282/ref=sr_1_1?s=books&ie=UTF8&qid=1343201618&sr=1-1&keywords=jdeveloper+quick (declaration: I'm the author so have a vested interest, but I still think its a good place to start. - this should be about 2-3 days to read and also to try things out.
    3) In parallel I'd be watching these ADF Insider Basics http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfinsider-093342.html#a1 - a couple of hours
    4) I'd then try this tutorial http://www.oracle.com/webfolder/technetwork/tutorials/obe/jdev/obe11jdev/ps1/ria_application/developriaapplication_long.htm - 3 hours.
    5) Optionally, if you are coming from a Forms background I would also read http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/SummitADF/SummitADF_Redevelopment.pdf and watch http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/Forms_Redevelopment_ADF/Forms_Redevelopment_ADF.html - which is about 2 hours of work.
    I think this would be the absolute MINIMUM to at least be able to build some basic applications and to start feeling your way - everything else outlined in the "ADF COLLATERAL TOUR" http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/ADFTour/ADFTour.html could be learned as you start building some proof of concept. However, I'd wouldn't suggest you try building a real application with only one weeks exposure (in the same way I wouldn't expect you to design a product database with only one week training). I would probably expect your developers to have at least the above training and then spend about a month or so (minimum) building proof of concepts (or testing themselves with the ADF Insider Essentials Tasks). Furthermore, I'd probably expect you to have at least on senior developer/architect, with much more experience who can be making decisions on things like reuse, partitioning, architecture etc.
    Of course, this is all subjective but I hope it helps.
    regards
    Grant
    ps
    Of course, we also have formal Oracle University Training courses which you could attend (or they can be purchased to watch on line).

  • What is the best way to learn SAP-ABAP

    What is the best way to learn ABAP??
    Stick to SAP press books and understand and learn theroitically
                                            'or'
    Move to ABAP programming and experiment all the things you have learn.
    If both want to go hand in hand and if we want to do more practise, where can i find a source of abap programming questions (like codechef for java,c,c++..).  Bcoz understanding new concepts require practise and to creating programs to practise is a really difficult.
    Thnak you
    Md Omar saleem

    Hi,
    Do the SAP course (BC400 - 5 days - it is a great course) and then practice practice practice.
    The language itself is not difficult, but finding your way around the SAP system can be challenging.
    Try to do real-life examples.
    good luck!
    Paul

  • What is the best way to create CRUD datagrids

    What is the best way to create CRUD datagrids that tell CF
    components to update sql tables. I find that I'm having to vreate
    all these columns with custom properites and its a bit of a chore:
    <mx:DataGridColumn id = "NatWest" dataField="NatWest"
    headerText="NatWest" editable="false"
    wordWrap="true"
    textAlign="right"
    headerStyleName="centered"
    labelFunction="price_labelFuncNatWest"
    sortCompareFunction="price_sortCompareFunc">
    I don't really want to use any wizards as I want control over
    my code.

    Hi Saythj,
    When mentioning "a database schema from XML", do you mean the
    XML Schema Collections? If that is what you mean, when trying to import XML files of the same schema type, you may take the below approach.
    Create an XML Schema Collection basing on your complex XML, you can find
    many generating tools online to do that.
    Create a Table with the above created schema typed XML column as below.
    CREATE TABLE youTable( Col1 int, Col2 xml (yourXMLSchemaCollection))
    Load your XML files and try to insert the xml content into the table above from C# or some other approaches. The XMLs that can't pass the validation fail inserting into that table.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • What is the best way to produce different report types out of the same SSRS Report

    So I have a request to produce different report types based on a "Line Of Business" Parameter that is provided. I know that SSRS sometimes struggles with gathering the Metadata based on IF Statements.
    What is the best way to provide multiple different report types with different data based on the "Line Of Business" Parameter that is provided? Can I simply do this via the SQL Stored Procedure? And how so that the Metadata is collected correctly?
    Just don't know what the generally accepted business principle is on this and how to go about doing it.
    Thanks in advance for your review and am hopeful for a reply.

    Hi ITBobbyP,
    Per my understanding that you have create an parameter (Line Of Businiess) to get diffetent types of report, I would like to confirm with you want do you mean about the different report types?
    Is that mean you have table and one column named Report type, you want to filtered on this column? Or the report type you mean is like Parameterized reports,Linked reports,Snapshot reports,Subreports and so on.
    If want you want is through the selection of the parameter to change the report type(Parameterized reports,Linked reports,Snapshot reports,Subreports ..),currently it is impossible to acheive this.
    If you still have any problem, please try to provide more details information about your reqirements, the sampe data in the table, the report structure you have designed and so on.
    Any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • What is the best way to add "meta tags" in edge?

    Trying to add meta tags for search engines, what are the best ways to do this?

    With the latest version of Edge (3.0) is still the best practice to edit index.html or is there a better one?
    Y try for example...
    var meta1 = '<meta name="robots" content="index, follow" />';
    $(meta1).appendTo("head");
    ...in creationComplete or in document.compositionReady but I can't see these lines in index.html file, are stored in index_edgeActions.js file.
    But maybe that works to attach the meta tags with append to head because it does work fine (and neither are saved in the index.html):
    var favicon = "<link rel='shortcut icon' href='images/volicon.png' type='image/png'/>" ;
    $(favicon).appendTo("head");
    I don't know if Google detect meta tags stored in index_edgeAtions.js or is more recommended to modify index.html manually with notepad.
    Maybe the best practice are save and publish Edge project with a name different than index (for example project.an and project.html) and to create an index.html manually with meta tags, code of Google Analytics and Google Tag Manager, etc., and with HTML meta http-equiv Attribute for to redirect immediately to project.html generate with Edge (remember disallow project.html in robots.txt). In this way is not necessary to modify the index.html file each time that we publish.
    How do you see?

  • What is the best way to implement Spiceworks and get started?

    Yes this is the most basic question of all, how do you use it?I did search for some articles but there are tutorials that are 6 years old, or maybe a year or two old. I want to make sure I'm up to date on best practice.I've got a network of 8 PCs and 6 laptops or so as well as phones and tablets (if SW cares).I've got this community user which I created long ago when I first tried to test SW.My question is, what is the best way to get SW going? I mean, do I create a new user that is specific to the company? Is the community user different from the SW admin user? I want to separate my community user (which is me personally) from any local business/network implementation of SW.Do I need a server to run this or is something run on each workstation? Does each computer need something done to it so SW can work right?Basically I just need to...
    This topic first appeared in the Spiceworks Community

    In Settings tap on Reset at the bottom then tap on Erase all Content and Settings. This returns it to the condition of being "new."

Maybe you are looking for

  • Layout issue in export multiple queries to single excel

    Hi , While exporting more than one queries on web template to single excel (with help of  HowToWebPrinting document ), i am facing layout problems. EX. if my web template has 4 queries  in below format A B C D where A,B,C,D are different queries on w

  • Trying to Buy Book is driving me mad...

    Using iLife 8 . Book all complete, photos all checked and placed. 20 pages crammed with photos, text where it should be, no alerts . Then push Buy Book and a box comes up saying : Your book seems to have frames on one or more pages that do not contai

  • RP-IMP-C2-B2 macro in HR ABAP?

    Hi Experts, I am new to HR ABAP programming.I got a requirement  to modify existing  customized program.In that customized program ,RP-IMP-C2-B2 macro is called ,and this one is returning ZES internal table.This intenal table is used in the program.K

  • Word for Mac 2008

    Where can I ask usability questions for applications like Office for Mac 2008? Thanks.

  • Iphone 6 plus stock on sept 19

    Will local verizon stores have some iphone 6 plus stock for Sept 19th launch date.  Just want to ensure that I am not wasting my time if I plan on lining up before the store opens on that date.