I'm puzzling with where to place some code. I have a listbox and the listitems are stored in the database. The thing is, where should I place the code that retrieves the data from the database? I do already have a database class with a method ExecuteSelectQuery(). Shall I create Utility class with a method public DataTable GetGroupData()...
There are quite a few independent and not-so-independent studies comparing traditional RDBMSs but I haven't managed to find any good material on in-memory databases. I am primarily interested in ones specialized for OLTP.
So far, I managed to find generic white papers on TimesTen and MySQL Cluster, but I have yet to see a head-to-head c...
Does Postgres automatically put indexes on Foreign Keys and Primary Keys? How can I tell? Is there a command that will return all indexes on a table?
...
From my last question, I have new idea for database protection. The following ports will be connected via SSL only. Is it possible to hack this database server?
Http Port for sending & receiving data via WCF Services or Web Services.
Ftp Port for updating above services.
PS. This question is not include SQL injection problem.
Thank...
Imports System.Data
Imports System.IO
Imports personal_dtls.perds
Imports personal_dtls.perdsTableAdapters
Private Sub insert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles insert.Click
Dim adapter As New perdsTableAdapters.Daily_AttndTableAdapter
adapter.InsertQuery("as", "asd", "...
Hi,
I am using a Mysql table products which has a foreign key category_id on the categories table
the foreign key constraint is defined (Innodb engine).
I noticed that when I run EXPLAIN SELECT * from products where category_id=1;
it uses the foreign key, so I see type=Range and Key: my_foreign_key
But when I run EXPLAIN SELECT * f...
I'm pulling items from a database (in this case, comments, but it should apply to anything) and have the following information about them:
The number of up votes
The number of down votes (consequently, the total score and number of votes)
The date the item was created
I'm interested in coming up with a way to sort them with the followin...
Hi,
I am starting development on a medium-scale C++ project that has to work with a Microsoft SQL Server database. I have done database work before using .NET technologies but I don't find using a .NET approach to be appropriate this time. I would like to get some feedback concerning the various free (as in GPL, LGPL, Boost) C/C++ SQL l...
Does anyone know of how I would, through the django ORM, produce a query that conditionally aggregated related models?
Let's say, for example, that you run a site that sells stuff, and you want to know how much each employee has sold in the last seven days. It's simple enough to do this over all sales:
q = Employee.objects.filter(type...
I have a bunch of tables in a relational database which, obviously, are dependent upon one another due to foreign key relationships. I want to build a dependency tree, traverse it, and output INSERT SQL statements. I need to first output SQL for foreign key tables in my dependency tree first because parent tables will depend on values fr...
I have an Orders table which has a Quantity column. During check in or check out, we need to update that Quantity column by one. Is there a way to do this in one action or we have to get the existing value and then add or minus one on top of it?
Another question is when we insert a new row, do we need to check if same data existing then...
I have two databases, lets say Database A and B, with different datastructures.
In Database A there is a table contacts.
In Database B there is a table Accounts.
I want to transfer data from Database A table contacts to Database B table Accounts.
I am use SQL Server 2005 and want to write sql scripts to do this.
Can someone tell me wh...
I'm fairly new to using relational databases, so I prefer using a good ORM to simplify things. I spent time evaluating differing Python SQL libraries and I think SQLAlchemy is what I need. However, I've come to a mental dead end. I need to create a new table to go along with each instance of a player I create in my app's player table....
Hi
is it possible with cross query to do this ? (in Access 2007)
I have this table:
50 | A1
60 | A1
70 | B1
80 | B1
90 | C1
I need to get this result:
A1 ------------------ B1 --------------- C1
sum | avg ----- sum | avg ----- sum | avg
55 | 110 --------- 75 | 130 ...
I have a problem that adding a new ROW with duplicate UNIQUE id throws CONSTRAINTException that I cannot always catch.. Randomly general exception halts my VB software, sometimes catching works. here is my code.
Private Sub BindingNavigatorAddNewItem_MouseUp()
try
DataGridView1.CurrentRow.Cells(0).Value = InputBox("give new ...
Well could someone provide a really simple (but not simpler than possible) explanation of transaction as applied to computing (even if copied from Wikipedia)?
...
I create a huge JSON-Object and save it in my database. But when I load the "string" and echo it in PHP, I can't access the JSON Object in JQuery. Do I have to consider something if I want to save my JSON Object in a MySQL Database (when I just create the Array and then echo it with "echo json_encode($arr);" it works fine, but I need to ...
Given a SQL statement:
select id from myTable
where id = -1
How do I iterate through each of the results? I want to perform a specific operation for each result e.g (in pseudocode):
foreach (result from my statment)
{
delete all rows from myOtherTable that has a value of result;
}
How would I write a SQL statement to do this?
N....
I have some ideas, but I really want to know what makes things go smoothly for you when modeling database:
Table name matches Primary Key name and description key
Schemas are by functional area
Avoid composite primary keys where possible (use unique constraints)
Camel Case table names and field names
Do not prefix tables with tbl_, or...
How performant is the entity bean? Would it be too much to ask if I want 1000 objects per table (probably about 20 tables) across 5 processes where some processes might be changing the objects as often as 60 times a second?
Are there any resources out there on the limitations of the entity bean?
Thanks for any help!
...