database

PHP Cookie Security Question

I have the following code that is presenting a 'word-of-the-day', As I am relatively new to php coding, I wanted to make sure that there weren't any security issues for how I am selecting from my database from the cookie value. Thanks. if ($word_of_the_day) { $wotd = $wpdb->get_results("SELECT term,definition FROM glossary WHERE ter...

Constructing the FROM in SQL

I'm looking to pull a specific line from a number of table that have a field name criteria1. The problem I'm having is that when I combine the Owner and Table Name and try to call "select criteria1 from @t where linenum = 1" SQL is expecting @t to be a table. I need to know how to construct the full table name and then pass it to this qu...

Upper Limit for Number of Rows In Open Source Databases?

I have a project in which I'm doing data mining a large database. I currently store all of the data in text files, I'm trying to understand the costs and benefits of storing the data relational database instead. The points look like this: CREATE TABLE data ( source1 CHAR(5), source2 CHAR(5), idx11 INT, idx12 INT, ...

What ORMs work well with Scala?

I'm about to write a Scala command-line application that relies on a MySQL database. I've been looking around for ORMs, and am having trouble finding one that will work well. The Lift ORM looks nice, but I'm not sure it can be decoupled from the entire Lift web framework. ActiveObjects also looks OK, but the author says that it may not ...

Problems with owned one to one relationships and parent/child relationships

I have three entities User, Company, and Address with declarations like so: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class User implements Serializable { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent(mappedBy="creator") @Order(extensions = @Extens...

How to list datas according to the letter typed in a textbox from the database in a datagrid or list box

Hello, I want to list the values in the database in a datagrid or listbox according to the character typed in the textbox . for example : if i type "a" then list all the values starting with "a", if "ab" then so. Please help me ...

Storing a large array in a database

I have a really long list of itinerary items with integer values. I was thinking about creating a database with each of these items with like fifty columns but that seemed a bit long-winded, and the itinerary may change. Is there a better way to store these name => value pairs in a database? serializing seems a bit crude, I was thinking...

checkbox data binding

How to add a check box in a .aspx page. I had used a database. and i read data from the database successfully. And now the readed data is in data table "dt". And i added this statement if (dt.Rows[0]["IsActive"].ToString() == "True") if the condition is true, Then the check box will be checked? but i didn't get. How it will get? ...

Db migrate - Hibernate/JPA - hbm2ddl - diff tools...

Hello I use - EJB3 / JPA (hibernate) - MySQL 5 I have to set up a system to help database migrations. Tried to use LiquiBase but it seems not enough mature yet to be used with Hibernate. What i would like to do is: - I have version 1.0 of the application in production - I have version 2.0 of the application developped and tested - I ...

Enterprise Library Data Access Blocks Design Decisions

The back story to this is a coworker didn't like the fact we were standardization on Enterprise Library Data Access Blocks because It required too many references in every project that needed database access We didn't need all the features it provided He thought the DbCommand / SqlCommand should be stored internally in the database obj...

Why does VB.NET Jet 4.0 app crash if Office not installed?

Hi all I'm working on a VB2008 project that references two Access databases using Provider=Microsoft.Jet.OLEDB.4.0; It would seem if the user does not have MSOffice on their machine, the program crashes with a "XXX stopped working" on startup on Vista and Win7. I thought that Windows had XP and above had Jet functionality built in? Do...

nHibernate, how query a parent object with multiple relationships

Hi! I have a (several actually) relationship between two objects, the parent object is a User and the child object is an Incident. There are four relationships defined between User and Incident: Property User_created of Incident refers to a User who created the Incident Property User_modified who modified the Incident User_reported and...

Subversion: Copy repository users from existing to new project (SASL Database)

Is it possible to copy the sasl (which contains username + pw) database from one repository to another? The reason Im asking that is the following: Everytime you create a new project in SVN it opens up a repository for it. So be it. Unfortunately it does not copy the existing users of another (selectable) already existing project into ...

How effective is executeBatch on a Prepared Statement?

Subject to this question, asks it all:How effective is executeBatch method? Is there a performance benchmark, that says.. 'if you have 1000 records to be inserted, using a executeBatch instead of executeUpdate saves you x amount of database cycles?' Or Is this just a convention? EDIT: Here is what I am working with: a DB2 V 8.1 hoste...

How to delete faster?

I have a DB table which consists of 2.5 billion records. There are duplicates to the tune of 11 million. Which is the fastest way to delete these 11 million records? ...

Database object for each class or site-wide?

I have a database class which is constructed so that it opens a connection to the database when the first query is run. Should each of the other classes, used for the site's users, groups and so on, create one database object each? This makes the classes easy to deploy elsewhere; they will only depend on the database class. This will how...

Is it better to use php sessions with objects or access db?

I'm at a crossroads, not exactly sure what is better to use. Right now I'm using sessions arrays to store calculations on the fly, but I need to switch to objects because I would like have some functions. But I was also considering using ajax and insert the data on the fly back and forth to the database but I'm worried it might be to man...

Numbers and calculations in php/sql

ok im new on the scene with php and sql, i read the basics and was able to produce a DB driven shoutbox. This is my website http://www.teamdelta.byethost12.com/ What i want to do next im not sure what i should be using java? php? sql? i have no idea... but i assume php and sql if sql can do what i think it can.. What i want to do next i...

How to create database using SMO with everyone having permission?

I am trying to create a SQL Server Express database using SMO like so: Database db = new Database(server, dataSource); ... db.Create(); I am able to use the database fine. But, if someone else tries to copy the database, they get file permission errors. In looking under the security tab in windows explorer, I am the only one who has...

To Fully Enforce Your Data Model or To Not Fully Enforce Your Data Model

http://weblogs.sqlteam.com/jeffs/archive/2008/08/13.aspx: Consider the following logical data model: * There are multiple Companies * Each Company has many Projects * Each Project has many Tasks * Each Task has a Status, selected from a global list of pre-defined Statuses. Let us say that we decide that the pr...