database

Delphi 2009 ADO database access in cmShareDenyWrite mode

Hi there, I have a Delphi 2009 application that is attempting to open an ADO connection (dbGo) to a Microsoft Access .MDB file in cmShareDenyWrite mode, using the Jet 4.0 OLE DB provider. The goal is to open the .MDB file in read/write mode, but to prevent other applications from opening the file in write mode: Other applications access...

NSIS- Error handling

I have written an installer and uninstaller in NSIS which creates and drops an sql database, which is working fine. I have written some .bat and .sql files to create and drop the database and then just call these files from NSIS script. My problem is if I keep this database open in SQL Server Management Studio and run the uninstaller ide...

Best way storing binary or image files

What is the best way storing binary or image files? Database System File System Would you please explain, why? ...

Access to facebook data

Hi there, I want to access facebook's database. I want to have some SQL-like access, let's say s.th. in this way: "select name from facebook-big-database-table where location='France' and city='Paris' and age between 30 and 40;" But, it need not to be SQL, PHP or JAVA would also be nice to use to me. Does anybody know where to start? To...

Two matching programs, one will pull mysql data, the other wont

I've got two matching php programs, one held on the development folders, the other on the live folders, both on the same machine. The live version can pull data from the database and display it, the development version cannot and kills the page as solid white. Both are identical and both are reaching for the same database. I wish I ...

Oracle SQL: How to read-and-increment a field

I'm refactoring the data import procedure for an enterprise application and came across a snippet I'd like to find a better solution. When importing data we have to create a unique entity for each data set and there is a counter in a field to be used to assign this id sequentially. You read the field to get the next free id and increment...

Should I write table and column names ALWAYS lower case?

I wonder if it's a problem, if a table or column name contains upper case letters. Something lets me believe databases have less trouble when everything is kept lower case. Is that true? Which databases don't like any upper case symbol in table and column names? I need to know, because my framework auto-generates the relational model fr...

Designing databases: storing user stats in games(i.e. owned money) and 32bit integer overflow.

Hello, I am creating an little hobby database driven browser based game and I stumbled across this problem: I store money owned by users as an 32bit integer field (to be precise: two fields. One stores money in players hand, the other - money stored in bank). We all know, that maximum value, which can be stored in 32 bits is 2^32-1. I ...

SQL Server - how to determine if indexes aren't being used?

I have a high-demand transactional database that I think is over-indexed. Originally, it didn't have any indexes at all, so adding some for common processes made a huge difference. However, over time, we've created indexes to speed up individual queries, and some of the most popular tables have 10-15 different indexes on them, and in som...

Nhibernate not returning right result sometime

Hi Guys, So here is my nhibernate query. I am just querying in database if there is latest entry by some number but with latest time stamp. So like if I have Row A 6 1/7/2010 2:55:59 PM Row B 6 1/7/2010 2:56:33 PM So According to the query it should return Row B but sometimes it is not happening. Can anyone point out the...

Using GWT with local database

As far as I know, there are two ways to create a local database on the browser, either go with HTML5 window.openDatabase or Google Gears. Which one is better, and why? Are there any other alternatives beside those two? ...

Help defining tables/Primary Keys

I'm designing a database for a franchiser. My skill level is intermediate at best (I just work in the franchiser's office). This database must define store locations and franchisees. So I know I will need a "store" table and a "franchisee" table. The "store number" will be the primary key in the store table. One franchisee can own mu...

password limitations in SQL Server and MySql

Does MySql 5.1 and SQL Server 2008 (Web edition, Standard) have any functional password limitations other than length limits? Are metacharacters in any form a bad idea to use, like bang, pipe, hash, any slash, carrot, and so on? I know that MySql 5.1 has a password length limitation of 16 characters that is hardcoded, but I was wonderin...

Using DB Api in a portable manner

Hi, I need to develop some kind of application and use DB in it. Let's say i want to develop it over Windows currently, however, in a couple months i may have to migrate it to Linux. I started reading a little bit about it, but couldn't get to point i needed. Is there or isn't a generic/protable/standart api for using DB ? I read th...

Access database sharing strategies

What are the strategies you employ to let multiple people work on an access database? Is it possible to host it online and have its features still functional without having to develop a custom frontend? MS Access as a software has a few nice features that don't require any programming to configure: Drop down lists - choose one Multi ...

write the hibernate query to retrieve data with latest timestamp.

I want to retrieve unique data froma table based on latest time stamp. So If I have a table like this guid 6 1/7/2010 9:55:29 PM guid 6 1/5/2010 2:59:29 PM guid 6 1/7/2010 2:55:29 PM I need to write a query where I can query with no 6 and with latest timestamp in the same table. So it should return me : guid 6 1/7/2010 ...

Novice student question: Is creating a stackoverflow-esque backend as simple as 2 db tables?

Hi All, I've long been perplexed by the speed of stackoverflow and how quickly the questions/comments load on the page. It seems like the backend db that stores all of this info would be humongus...How is it possible for a question and all of its associated answers to get loaded so quickly? I've never worked in a large-scale db enviro...

Tips for writing a DBMS

Hi, I have taken a graduate level course which is just one big project - to write a DBMS. The objective is not to reinvent the wheel and make an enterprise DBMS to rival Oracle. Only a small subset of SQL commands need to be supported. Nor is the objective to create some fancy hybrid model DBMS for storing multimedia or something. It ha...

SQL selection over two rows

How do I select in a table like below all objects that have a-A and b-B (as key-value pair)? Something like: SELECT DISTINCT(OBJECT) FROM MYTABLE WHERE key = 'a' AND value = 'A' AND key = 'b' AND value = 'B' ...where the result would be 1 and 3. I know that this SQL statement doesn't work, but I hope it explains a b...

Easy way to check if a page view is unique?

Hey guys, im building a small product catalog for a client. I am currently trying to figure out how to go about allowing the user to sort by "popularity". I figured the easiest/simplest way to do this would be by having a "views" field in each product record. Originally I didn't think this through (duh) and thought I would just add on...