Calling from an Sybase Database ODBC - php

I am writing a scheduling program for my company and I wanted to pull information from our Management Information System to supplement the schedule. The MIS has information on all of the jobs we need to run including due dates, piececounts, operations, estimated run times and other valuable information for a scheduler. I talked to support for the software and they basically stonewalled me. They kept avoiding my questions.
When I forced the issue by having the CEO call them, they gave up the database was a Sybase database and that it was ODBC compliant. Then they me a 500 page document of the data mappings of the database, but no explanation. Looking through it, i can tell a lot of it is just general settings for the software, and i believe i found the tables that store the job information. But i have no idea what the fields in the table are.
I connected to the ODBC connection successful in a python interpreter shell. I did a select * from table statement and i got a crapton of information back. But i dont know what i selected. Is there any way to see what fields im collecting information from?
So Basically I am asking if there is a way to know what information i drew from a table without knowing the field names.
Thanks

If I were the CEO, my first thought would be to buy scheduling software before I'd ask an individual or team in my company to write such a thing. It's a difficult but important problem. Why would you want to develop, debug, and maintain such a thing? It's been solved. I'd rather just use an existing solution. Just saying.
I am asking if there is a way to know what information i drew from a
table without knowing the field names.
The field names and types are the easy part. You can ask Sybase to DESCRIBE TABLE. It'll give you all the column names and types.
But it won't have any meta-data that gives you business context for what they mean. You'll have to go back to that MIS group, domain experts, or know the process well yourself to figure that out.

Related

How can I 'push' data from one table to another in MS Access?

This is my second attempt to try an figure this out. I looked at other answers and tested the answer I got from my previous post.
Found here:
How do I link an Account table with an Order table in MS Access 2013?
There is a catch to this that doesn't work for me. The main reason is that the orders are highly customized and not predefined.
I sell shirts and they can customize the picture and the monograms (among other things) versus selling a specific shirt that can be stored and picked from the database.
I normalized my tables as much as I can down to two possibly three. An Account.tbl (account number, shipping info and payment method, etc.) and an Order.tbl (shirt color, picture attachments, monograms, etc.) A possible third table (account.ID and order.ID).
I asked a collegue of mine and from what I understand this may be something for PHP to handle. I don't know the first thing about PHP or really Access either. I just make shirts. :)
I am assuming I would need a button that when pressed:
1.) Saves the data
2.) Pushes/Exports the account.ID from the Account.tbl to the account.ID on the Order.tbl
3.) Changes from the Account.frm to the Order.frm
I have #1 and #3 accomplished. But I have not found a way to do #2 from Access alone.
I have tried building relationships with the Primary key and Foreign key but it doens't keep track of who is ordering what. My tables just fill up with unrelated data. :/
Is there a solution in Access? Would PHP solve this? Is there a simple PHP code for this? If not, where should I start looking in PHP language?
Any help or suggestion would be appreciated.
If you don't have any prior knowledge of PHP then don't waste your time learning about it just for this project.
If you are building a database application to run on your own computer and you already have Access 2013 then that's all you need.
If you intend to build a web application that your customers can access over the Internet then you might benefit from knowing a bit about PHP, depending on the tools or framework you use to build your site. However, in that case you should not be using an Access database as a data repository for a web application.

Difference between mySQL and SQLite in simple terms - Database Solution

I seen many questions posted but not these two exactly. I also tried reading the Wikipedia definitions but I don't have enough technical understanding to know what it is saying exactly.
I am looking for a database solution where the User of a website can enter customized data into the columns in an Order.tbl and link it to their account in the Account.tbl.
Scenario:
I make customized shirts. The user would need to log in to their account and order customized details such as pictures and personalized text which could differ from User to User. It would need to be dynamic in this way versus a static selection of shirts.
The software I use to make the shirts can connect to an MS Access database, SQLite database, mySQL database and a few other flat file databases like Excel and CSV.
Currently my software subscription is with Access and SQLite and was informed that Access would not work in my case because I am using web forms. Which leaves me with SQLite or upgrade to handle mySQL.
The only thing I really understand is that mySQL is more robust than SQLite but I am unsure if I actually need it or not.
Any suggestions for a beginnner?

Using Sqlite in a web application

I'm currently developping an application which allows doctors to dinamically generate invoices. The fact is, each doctors requires 6 differents database tables, and there could be like 50 doctors connected at the same time and working with the database (writing and reading) at the same time.
What I wanted to know is if the construction of my application fits. For each doctors, I create a personnal Sqlite3 database (all database are secure) which only him can connect to. I'll have like 200 Sqlite database, but is there any problems ? I thought it could be better than using a big MySQL database for everyone.
Is this solution viable ? Will I have problems to deal with ? I never did such an application with so many users, but I thought it could be the best solution
Firstly, to answer your question: no, you probably will not have any significant problems if a single sqlite database is used only by one person (user) at a time. If you highly value certain edge cases, like the ability to move some users/databases to another server, this might be a very good solution.
But it is not a terribly good design. The usual way is to have all data in the same database, and tables having a field which identifies which rows belong to which users. The application code is responsible for maintaining security (i.e. not to let users see data which doesn't belong to them), and indexes in the database (which you should use in all cases, even in your own design) are responsible for making it fast.
There are a large number of tutorials which could help you to make a better database design; a random google result is http://www.profsr.com/sql/sqless02.htm .

Dynamic Database System with php and mysql

Please I am creating a database system for a group,using mysql and php.I am faced with some challenges,these are
1.I want to make the database system dynamic - thus where an administrator using the system would be able to add columns to a specific table from the front end without having to know something about mysql and php.
2.Also,I want the administrator who is ignorant of mysql and php, to be able to add tables to the database through the front end (PHP page).
3.With the aforementioned problems in (1 and 2), how would I make the columns added by the administrator appear on a form (php page) from the database, and how do I check for errors on the form.
Please these are instances to clarify what I have said.
a.What should I do to make a client add columns to an existing table in the database without any assistance from the technical team?
b.What should I do to make a client add tables to an existing database without help from technical team?
c.How do I output columns added by an administrator to a form and also check for errors on the form (php page) .
Any help is welcomed.Thank You
Well basically you can just write queries like ALTER TABLE xxx ADD column VARCHAR(100) etc. filling in the desired values from a form. This is, however, strongly discouraged. Not only would this mean your script would be able to execute queries which normally can only be executed by (mysql) users with administrator rights, it is also very susceptible to security problems.
Reading your question immediately starts me to think of an EAV-like1 database system, although it is a highly controversial scheme to use in a relational database system like mysql, to use on any system actually...
A few problems that come to mind (most points apply to EAV too btw)
You will lose any logical structure
As any type of data can be linked to any type of entity, so - in your database at least - there is no logical relation between your attributes (or columns in your case) and your entities (tables in your case), other then just being present.
Very, very hard to maintain
If your tables grow, what columns should be indexed? How would you prevent from someone ignorant - and as you say they are by default - adding 200 columns to a table? Numerous other problems can be summed up here...
What about restrictions?
How are you gonna decide who is allowed to add/delete/edit what columns? And how are you force them to choose the right column-type? Or when a table is added: what should be the (coumpound) primary key? Remember: your administrators are ignorant. I guess this would rise the need for meta-tables, holding this kind of information. Are you sure you want to write all the logic for this? And are you sure you are wanting to keep track of bugs etc, bugs which will most probably allow your system to collapse like a card-house?
It smells like an excel sheet...
Without functions that is, but still. So why not send your administrators a link to google docs? ;)
No really, it sounds like a very bad idea...
Please post your full user-case, I'm quite sure we can think of a better solution then adding columns and adding tables to a database.

Anyone have experience integrating with MYOB?

Looking to integrate a web application with MYOB. There's not much in terms of documentation out there. I've found a couple of companies that provide middleware, but nothing promising. Just thought I'd see if anyone else out there has had experience with this and might be able to save me a bit of time.
Cheers
Depends what you want to do with the myob database.
Retrieve information is fairly easy, there is a myob odbc connector you can install.
Write permission requires you to be a myob developer partner, costs you a lot more per year.
I did a job to synchronize data from MYOB db to MySql. So all the updates in myob db is reflected in mysql, but not the other way around
You may want to wait...
MYOB is overhauling their 90's style application (netbios/etc), moving it to .net framework with an API (they said it would be done Q2 2009, moved to Q2 2010).
They have non complaint SQL syntax (insert/select), yes that's right only two keywords... (the idea is if you screw up the query, say to an invoice, you have to write a insert into the credit table)
Unfortunately, read/write functionality doesn't come with the MYOB licence. If I can remember correctly it was Read for AUD$250 one time and AUD$800yr for write permissions. Most companies can afford as it cuts down on labor.
The ODBC driver hard to use, because it executes the MYOB application and leaves it in the background. (you may want to create your own rest service to query)

Categories