database

get state and county a city belongs to with geonames database?

i have downloaded whole database from geonames.org and imported all countries into mysql. i wonder how i can get the continent, country, state, county when i got a city's id? cause i want to make a cascading list menu with these information. thanks! ...

Adding data in multiple tables in vb.net

This is a winform and I'm using mysql as a database, here is my code: I'm trying to add data into multiple tables. If TextBox14.Text = "" Or TextBox7.Text = "" Or TextBox10.Text = "" Then MsgBox("Please fill up the fields with a labels in bold letters!", MsgBoxStyle.Information) cn = New MySqlConnection("Server...

Best practice stock management when payment of customer failed using SQL Server and ASP.NET

Hi there, I am currently building a webshop for my own where I want to increment the product-stock when the user fails to complete payment within 10 minutes after the customer placed the order. I want to gather information from this thread to make a design decision. I am using SQL Server 2008 and ASP.NET 3.5. Should I use a SQL Server ...

How to Deal with SET ANSI_NULLS ON or OFF ?

I want to call this procedure that sends one value that can be NULL or any int value. SELECT DomainName, DomainCode FROM Tags.tblDomain WHERE SubDomainId =@SubDomainId I simply want to use this single query rather than what i m doing right now in below given code. I searched for this how could i do this then i got this Link. Accordi...

How to Delete all data from a table which contain self referencing foreign key

I have a table which has employee relationship defined within itself. i.e. EmpID Name SeniorId ----------------------- 1 A NULL 2 B 1 3 C 1 4 D 3 and so on... Where Senior ID is a foreign key whose primary key table is same with refrence column EmpId I want to clear all rows f...

Is there an efficient way to query a document database?

Since document databases store records in tree like structures the fields will never be at set positions. Does this make querying a document database inefficient, or would indexes just be used as with a normal relational database? ...

How do I create a sqlite 3 (.sl3) database file?

I have a *.sqlite file... but I need the database in *.sl3 format? What software/tool can I us to create that? What are the steps? This is to be used in an iPhone app. Original developer used an .sl3 file, now that I have updated the DB - I can't seem to export/generate a .sl3 file I have tried just changing the extension - all the w...

Physical storage of data in Access 2007

I've been trying to estimate the size of an Access table with a certain number of records. It has 4 Longs (4 bytes each), and a Currency (8 bytes). In theory: 1 Record = 24 bytes, 500,000 = ~11.5MB However, the accdb file (even after compacting) increases by almost 30MB (~61 bytes per record). A few extra bytes for padding wouldn't be...

Tutorials for .NET database app using SQLite

I have some MS Access experience, and had a class on console c++ apps, now I am trying to develop my first program. It's a little C# db app. I have the db tables and columns planned and keyed into VS, but that's where I'm stuck. I'm needing C#/VS tutorials that will guide me on configuring relationships, datatyping, etc, on the db so I...

speed up a sql query to mysql?

in my mysql database i've got the geonames database, containing all countries, states and cities. i am using this to create a cascading menu so the user could select where he is from: country -> state -> county -> city. but the main problem is that the query will search through all the 7 millions rows in that table each time i want to ...

Recommendation needed for text content, should I use text files or database?

I'm doing a web application in asp.net mvc. Now I'm at the point where I do alot of text info such as help texts, eula, privacy policy etc. I realized that I'm not sure what would the best way to store these texts. 1. Directly in the aspx page 2. In text files and then load the text via ViewData[] to the aspx file 3. In my sql database ...

Which relational databases exist with a public API for a high level language?

We typically interface with a RDBMS through SQL. I.e. we create a sql string and send it to the server through JDBC or ODBC or something similar. Are there any RDBMS that allow direct interfacing with the database engine through some API in Java, C#, C or similar? I would expect an API that allows constructs like this (in some arbitrary...

What programming languages/platforms can read XML documents?

I'm working on a class assignment that involves reading an XML document and inserting the contents into a database. Language choice is wide open - so I figure, why not consider all my options! What languages are able and appropriate for the reading of XML? ...

Optimizing Oracle query

SELECT MAX(verification_id) FROM VERIFICATION_TABLE WHERE head = 687422 AND mbr = 23102 AND RTRIM(LTRIM(lname)) = '.iq bzw' AND TO_CHAR(dob,'MM/DD/YYYY')= '08/10/2004' AND system_code = 'M'; This query is taking 153 seconds to run. there are millions of rows in VERIFICATION_TABLE. I think query is taking long because ...

Do I have both SQL Server 2005 and SQL Server 2008 installed?

When in 'SQL Server Configuration Manager' I see, under 'SQL Server Services', 2 items that look like SQL Server's: SQL Server (sqlexpress) SQL Server (mssqlserver) Does that mean I have 2 versions installed at the same time? The 'SQL Server (mssqlserver) is currently stopped). ...

database for streets world wide?

i use the downloadable geonames database for all countries, states, counties and cities in the world. but i wonder if there is a database for streets? so you could pick: country -> state/department/district -> (county/region) -> city -> street in whatever country you like? cause when i do a search for a street in google map i can see ...

Best Practise to populate Fact and Dimension Tables from Transactional Flat DB

Hi! I want to populate a star schema / cube in SSIS / SSAS. I prepared all my dimension tables and my fact table, primary keys etc. The source is a 'flat' (item level) table and my problem is now how to split it up and get it from one into the respective tables. I did a fair bit of googling but couldn't find a satisfying solution to...

what databases can be used with java?

I am doing an undergrad final project, and need to justify my choice of MySQL for the database element of my project. Truth is, it's the only one I can really use, and hence I went for it. What other database systems could I have used? Any advantages and disadvantages of these over MySQL? ...

What programming languages/platforms are suitable for writing to a database?

I'm working on a class assignment that involves reading an XML document and inserting the contents into a database. Language choice is wide open - so I figure, why not consider all my options! What languages are able and appropriate for working with databases? ...

Database migration pattern for Java?

Im working on some database migration code in Java. Im also using a factory pattern so I can use different kinds of databases. And each kind of database im using implements a common interface. What I would like to do is have a migration check that is internal to the class and runs some database schema update code automatically. The actu...