database

How to get the list of table names from database in Drupal

Hi, I want to get tables list into array from database and the column names of a specific table into array in Drupal. Please mention the queries in Drupal. Thanks ...

Possible to programmatically ALTER multiple MySQL tables?

I have multiple MySQL tables with names of the form "Shard_0", "Shard_1", "Shard_2" ... "Shard_n" All of them have identical table structure. They all live in the same database. Say I want to add a column to all those tables. Is there a way to do that programmatically? Something like: # pseudo code for i in range(n): tablenam...

could some plz tel me tip's to understand sphinx from scratch

I need to understand sphinx from scratch. m new to using sphinx and I work on asp.net. If any of u have any document's or ebook's about sphinx plz mail me at ...

Database performance: filtering on column vs. seperate table

I was wondering what the best approach would be for the following situation: I have an Orders table in a database that obviously contains all orders. But these are literally ALL orders, so including the complete/finished ones that are just flagged as 'complete'. From all the open orders I want to calculate some stuff (like open amount, ...

PHP echo() MySQL result containing <> characters?

I am retrieving data from my SQL database... data exactly as it is in the DB = (21:48:26) <username> some text here. is it ok? when i try and echo $row['log']."<br>"; it displays it as = (21:48:26) some text here. is it ok? i assume this is due to the <> brackets making it think its an HTML opener... would this be the case? and if so...

Size of database . PHP - MySQL

Hello. I want to know the size of my database using php. How to display the size in megabytes entire database? Size in megabytes a specific request? ...

Salting a secret with itself before storing in a DB, what are the weaknesses?

I've heard of people using this approach and would like to know what the implications are. I just know it's a bad idea! From what I understand, salting a password before storing the hash in a DB has the primary purpose of making every hashing algorithm unique, and thus requiring a new rainbow table for every user when trying to crack it...

I need to strip dynamic information from a html/php file with PHP

Hi there, I have been trying to strip information out of a dynamically generated page and then insert the information into a database, this is only a one time thing. to explain the layout: I have a list of 700 IP addresses in my database currently but they have no location linked to them, I am using the following code to retrieve the ...

how to maintain database integrity for write operations in a website

A website to change add records delete etc website is not connected architecture, so i cant expect sql to refuse writes to a table being edit by some one else also. As data is only written when its sent back to server by the grid.. so is there a way using c# and asp.net, some code , by which i cant explicitly tell the sql server to...

Insert 100k rows in database from website

Hi all, I have a website where the user can upload an excel spreadsheet to load data in a table. There can be a few 100k rows in the excel spreadsheet. When he uploads the file the website needs to insert an equal amount of rows in a database table. What strategy should i take to do this? I was thinking of displaying a "Please wait pa...

HBM2DDL -- Create a database view instead of a Table?

All, Is there some setting that I can tell hbm2ddl to run a view creation statement instead of create a table when generating the database schema? I'm creating my database schema using the wonderful hbm2ddl tool, but I have one issue. I need to flatten some of the tables into views to aid searching the database, and hql would be over...

Need strategy for managing aggregated data during large database table creation

Imagine collecting all of the world's high-school students' grades each month into a single table and in each student's record, you're required to include the final averages for the subject across the student's class, city and country. This can be done in a post-process, but your boss says it has to be done during data collection. Cons...

How should I structure my MySQL database?

Hi all! First of all, sorry if this might be a stupid question. I'm very new to the world of MySQL, so... Anyway, my question is this: I'm planning on having a database that deals with (for now) two types of users, let's say Admins and Users. My aim is to have ONE table containing all users, aptly named "users". Below is a rough outlin...

Replicating database changes

Hi, I want to "replicate" a database to an external service. For doing so I could just copy the entire database (SELECT * FROM TABLE). If some changes are made (INSERT, UPDATE, DELETE), do I need to upload the entire database again or there is a log file describing these operations? Thanks! ...

NHibernate sqlite database providers configuration

I'm writting simple application and i'm stuck in the defenition process it seems i'm lacking a reference or a dependency but after reading every blog/forum/starter kits i couldnot find the answer i hope you'll be able to help me I defined an employee class and mapping object with id, name and age created a database using sqlite and cre...

Aggregates on large databases: best platform?

Hello, I have a postgres database with several million rows, which drives a web app. The data is static: users don't write to it. I would like to be able to offer users query-able aggregates (e.g. the sum of all rows with a certain foreign key value), but the size of the database now means it takes 10-15 minutes to calculate such agg...

pluggable data store architectures

I have a pluggable system management tool. The architecture of this kind of thing is well understood (interfaces, publish/ subscribe, ....). How about the data store though. What do people do? I need plugins to be able to add new entities, extend existing entities, establish new relationships, etc. My thoughts (SQL), not necessarily we...

Are databases deleted when an application is updated?

I added a table to a database that my application uses and wrote some code to work with that table. Everything worked fine for my on my phone and in the emulator, so I sent the update to the market. This cause me to receive quite a few stack traces in the developers console cause by android.database.sqlite.SQLiteException: no such tabl...

What are some of the common strategies and/or frameworks used for data access layers?

What are some of the common strategies used for data access? Can LINQ be called a strategy? ...

Moving a ColdFusion site without DB details

I recently have been nominated to transfer a CF site from one host to another. While I have completed getting the site up on the new server I now need to set up the DB backup on to the new server. I am looking to find a config file or something similar but no one who had control of the site is being very helpful. If someone can lead m...