I have a table with millions of IP range records (start_num, end_num respectively) which I need to query via a single IP address in order to return all ranges which overlap that point. The query is essentially:
SELECT start_num
, end_num
, other_data_col
FROM ip_ranges
WHERE :query_ip BETWEEN start_num and end_num;
Th...
The VPS I was using used to have PHPMyAdmin pre-installation option but removed it stating it poses security risk. Does it? If so do you recommend an alternative for browsing DB on production (other than running SQL commands in console)
...
I have the database table page with the fields contenttype_id and content_id. I want to link a page to a contenttype via contenttype_id and refer to an actual content via content_id. The problem is contents depend on the contenttype_id and are modelled differently, therefore the content_id refers to different tables depending on the cont...
More and more, I'm seeing searches that not only find a substring in a specific column, but they appear to search in all columns. An example is in Amazon, where you can search for "Arnold" and it finds both the movie Running Man starring Arnold Schwarzeneggar, and the Gund toy Arnold the Snoring Pig. I don't know what the term is for t...
Hi
I have a strange problem with retrieving data from database.
In my form I have a combobox. The combobox contains couple of items - department's name.
Everytime I choose an item from combobox I connect to database and fire this
public List<User> SelectAllSecurityUsersByDepartment(string departmentId)
{
var result = DBConne...
Hi All,
I have a table (this cannot be changed) like the following:
POST_ID | PARENT_ID | POST_NAME
1 | 0 | Services
4 | 1 | Development
5 | 4 | Magento
2 | 0 | Contact
The field, 'parent_id' references post_id to form a self-referential foreign key. Is it possible to write a s...
I going to start to write a new software with PHP, and I need to know the best way to use database. Should I choose a database class such as Adodb, ezSql etc.
What do you think which class is the best one?
...
I could really use some good feedback on best practices / insight on whether it is better to put things in the database, or build an array. Take for example you have the suits of cards:
$suits = array('clubs', 'spades', 'hearts', 'diamonds');
The array could change in the future, but not very frequently if at all. Now these suits are ...
Hi friends,
I had an internship interview last week and I was given a question regarding searching for a particular string in a large database. I was totally clueless about it during the interview though I just gave a reply the"multi-level hashing" as that was the only hin I knew which had the best time efficiency, After a bit googling I...
There appears to be a myriad of NoSQL databases available these days:
CouchDB
MongoDB
Cassandra
Hadoop
There's also a boundary between these tools and tools such as Redis that work as a memcached replacement.
Without hand waving and throwing too many buzz words - my question is the following:
How does one intelligently decide which...
Trying ti understand if the Cash database system can have a trigger. It seems to be way different from Sybase/Oracle etc...
...
I'm essentially preparing phrases to be put into the database, they may be malformed so I want to store a short hash of them instead (I will be simply comparing if they exist or not, so hash is ideal).
I assume MD5 is fairly slow on 100,000+ requests so I wanted to know what would be the best method to hash the phrases, maybe rolling ou...
Hi guys, as the title states, I am trying to query multiple mySQL tables in the same DB simultaneously, here is my query,
SELECT * FROM `database_db`.`one, two, three, four, five, six, seven` WHERE uid='1234567'
I am using mySQL workbench to do the query, but when I run it I get this error
Error Code: 1103
Incorrect table name 'one,...
I have a table with 252759 tuples. I would like to use DataSet object to make my life easier, however when I try to create a DataSet for my table, after 3 seconds, I get java.lang.OutOfMemory.
I have no experience with Datasets, are there any guidelines how to use DataSet object for big tables?
...
InterBase had an architecture that caused disk-writes to leave the database in an always-consistent state
-- 97 things every software architect should know, p87
Is this property finally common in 2010 ?
Is there a study about database stability/reliability in presence of disk errors ?
...
I'm using sqlite JDBC 0.56 and the table is created using fts3
MY table is created by
stat.executeUpdate("CREATE virtual TABLE doc using fts3 (doc_name , doc_path);");
seems the problem is caused by this virtual table.
I tried to insert a set of record into a database and return the generated key.
But I find that when the key is bec...
i have a textbox with button search.
i would like to search my database of input text from textbox and give result out in one view.
Could you please give me link or help me how its possible to implement?
I have no idea what i shoul to do that.
...
I'm writing a Rails app that does a lot of calculations on imported pay-per-click advertising data. The imported logs, which contain records about impressions, clicks, conversions, etc. are all stored in one massive log table, which then needs to be joined with a conversions table to calculate cost per conversion, conversion rate for eac...
An example of my scenario is a large setup page for an application, the method I use is for example:
//query 1
$stmt = $dbh->prepare("...");
$stmt->execute();
//query 2
$stmt = $dbh->prepare("...");
$stmt->execute();
Would this be an accepted method to write more queries? I have no clue how it's supposed to be done (or who does what,...
I have a database with 1000 records.
I am trying to create a sql statement so if the number of records will grow, then the oldest records to be deleted.
I am using sqlite, but I assume the usual sql syntax will fit here.
Thanks
...