database

Is storing user configuration settings on database OK?

I'm building a fairly large enterprise application made in python that on its first version will require network connection. I've been thinking in keeping some user settings stored on the database, instead of a file in the users home folder. Some of the advantages I've thought of are: the user can change computers keeping all its set...

Checking for null database value in ASP Repeater control

I have never written a lick of ASP.NET in my life before this week so go easy on me, please. I have an ASP.NET page that displays pictures from a database. I create a SqlDataReader and bind the repeater to this reader. The page displays a table with three columns: a thumbnail of the pic (path from the database), the name of the camera t...

How do I find out if an oracle database is set to autocommit?

And while we're at it, how do I switch between autocommit and non-autocommit? ...

Why are database features being ignored, and instead reinvented in the middle tier?

What are the top reasons (apart from "database independence") that most IT projects today seem to ignore the wealth of features that exist in modern database engines such as Oracle 11g and SQL Server 2008? Or, to borrow from the Helsinki Declaration blog which puts it this way: In the past twenty years we observe that the functional...

Someone created two identical accounts on my website at the exact same time. How is it possible?

I can't believe this - someone actually created two accounts on my social networking website using the same email even though there are both server sided as well as client sided validation checks that prevent such a thing from happening. But get this the time noted in the creation of both the accounts are exactly the same time. For some...

Passing BLOB/CLOB as parameter to PL/SQL function

I have this procedure i my package: PROCEDURE pr_export_blob( p_name IN VARCHAR2, p_blob IN BLOB, p_part_size IN NUMBER); I would like for parameter p_blob to be either BLOB or CLOB. When I call this procedure with BLOB parameter, everything is fine. When I call it with CL...

How Do I Create "Watch" System? Looking For Best Practices

I have a fairly complex community site (in php/mysql) with a number of "things" that the registered users can "watch". "Things" are: Posts, comments, event updates, user status changes, etc. At least 10 different types of "things" are available and a user can watch any other user's "things" (Think facebook) "Watch" means: A user can w...

How to best represent Constants (Enums) in the Database (INT vs VARCHAR)?

Hello, what is the best solution in terms of performance and "readability/good coding style" to represent a (Java) Enumeration (fixed set of constants) on the DB layer in regard to an integer (or any number datatype in general) vs a string representation. Caveat: There are some database systems that support "Enums" directly but this wo...

Selecting Time ranges from Date Time fields in Access

I have a table containing reports and the date/time they were created. I'd like to create a graph to tally the number of reports created during intervals of ten minutes between two time periods: 8:00AM-9:00AM and 1:00PM-2:00PM. Here's an example of a query I'd like to run: SELECT s.StudyStartDateTime AS "8:00 - 8:10", s.StudyStartDate...

Going to Oracle from MySQL

I'm starting a new semester and for my class "relational databases" they are using Oracle. Now I'm experienced in using MySQL and was wondering what the main differences are between Oracle and MySQL. So I have a couple of questions. What are the fundamental differences in using the database? What are some of the differences in SQL syn...

Recommendations on a sql comparison (schema & data) tool that supports both Oracle and SQL Server?

I'm trying to find a good tool (open source or commercial) for doing comparisons of database instances, for example: Compare 2 database schemas; generate platform specific change script (either direction) to bring one into synch with the other Compare data (table contents), generate platform specific change script (either direction...

Database/SQL: How to store longitude/latitude data?

Performance question ... I have a database of houses that have geolocation data (longitude & latitude). What I want to do is find the best way to store the locational data in my MySQL (v5.0.24a) using InnoDB database-engine so that I can perform a lot of queries where I'm returning all the home records that are between x1 and x2 latitu...

composite primary key

can i consider 3 columns of a single table together as a composite primary key.... & wat if i want to refer just 1 column out of that in some other table as a foreign key....is it possible....plzzz reply as soon as possible...thank u.. ...

How to insert a row with autoincrement id in a multi-primary-key table?

I am writing a turbogears2 application. I have a table like this: class Order(DeclarativeBase): __tablename__ = 'order' # id of order id = Column(Integer, autoincrement=True, primary_key=True) # buyer's id buyer_id = Column(Integer, ForeignKey('user.user_id', onupdate="CASCADE", ondelete="CASCADE"), primary...

Best authentication solution for RESTful Database Server

I'm writing a RESTful Database Server called Phoenix. Being an easy interface into an entire application's data, security is quite an important issue, and I'm interested in what authentication solutions any of you could suggest. It needs to be: Secure - it's got to be very hard to break. Signing requests could be a good way of doing t...

Serialization, deserialization of void pointers

I would like to store a void pointer in a blob for a record in a table. How do we do the serialization and deserialization? ...

What is the best way of connecting to a remote server/database to retrieve data from the IPhone

I am currently writing an app which will need to access a remote server/database to read/write values. What is the best technology to use? I've heard that there is no support for XML Webservices...does this mean a ASP.NET Webservice will not be easy to access? Thanks. ...

String concatenation operator in Oracle, Postgres and SQL Server

Is there a way to have a common operator for concatenation in Oracle, Postgres and SQL Server. In Oracle we uses '|', postgres uses '||' and sql server uses '+'. I've solved the problem in postgres by adding the custom operator '+' to support string concatenation. Is there a way to add the same operator in Oracle to support string con...

Graphing time intervals in Access

I have a table that looks like the following: StudyId StudyStartDateTime ============================ 1 01/01/2009 08:45 AM 2 01/01/2009 08:53 AM ... I'd like to return a query that contains the StudyId, as well as the ten-minute interval during which it was started: StudyId Interval ================== 1 8:40...

Why would DATA_TYPE for column schema be negative in ODBC?

I am trying to allow a user to select a table a 2 columns from that table for use in a query. They define the provider and the connection string to choose the database. This is done using the DBProviderFactory and the DBConnectionStringBuilder. The problem seems to be when using the ODBC provider, other providers (OLEDB, Sql) seem ok....