Connecting Vb.net 2013 and Web into mysql - mysql

okay. before we begin our project I just want ask
does the vb.net 2013 and web(online) can have a 1 database only one database(my sql)?
the name of our project is library system using barcode and the panel added a website for the user to reserved a book online
and the panel said that both system and the website must have only one database.. is that possible?
and before we begin what (mysql) database should i use in our system, what should i download in this site http://dev.mysql.com/downloads/ ??? do we need a sql connector ???
or can i use the mysql in wamp to connect both system and web? is that possible for vb.net 2013 and web?
I really lost about this,, so pls help me thanks....

You can connect any amount of items to a database provided that your server can handle the connections. All that is needed is the connection string to open a connection, then you need to handle data readers and the such (I prefer to use entity framework).
As for having only one database, think about what would happen if there were two databases. I go online, reserve the book in one database, but then you go to the physical library 5 minutes later and check out the book that I reserved because it does not show reserved in that database. See the problem? Both need to use the same database for book tracking or else you run into situations similar to what I just mentioned.

Related

How to export SQL database?

I am a beginner in learning SQL and i am just wondering if i happen to build a database for let's say a customer. How would i actually give the completed database to the customer ?
For example, the customer is a school and i made a database of their students and teachers in SQL then in what ways i could give the completed database to the school authority.
Thank you in advance !
The easiest way is to take a backup of the database. The backup file can then be passed to the customer and restored in their environment.
Depending on your SQL flavour the backup and restore commands may differ.
However if you are just intending to pass data from the school hosted database to the local authority, then you would want to export the data to a format that the LA can support (e.g. CSV or XML).
Not sure I completely understand the problem but if this is for an application with a small database, and by small I mean about a dozen table, I build would it using an embedded database such as SQLite. That way you your application will come complete with a built-in database all developed into one executable file. I have worked with SQLite in the past and it is a very robust database that can store and retrieve very large data sets. It also interfaces quite well with other languages such as Perl, C++, Java, etc. You may be surprise to find out how many of your current phone apps come complete with a backend database embedded in them.
here is for sql server steps for you . After step 6 you have 2 more finalization steps to confirm all you have done. Your restore sql code is towards the end after step 6
RESTORE DATABASE [db_name] FROM DISK = 'X:\MSSQL\Data\FullBackups\db_name.bak' WITH RECOVERY

Using MS Access as a front-end to MySQL db

I am using MySQL DB for my android application. I have installed phpmyadmin on my Ubuntu LAMP server and using it to access my DB. Is there any possibilities to access the DB using MS access 2010, as I need to do perform modifications on a regular basis to my DB
If the aim is to change the data and not the structure, using MS access is a good solution, as you can edit anything in linked tables very efficiently with litlle setup efforts.
To achieve this, first you need to download and install the MySQL ODBC driver.
In order to avoid issues, I advise you to install the 32 bit driver, even if you're on a 64 bit system. The 32bit will work flawesly, which is not always the case of the 64 bit.
Once installed, open the ODBC control panel and add an entry pointing to your MySQL database
Then in Access you can add linked tables using this ODBC entry
Once the table are linked, they will behave as if they are MS access tables and you can open them and edit data, and much more.
You can use Microsoft Access as a front-end to your MySQL database.
Refer: MySQL Documentation
But for your case, directly accessing database is wrong. I suggest better you have a view page with php to update DB with proper required validations.
The answer by Thomas G does an excellent job of describing WHAT we need to do, and even provides some good links.
What we need now is a good, step-by-step description of HOW to accomplish all the steps Thomas G describes.
I've been looking for this for a long time, and still no luck. However, I'm possibly on the track of getting that answer, and if I find it, I'll come back here and post it.

publishing Filemaker (database software) data on Wordpress website

We would like to be able to publish Filemaker data on our Wordpress website. The website is up and running and the filemaker database is set up. We do not need a live connection between both systems so we chose to export the FM data to .csv so we can import it to the mysql database on the server and from there we would like to display in on the website.
Now are my questions, since this kind of development is new to us:
can I setup an automated import to the mysql database from a source like dropbox or something? For example can we make the mysql database import and overwrite the existing database each 24 hours from a .csv file located somewhere? We need this automated overwrite option because the FM data changes often and we need up to date info on the website)
How can we display the data from the mysql database on the WP frontend?
I've been looking into this myself and couldn't find any clear answers or guides. Can you guys point me in the right direction?
(btw, I know there are table plugins I can use for WP but they do not fulfill our needs, and I think it's exciting to do it all by ourself with help from this great community)
Update 01
I've successfully connected FM with my MySQL db using ODBC and can now select tables from the MySQL db in FM's relational graph.
I was wondering how I can write the data from my existing FM file to the MySQL db using ODBC, can anybody help me on this?
I would like to display the data in some MySQL tables so I can fetch them using php on my website.
Thanks!
It is possible to write directly into (and read from) a remote MySQL database from FileMaker via ODBC.
You need an MySQL account which allows remote access. There are providers where this is not allowed.
On the local box the odbc driver needs to be installed. On Win you can use the open source version (http://dev.mysql.com/downloads/connector/odbc/), on Mac it works better with the Actual Tech (http://www.actualtech.com/de/product_opensourcedatabases.php) drivers.
An odbc system dsn (not user dsn) is set up. Be sure to use the 32-bit odbc manager on Win.
Now you can create the external data source within FileMaker and read and write into MySQL tables.
Once you have made the connection to the MySQL database, and you can see the shadow tables, you can write to the fields directly via Filemaker layouts. It's as simple as that.
Once the layout contains the fields from the MySQL database you can move through records, find stuff all as if the data were native in your FM database. Of course, for more automated processing, you can create scripts, relationships etc and manipulate/synchronise data. Be warned though, the connection speed can limit complex relationships and large databases. I would advise 'baby steps'.

SQL Server views not available via ODBC (reverse Engineer)

SQL Server 2008
Visio Pro 2003
Access 2003
System DSN used
I need to reverse engineer a SQL Server db, however the 'Views' box is "greyed out" when I attempt to do so (stored procedues are also "greyed out" but unecessary for my needs at this stage). I am using a SQL Server account that has sys_admin rights to connect via ODBC (ODBC needs to be used because Visio won't recognise the native connector, a well documented deficiency, and a trusted connection can't be used as I also have local admin rights and our company refuses to recognise local admins on cross machine connections). This is using the ODBC SQL Server type of connection. If I change the ODBC connection to use the native client type it allows me to select the stored procedures, unfortunately the views box is still not able to be selected.
I connected with Access using the plain SQL Server type of ODBC to see what I would be able to link and it allows me to see all tables, views, including system tables and views, which tells me the sys_admin rights are being preserved through the ODBC connection.
Am I missing something here? A number of searches on SO and Google have turned up nothing about why Visio can't see certain objects (disregarding security permissions as I have admin access), and being able to "see" them via Access has made me a bit more frustrated, as I would assume both products utilising an ODBC connection of the same type would encounter the same restrictions and functionality.
How do I get Visio to let me use the "Reverse Engineer" functionality to put the views from the SQL Server into my Visio document? I've done this before with other servers in the past.
I have created several new views in a SQL database and was unable to see them when attempting to link to them via Access. It always comes down to the fact that I have not given the user "Select" permission to either the SQL Database or the view. Be sure to check this. Just my 2 cents worth.
tl;dr
Don't use the OBDC driver, use the Access Visio driver.
Why?
As found here on SO:
An old thread but still a current problem ... I found that although
using the ODBC Generic Driver worked, the reverse engineering tool
then misses out Triggers, Check Clauses, Views and Stored Procedures.
By specifying the Access Visio Driver instead, at least we recover the
Check Clauses and Views.
In general, though, I have to say I think this shows an appalling lack
of regard for their customers on behalf of the relevant teams at
Microsoft. I had a very similar experience last year when upgrading to
Visual Studio 2010 only to discover that my SSIS projects no longer
opened ... as can be seen from this thread, MS could not care less.
There is really no reason to assume that a reverse engineering tool that's capable of documentation or diagraming the relationships between tables has anything to do with the fact that you have some saved queries? A view is only some saved SQL query and has NOTHING at all to do with relationships between tables.
A saved SQL query (aka a view) is NOT a table design structure. The creation of a view or the deletion of a view has NO BEARING WHATSOEVER IN ANY MATERIAL WAY in terms of the database structures and relationships you build in a database.
As a result the reason why with an conservative estimate of 1 trillion web pages in existence a Google or Bing search results in ABSOLUTELY NO RESULTS for your question.
In other words your assumption that a database ER diagram is to include a bunch of saved SQL queries is a complete and utter fallacy on your part.
Now you might be asking if such a documentation tool exists, but you actually asked WHY you cannot find any information on this subject and the simple answer is because nobody else on the planet and in fact as far as we know in the galaxy makes the assumption you're making.
being able to "see" them via Access has made me a bit more frustrated.
And it's not clear why you show even more confusion by asking why you can utilize such views in an application development tool such as MS Access?
The simple answer as to why you can see these views using Access is because Access is not a reverse engineering tool. In fact Access is also not a database documentation tool either.
Access is a software development tool that allows you to build applications and CONNECT TO A GIVEN DATABASE SYSTEM. Thus MS Access can use a database such as the native database engine that ships with the product (JET or now called ACE). Access can also connect to Oracle, or something like SQL server.
In ALL these cases without a doubt Access can connect to a SQL view since the tool is designed to CONSUME data from the particular database engine. However consuming data from a particular database system is a MASSIVE AND SPECTACULARLY DIFFERENT PROCESS then using a reverse engineering tool to ascertain the relationships between tables.
The fact that a database system has some relationships between tables, or you have enforced relationships that you wish to diagram has absolutely nothing to do with the process of having something document a bunch of simple SQL queries saved in some place. So all a view really is some saved SQL. You can save SQL in code, in text files, or in the case of Access in with what we called a select query, or in the case of SQL server you can save SQL as views.
However, looking at a bunch of saved SQL queries is an entirely different matter then documentation the existence of relationships between tables in a database. Creating views, delete views has ZERO bearing on those relationships between tables.
In fact we see that MS Access table diagram tool does not have the ability to include views in the table relationships diagraming tool included with the product. So in fact MOST development tools do NOT include views in the overall table ER diagram.
So at the end of the day the likely reason why something like Visio cannot simply consume and utilize a bunch is saved SQL queries is that by design such a tool is not intended for that purpose at all.

delphi and mysql DB help

I want to create an application for my friends ,Its like a slam book
I want like this
in nameditbox when i entered name it has to fetch data from database and have to display in respected fields
example : nick name editboz :nick
number:1111
2.moreover i want to add to database new entry from my application by clicking add button
is it possible to edit already existed friends name details ?
I never worked with mysql (even i dont know much ), and i never worked in delphi in accordance with mysql ,not normal dlephi though .
is there any already done project ?if yes please link me i want to learn
hope some one can help me in this
thanks in advance
I have to say I haven't tried this with MySQL, however hope this helps.
For part 1 of your question:
I suggest the easiest way is to use the free MySQL ODBC driver from http://dev.mysql.com/downloads/connector/odbc/5.1.html
Delphi supports connecting using ODBC (Open Database Connectivity). Essentially, Delphi doesn't know about any of the particular features of the MySQL database, but knows about a smaller set of features common across the majority databases.
If you can get this ODBC driver to connect to MySQL, then you will be able to look at all of the good examples on the Internet and in the supplied Delphi help files showing you how to:
Create an ODBC data source in Windows ODBC Manager.
Open a TDatabase connection to the MySQL ODBC data source
Connect a TTable to a TDatabase
Connect a TDataSource to a TTable
Connect a TDBEdit to a TDataSource
You will need to learn yourself how to connect these to a particular table in your MySQL database.
Connecting these components together like this should give you a working example for what you are trying.
You should find lots of good tutorials showing you how to connect to an ODBC database on the Internet.
For part 2 of your question:
Once you have done part 1, reaching part 2 is a small step from there.
Connect a TDBNavigator to the TDataSource.
This will enable you to navigate the table of data and will enable an add/edit/delete feature for the table allowing a new row, deletion of a row and editing of a row.
Best of luck with this.