I've seen a few similar questions to this one, but none that were quite the same. Anyhow, I have a stored procedure that ends with the lines,
select SCOPE_IDENTITY()
return
I then get the value by calling executeScalar(). This works perfectly. However, I feel like it would be more correct to just end with return select SCOPE_IDENT...
I'm about to start developing a product (in .NET), and I'm evaluating open source database engines in order to avoid adding licensing costs to the overall cost of my product.
Which ones do you know that are potent? Is MySQL a good alternative? What kind of website load can it support?
Do you have any experience using an open source dat...
I'm several layers/levels above the people involved in the project I'm about to describe.
The general requirement is for a web based issue management system. The system is a small part of a much larger project.
The lead pm has a tech pm who is supposed to handle this portion of the project. The lead pm asked me if it's normal for t...
hi,
Im writing a program at the moment(below) that interacts with a MySQL database and im having a problem. As you can see ive written a query that will look for products in the products table that corresponds to the barcode that the user has inputted. If the barcode that is inputted by the user is found in the products table, I want to ...
Hi world,
I was wondering how you guys actually develop large applications when you are your own boss. For myself I have been learning the hard way the necessity for patience and hope.
I have been working on implementing an application (in the form of a series of scripts linked to a database) that clusters wikipedia articles using a co...
I'm writing a rake task that does some DB work outside of Rails/ActiveRecord.
Is there a way to get the DB connection info (host, username, password, DB name) for the current environment as defined in database.yml?
I'd like to get it so I can use it to connect like this...
con = Mysql.real_connect("host", "user", "pw", "current_db")
...
Hi,
I can see in the postgresql logs that certain simple queries (no joins and using only match conditions that use indexes) take anywhere from 1 to 3 seconds to execute. I log queries that take longer than a second to execute thus there are similar queries which execute under a second which don't get reported.
When I try the same quer...
So, I'm trying to use ADO.NET to stream a file data stored in an image column in a SQL Compact database.
To do this, I wrote a DataReaderStream class that takes a data reader, opened for sequential access, and represents it as a stream, redirecting calls to Read(...) on the stream to IDataReader.GetBytes(...).
One "weird" aspect of IDa...
I am using the Microsoft.Practices.EnterpriseLibrary Database tools and I'm having trouble creating a new database using just the connection string information.
Ideally I would like to do the following:
Database dbEngine = DatabaseFactory.CreateDatabase(
"Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SS...
Just wondering which is faster:
DELETE FROM table_name WHERE X='1'
DELETE FROM table_name WHERE X='2'
DELETE FROM table_name WHERE X='3'
or
DELETE FROM table_name WHERE X IN ('1', '2', '3')
Any ideas, hints, or references where to read?
Thank you all!
...
What is the worst SQL query you've ever seen? What made it bad?
...
When running a query like "insert into table " how do we handle the commit size? I.e. are all records from anotherTable inserted in a single transaction OR is there a way to set a commit size?
Thanks very much,
~Sri
PS: I am a first timer here, and this site looks very good!
...
I read this post last night, and I noticed it was from 2006. I could go either way on the ORM, database thing, but I was just wondering if everything bad Jeff said about ORM still applies even now considering the post is from 2006.
...
With Hibernate+Eclipse you can generate POJO classes that represent the tables. You can then wire it all together pretty easily with Spring. However, if you have to interact with stored procedures you have to wrap each one in it's own class(es) -- although this is definitely preferred to standard JDBC it is still a bit cumbersome at time...
In working with objects and interfaces what is the best practice for writing to the database? There is a plethora of opinions regarding the object design but I am unclear about the database end. A simple example:
Suppose a Contact base class that contains the common fields such as contact name (Bill, Fred, Sally) and a location (home, ...
I'm currently developing a pretty big project, and I'm considering open source databases to use.
One of the main factors I consider is support, and it seems like there is not much support/community for PostgreSQL compared to MySQL, even though MySQL seems like a much less fully featured product than PostgreSQL.
Should this fact shape m...
I want to be able to pass an "array" of values to my stored procedure, instead of calling "Add value" procedure serially.
Can anyone suggest a way to do it? am I missing something here?
Edit: I will be using PostgreSQL / MySQL, I haven't decided yet.
...
Let's say we have a continuous integration server. When I check in, the post-hook pulls the latest code, runs the tests, packages everything. What is the best way to also automate the database changes?
Ideally, I'd build an installer that could either build a database from scratch or update an existing one using some automated syncing m...
Hi,
I have an application that saves data into a table called Jobs. The Jobs table has a column called Name which has a UNIQUE constraint. The Name column is not PRIMARY KEY. I wonder if I should check for duplicate entries myself before I try to save/update a new entry or if it's better to wait for an exception thrown by the data acces...
I'm having a small problem with a Python program (below) that I'm writing.
I want to insert two values from a MySQL table into another table from a Python program.
The two fields are priority and product and I have selected them from the shop table and I want to insert them into the products table.
Can anyone help? Thanks a lot. Mar...