database

Once I have a database project in Visual Studio, if I edit a stored procedure or view, how do I apply the changes to the server?

Once I have a database project in Visual Studio, if I edit a stored procedure or view, how do I apply the changes to the server? ...

How do you make a column an auto incremented primary key in the various .NET ORMs?

How do you make a column (let's call it OrderID) an auto incremented primary key in the various .NET ORMs? Linq To SQL [Column(Name="OrderID", IsPrimaryKey=true, IsDbGenerated=true)] Entity Framework [EdmScalarProperty(EntityKeyProperty=true, IsNullable=false)] (Not possible to specify autoinc?) NHibernate [Id(Name = "OrderId"...

What sort of database design would I need to use in case I wanted users to save tags, and be able to call already used tags?

I'm trying to implement a feature similar to StackOverflow's tag feature. That a user can create a new tag, or by typing pull up a list of similar tags already created. This is such a wonderful feature on this site and I find it sad that most sites do not have something like this. It's both robust, and yet very very flexible and best of...

How do you make a multiple-choice list from the sqlite database in Android?

I'm new to Android programming, and I wanted to pull list options from a column of the SQLite database for the user to select. How would I go about doing this? Like, say the database table to be read is called countries, and the columns were ID, country, and capital. How would I let the user pick from the list of capitals and have the ap...

If I have two tables in SQL with a many-many relationship, do I need to create an additional table?

Take these tables for example. Item id description category Category id description An item can belong to many categories and a category obviously can be attached to many items. How would the database be created in this situation? I'm not sure. Someone said create a third table, but do I need to do that? Do I li...

Random ID Generator, mapping vs. same-column

Hi all, There're a few entities that we wish to hide its exact ID from the customers - the main reason is that, we do not want customers to know how many of them are in the DB. e.g. from the URL, http://mydomain/user/get/27, it says that this is the 27th user. Therefore, I am implementing a solution that assigns random ID (that has to...

Need help in gridview and table

Hi all, Pls somebody give me the solutions. Suppose i have data in database table. I wanna display all the field with data in gridview. In database table i have 1000 rows of data. But in gridview in one page can hold only 50 rows. So when i click on page 2 in gridview it should display next 50 rows....then again if click on page 3, gridv...

Why is a "GRANT USAGE" created the first time I grant a user privileges?

I'm new to the admin side of DBMS and was setting up a new database tonight (using MySQL) when I noticed this. After granting a user a privilege for the first time, another grant is created that looks like GRANT USAGE on *.* TO user IDENTIFIED BY PASSWORD password The documentation says that the "USAGE" privilege means "no privileges,...

If I want to get a Facebook user's "info" and "posts"...do I need Facebook Connect or Facebook Application?

Preferably, I want the least work possible! ...

How to retrieve the last autoincremented ID from a SQLite table?

I have a table Messages with columns ID (primary key, autoincrement) and Content (text). I have a table Users with columns username (primary key, text) and Hash. A message is sent by one Sender (user) to many recipients (user) and a recipient (user) can have many messages. I created a table Messages_Recipients with two columns: MessageID...

Getting Error while read the data from table

Hi all, I am displaying the all the data in gridview from database table. I have attached the database file in app folder. But after writing the while i am running the application getting error like "Cannot open database requested in login 'Employee'. Login fails. Login failed for user 'HOME-47F64BE31D\Administrator'." Here is all my co...

I need to exchange data with different programs in text format what do you suggest ?

Hello, Our program needs to import/export data from/to different programs, each from specific independant proprieties. Most of these companies would send 2 text files: the first consisting of the data content along with a second one holding descriptions. Suppose this example: content file: TheArtofDeceptionKevin11.53 Description file:...

Creating a DAO Query with many One-to-Many Relationships?

I am developing a web application with PHP and MySQL. I have an entity named, User, that has many one-to-many relationships (with other objects) within it (list of Addresses, list of Emails, list of PhoneNumbers, etc). These many addresses, emails, phone numbers are supplied to the user via junction tables in the database (user_link_addr...

What does it mean to vacuum a database?

As referenced by this Firefox bug, what does the act of vacuuming a database accomplish? Is this operation supported by all modern database software, or only certain ones? ...

Check load on mysql database

Hi guys, What would be the best ways to monitor mysql performance and load, queries per second, total queries over a hour etc? Thanks! ...

DB load CSV into multiple tables

UPDATE: added an example to clarify the format of the data. Considering a CSV with each line formatted like this: tbl1.col1,tbl1.col2,tbl1.col3,tbl1.col4,tbl1.col5,[tbl2.col1:tbl2.col2]+ where [tbl2.col1:tbl2.col2]+ means that there could be any number of these pairs repeated ex: tbl1.col1,tbl1.col2,tbl1.col3,tbl1.col4,tbl1.col5,tb...

Update database when file is added

Having a server(ish) I want a way to keep track of the files I have in some folders with a web-interface. I have done most of the programming already, by basically parsing through the folders each load ( not the most optimized way but it has had it advantages as well ). But now the reasons of keeping the files in a database has become ov...

Java: Rollback Database updates?

I have three methods that, together, save a node to the database. Currently, this does not achieve the desired effect of not committing the changes unless all the writes are successful. conn.setAutoCommit(false); writeNodeTable(node, newNodeNID); writeContentTypeBoutTable(node, newNodeNID); writeTerms(node, newNodeNID); ...

Visualization tools for a Data mart

Hi I want to setup a simple department level data mart. The source data is in an oracle database. The target is also an oracle database. I have the data mart design ready. It is a star schema. I am looking at the various options to A) Move the data from source to target B) Visualization tools to use the data mart A) For data movement I ...

The fastest way to check if some records in a database table ?

I have a huge table to work with . I want to check if there are some records whose parent_id equals my passing value . currently what I implement this is by using "select count(*) from mytable where parent_id = :id"; if the result > 0 , means the they do exist. Because this is a very huge table , and I don't care what's the exactly num...