database

Storing object as a column in LINQ

Hello, i have some class which constructs itself from string, like this: CurrencyVector v = new CurrencyVector("10 WMR / 20 WMZ"); It's actually a class which holds multiple currency values, but it does not matter much. I need to change type of column in my LINQ table (in vs 2010 designer) from String to that class, CurrencyVector. ...

how many index per database table?

Hi, How many indexes is preferred for one table in MYSQL?? I have a company table where I search mostly for ID,state and category? Thansk ...

Storing n-grams in database in < n number of tables.

If I was writing a piece of software that attempted to predict what word a user was going to type next using the two previous words the user had typed, I would create two tables. Like so: == 1-gram table == Token | NextWord | Frequency ------+----------+----------- "I" | "like" | 15 "I" | "hate" | 20 == 2-gram table == Token ...

Retrieving datatypes from underlying database

Hi, Im making an application that displays information about an underlying database. The database can be anything, but is typically either Oracle, MSSQL or MySQL. I am trying to extract the datatype but cannot seem to get this right. I have a DbConnection because i dont know whether I need a OleDbConnection or an OdbcConnection. On this ...

How to store data in mysql, to get the fastest performance?

Hey, I'm thinking about it, which of the following two query types would give me the fastest performance for a user messaging module inside my site: The first one i thought about is a multi table setup, which has a connection table, and a main table. The connection table holds the connection between accounts, and the messaging table. I...

Right way to implement a n-to-m relation

Hello, this is a part from my database structure: Table: Item Columns: ItemID, Title, Content, Price Table: Tag Columns: TagID, Title Table: ItemTag Columns: ItemID, TagID Table: Image Columns: ImageID, Path, Size, UploadDate Table: ItemImage Columns: ItemID, ImageID The items can have more than one image so i have a extra table "...

Questions related to mantis:

We are interested in installing Mantis but we have some doubts Please clarify as early as possible if you can so that we can go for further process. 1) We have one team at USA (Client’s place) and one is at India. In which server we should install the Mantis. If we are installing at USA will it run slow in India? 2) What about technic...

Wordpress items catalogue plugin

Could you please recommend a plugin for Wordpress or maybe a tiny standalone PHP script that allows the user to add some items with text info and a photo to a database, XML or just a text file from a special admin page? I need to fetch these items from the source and show in the page some way. To understand the task better, please check ...

XML output from MySQL

Hi, is there any chance of getting the output from a MySQL query directly to XML? Im referring to something like MSSQL has with SQL-XML plugin, for example: SELECT * FROM table WHERE 1 FOR XML AUTO returns text (or xml data type in MSSQL to be precise) which contains an XML markup structure generated according to the columns in the ...

Index question: Select * with WHERE clause. Where and how to create index

Hi, I’m working on optimizing some of my queries and I have a query that states: select * from SC where c_id ="+c_id” The schema of ** SC** looks like this: SC ( c_id int not null, date_start date not null, date_stop date not null, r_t_id int not null, nt int, t_p decimal, PRIMARY KEY (c_id, r_t_id, date_start, date_stop)); My ...

Export and import to a different schema

Hey, Is there a way in which I can export table's entries, remove a colum from the table and import the data back to the new table? The opposite case works fine - adding a column is not problematic at all (if the colum is nullable). thanks ...

Pros and cons of sorting data in DB?

Let's assume I have a table with field of type VARCHAR. And I need to get data from that table sorted alphabetically by that field. What is the best way (for performance): add order by field to the SQL-query or sort the data when it's already fetched? I'm using Java (with Hibernate), but I can't tell anything about DB engine. It could...

Call more than one item from a different model?

Hi Everyone, At the moment in my application I can select a company from the company model when creating a new kase in the kase model. <ul id="kases_new"> <li>Company<span><%= f.select :company_id, Company.all.collect {|m| [m.companyname, m.id]} %></span></li> This shows a list of the companies and then when I choose one it adds...

Rails, search item in different model?

Hi Everyone, I have a kase model which I am using a simple search form in. The problem I am having is some kases are linked to companies through a company model, and people through a people model. At the moment my search (in Kase model) looks like this: # SEARCH FACILITY def self.search(search) search_condition = "%" + search +...

Access Android 1.5 browser's gears-created database localy

I created a database via javascript using Google Gears on Android 1.5 and I'd like to access directy the sqlite file to look inside it whitout using Gears. I found several "File Browser" but they only browse the SD card. Is there a way to fetch it from the phone file system? I have an HTC Dream running Androis 1.5. Thank you! ...

ODBC Connection Pooling

I have inherited a suite of .Net c# applications from a developer which talk to an Informix database on a unix server. Instead of using the usual practices for managing the database connections (disposable pattern / "open late / close early"), the code seems to open one ODBC connection when each app loads and doesn't close it. Is there...

How to organize database access code in Android project?

I have created a ContentProvider for my main Sqlite table, pretty much following NotePad example from SDK (although I am not sure whether I will ever be exposing my data to other apps). However, I need to create lots of other, non-trivial queries on that and other tables and views. A good example would be queries to extract some statisti...

Set service dependencies after install

I have an application that runs as a Windows service. It stores various things settings in a database that are looked up when the service starts. I built the service to support various types of databases (SQL Server, Oracle, MySQL, etc). Often times end users choose to configure the software to use SQL Server (they can simply modify a...

Connect to a DB with an encrypted password with Django?

My place of employment requires that all passwords must be encrypted, including the ones used to connect to a database. What's the best way of handling this? I'm using the development version of Django with MySQL at the moment, but I will be eventually migrating to Oracle. Is this a job for Django, or the database? Edit: The encrypted p...

editing data base from the jtable displayed

hi how can we edit an sqlite database table from the itable it is displed in? thanks ...