Here is what I have:
1) a simple sql file given to me that creates tables and fills them with data
2) a simple sql file that contains PL/SQL procedures I've written for displaying/manipulating the tables
The goal is to create some sort of user interface that allows a student to login, view their transcript, withdraw from classes, etc.
I am using sqlplus. I have procedures that do all the required displaying/manipulating. I am successful at creating a simple command line UI with sqlplus, but the problem arrives when I need to get user input inside a loop (for allowing them to see course information for any number of courses until they wish to go back to the main menu). After doing research, I learned that this would be the job of something like PHP, C, etc. Unfortunately, I am not proficient in any language required, and setting up extensions and such have proven to be extremely complicated.
I am capable of learning the necessary techniques to complete this, but I do not know which direction to go in. What is easiest to implement a simple UI? Should I use PHP? C? C++? Is there some sort of program out there that automatically creates simple UIs given database data?
Oracle Apex is perfect for your situation. You can easily create web based forms and reports to perform all CRUD operations. Plus, it's free to use with any licensed Oracle database: Oracle Application Express
Related
I've been asked to evaluate whether Oracle PL/SQL could be used to perform a re-design of a piece of Fortran code that our organisation has used for years.
This code interacts with our database and cycles through a list of newly registered web users, providing their details to a helpdesk team. The code then asks the helpdesk team if they are happy with the user details, through a Y/N? If Y, the code then proceeds and asks the helpdesk team, again through a series of Y/N statements if certain other statements are true. At the end of every Y/N, there is a write to a row on one or more database tables.
Once it finishes these enquiries with the first user, the code then loops and repeats for the next user in the list.
I know Oracle PL/SQL allows the use in scripts of input variables through & and &&, but I don't know if the use of these input variable forms is allowed within functions and procedures?
Can someone clarify please for me if & and && can be used within PL/SQL code such as functions and procedures?
If not, that's fine - I'll just then have to approach the design process differently.
Thanks
No, that won't work in stored procedures. PL/SQL runs on the database server and isn't supposed to interact with users. You can pass values via its parameters (arguments), but that's it.
But, if you're on Oracle, consider using its Application Express (evaluate it on apex.oracle.com, it is free to register and use). In a matter of several clicks (well, not really, but suppose it is so), you can develop a web application which would then be used by users. You'd create a progress list navigation which would lead you from one page to another; you'd ask questions and on each press on the "Next page" button you'd store their answer into the database.
So, if you do know some (PL/)SQL, you might do that rather easily.
Illustration:
I am currently creating a vb.net program in which users upload a song file to the program and then it is saved within the programs files. I have set up the actual saving of the files but would also like to store some meta data of each in a SQL database within my program.
I have looked online and although i now understand the basics of SQL, im still a little fuzzy on how you actually implement this within VB.net. I have already added the library- Imports System.Data.SqlClient but failed to work out how to begin coding in SQL.
The basics of what im trying to acheive is a if statement that will determine wether or not a SQL database has been created in a specific location, and if it hasnt it should create it.
All constructive answers appreciated, thanks.
There are a number of different database engines available. The namespace that you have chosen contains the ADO.NET client classes for Microsoft SQL Server. You would use a connection string to specify how to connect to the database. This would often contain connection information, such as server name, user name, password etc, but it sounds like you want to store data locally.
There is a local version of SQL Server called LocalDB, but I think you would still need quite a lot of the SQL Server components installed for that to work. Although you can package these with your application they may be too large for you, so you may want to look at SQL Server Compact Edition, which is much smaller and allows you to package the whole engine as part of your application and is useful for storing data locally. Compact edition doesn't have quite all of the features that LocalDB does, so you may want to compare the features available for each.
Although you can use the ADO.NET objects to connect to a database, I think most people these days would use a layer on top which transfers data back and forwards between objects in memory and the database. This also allows you to use Linq to query the database in most cases. I personally use Entity Framework. You might want to look into that. There are different ways of configuring EF so you may want to look at a tutorial. Once you have it set up, you will probably find it much easier and safer to work with than writing SQL manually though.
I am creating a software for retail shops and I want that my software support SQL Server and SQLite. If the user is a standalone (one PC) select the sqlite database and if it is over the network then choose the SQL Server option.
I am developing this software in Visual Studio 2010 and vb.net language.
As research we have three types of connections in Visual Studio, ODBC, OleDB and MSSQL.
And OLEDB can support MS-Access database and SQL Server.
Any comment and idea is highly appreciated.
The best way to code your applications is to abstract functionality into different tiers or layers. This can mean lots of things and can get quite complex, but the general idea is to keep your application's parts separated. Let's assume you have an inventory form in your program where you can look up current inventory. The form that displays the inventory doesn't need to know what database your customer is running. Generally you're better served by it not knowing. Likewise, your code that accesses the respective database, whether it be SQL Server, SQLite, or Access, doesn't really need to know what your Inventory form is going to do with the data it is retrieving. All your Inventory code should be doing is displaying your inventory in a way that's most useful to your customer, and all your data coding should be doing is getting the data that is requested of it.
The route I would probably take in your situation is to create a data provider class. Inside that class is where you would encapsulate logic for the different database functions you may have, as well as the different database systems your customers may have. Say for instance a store owner just received a shipment of products and needs to add one to his store's inventory. Ideally, your program should simply be able to perform a call like DataProvider.AddInventory(). Inside the DataProvider class, you would write code to keep track of which database solution the customer is using as well as an implementation of logic for each of the database solutions you'd like to support. Ideally, you should implement every data function you may need your application to perform so that it can be called very simply like the AddInventory() example.
Implementations of data providers can be as simple or complex as you like. In some cases where you're going to have multiple applications written in multiple different languages on multiple different platforms accessing your data source from multiple locations, it may make sense to write some sort of middleware. In your case, it sounds like this is the type of application that will reside "in house" and should be served fine by abstracting the data access to a separate class.
I am currently updating a java-based web application which allows database developers to create stored procedure regression test suites for database testing.
Currently, for test setup, execution and clean-up stages, the user is provided with text boxes where they are able to enter SQL code which is executed by the isql command.
I would like to extend the application to use DB Unit’s DatabaseOperation methods to provide more ways to setup the state of the database than just SQL statements. The main reason for using Db Unit rather than just SQL statements is to be able to create and store xml and xls DataSets on a server where they can be associated with their test cases and used for data setup.
My question is:
How can I provide users with the functionality of the DBUnit DatabaseOperation methods from a web interface?
I have considered:
Creating a simple programming language and a parser to read some simple syntax involving the DB Unit method names which accept a parameter being the file location to an xml or xls DataSet. I was thinking of allowing the user to register the files they need with the web app which would catalogue them and provide each file with an identifier which could passed as a parameter to the methods in this simple programming language.
Creating an XML DTD which provides the user with the ability to specify operations and parameters. If I went this approach, how can I execute the methods and their parameters that I parse from the XML document?
Creating a table in the database which stores the method and a FK relation to a catalogued DataSet file, however I don’t think this would be good solution due to the fact that data entry would be tedious.
Thanks for your help.
This actually seems like rather simple problem when I think about it again.
DBUnit has plugins for Maven and Ant integration which run tests written in XML in the Maven POM file.
I'm going to take a similar approach and go ahead with the XML option using the Xerces-J parser and create a collection of Operation, Export and Compare objects which are run in order.
For instance, will I be able to create an application that allows users to create and modify existing types at runtime? Will I be able to persist instances of those types in SQL without having to worry about the user who adds 100,000 records and expects a (really) fast query on them?
Think SharePoint Content Types... but on steroids. Oslo steroids - Possible or not?
That would be awesome!
In the demos, they create the new extent, and then a (updatable) view with the old name.
But I haven't heard about a feature that would automatically merge existing data into the new structure, though. For now, they suggest using SQL Server Integration Services for that part - but then it's a DB-Admin task.
Regarding performance, after MSchema is compiled to SQL statements, it's all plain SQL Server performance.