database

Insert record into db using linq2sql/datacontext

Hi there, I am trying to insert a standard record into my db using linq2db, but i keep seeing examples to ADD method which i don't appear to have ... what i have currently is the following, as you can see i have my datacontext.... (no add method) ... the Reservation class is a separate class i created as a DTO - i presume this is correc...

Preparing SQL Statements with PDO

My code looks like this: // Connect to SQLite DB DB('/path/to/sqlite.db'); DB('BEGIN TRANSACTION;'); // These loops are just examples. for ($i = 1; $i <= 10000; $i++) { for ($j = 1; $j <= 100; $j++) { DB('INSERT INTO "test" ("id", "name") VALUES (?, ?);', $i, 'Testing ' . $j); } } DB('END TRANSACTION;'); And here i...

Exchange Data between two apps across PC on LAN

I have a need of implementing two apps that will exchange data with each other. Both apps will be running on separate PCs which are part of a LAN. How we can do this in Delphi? Is there any free component which will make it easy to exchange data between apps across PCs? ...

Is there an implementation of Tom Kyte's STRAGG function supporting SQL Server?

STRAGG function implemention returns a result as a single column value. Implementation for Oracle seems pretty generic and can be consumed for different tables (and relationships). Could similar behavior be achieved for SQL Server. A search in the web, appears to return only hard coded implementations and not a generic one. Do we have an...

Why would a flash/flex RIA choose Base64 XML over AMF

I have recently been using Charles the debugging app. And noticed a very chatty app named skyrocket (a very very cool slide presentation app) sending a lot of data across the wire. It is built in flex by the looks and I was wondering why they had chosen to send their data using base64 and not amf. Is it because they don't want to be lock...

Where/How are (My)SQL Databases Stored on Webservers?

Just curious as to where and how SQL databases are stored on web servers. My particular flavour of SQL is MySQL if it makes a difference, does it? ...

How to do internet card game using .net

What is the best way to do an internet two player card game? Currently I was intending to store the game state in the database using ajax to check on when the state of the game changes. Is there a better way to do go about this where the clients communicate with each other and not through a mediary? ...

How do I define a database index in HoboFields?

With HoboFields, I can declare fields for my model in its own file, like this: class User < ActiveRecord::Base fields do login :string persistence_token :string end end I'd like to know if there's equivalent syntax for the add_index command I can use in vanilla Rails migrations. ...

Parameter naming using System.Data.Common

This is probably an oldie-but-goodie. I am using System.Data.Common for an interchangeable Oracle/SQL Server/SQLite data access library. During the constructor I take the connection string name and use that to determine the underlying provider type. The reason I do this is to handle the different IDbParameter naming conventions for each ...

Visual Studio DB GDR2 - Can I deploy to a File without SysAdmin Privleges?

I have a Data Solution that has a Database Project and a Server Project. I want to deploy to an SQL Script. I don't want to have to have SysAdmin privileges on the SQL Server (SQL 2008). Is there a way to do this? I really don't want to set any settings or upload any server level stuff. I only have the server project because my DB p...

Where we can find database designs schemes (ERD or other) for very common use cases?

The question is more simple than what it looks. There are many use cases that are well known and people have put a lot of thought into them. For example: Audit trailing, login users, and so on. We are looking for a good resource site that present the DB design for those common use cases. ...

Should I use strings as primary keys for a Web site that's big on SEO?

Hi.I'm building a web site that's showcasing a large amount of products. I want the URL to be human-friendly and optimized for search engines, so I want the filtering of products to be reflected in the URL. For example, a possible URL path for filtering the products would be website.com/Type/Car/Country/Usa/Manufacturer/Ford/Year/2007 ...

Whats the easiest way to create an Admin Panel for dynamic websites?

I've heard about web frameworks like Rails, Django, CakePHP and others, that help programmers to quickly create dynamic websites which are basically a web GUI to interact with a database. I was wondering if there are ways to "generate" these Admin Panel GUIs pretty much automatically, something like a Microsoft Access for the web? Where...

Multithread database access (.NET)

Hi, I'm currently building an app that generates quotes. The total time to generate all quotes is about 10 secs, and at present provides an unacceptable user experience. What I want to do is multi-thread each quote so the user can see results as they come in. The problem is that the app I've inherited does a lot of bus logic on the d...

how to Sql return only all duplicated entries

i have a table having create table test(id int not null primary key, day date not null); insert into test(id, day) values(1, '2006-10-08'); insert into test(id, day) values(2, '2006-10-08'); insert into test(id, day) values(3, '2006-10-09'); select * from test; +----+------------+ | id | day | +----+------------+ | 1 | 2006-1...

Database size is huge

I have the following problem. We have a database that stores binaries in the database. We know the size of the database can be big so we removed all the binaries from the database and used the task "shrink" on it. This way we hoped that the database would be much smaller. These are the results: before removal size was: 20 gigabyte after...

Is it a good way to use system() for database scripts from C?

Hi Gurus, I was searching for connecting to database from C program. But I thought the ODBC connections, logon and all need some libraries. Also I am having a minimal compiler like Tiny C Compiler which is very fast. I do not want to use any ODBC logic etc which is needed to connect and query the database. So I am using a method which is...

When is it worth getting a DBA?

I've now worked at a few tech companies ranging from 10 people to ~150 and I've never encountered a real DBA. How big does a company need to get before it merits getting a DBA? What are the criteria that need to be met? ...

MySQL PBXT vs InnoDB

I'm wondering what are are the pros/cons of the new PBXT Engine vs the good old one InnoDB? Where can I find a list of features and maybe some benchmarks comparing these two DB engines? ...

Proper place for db connection in SOAP web service (.net)

I have an asp.net web site and a database. The web site has a web service for storing feedback from my software. As far as I know, IIS will reuse the created object for sequential requests. This gives a reason to connect to the DB in web service's constructor, properly implement Dispose() method, and use the connection for serving each...