database

What's the difference between table-based relations and column-based relations in RDBMS?

Hi, I have used column-based relations a lot in my projects like: CREATE TABLE `user` ( id INT AUTO_INCREMENT PRIMARY KEY, usergroup INT ); CREATE TABLE `usergroup` ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(50) ); however, at work it seems some people do it using table-based relations like this: CREATE TABLE `user` ( id INT...

save php variables permanently without database

In the admin area of my site there is a form which is for the hostname, username and password for the mysql database that the site uses. Currently these values are hardcoded into a php class. But who can I link it so the form can edit the variables in the php class (and keep the results on the server, in other words the variables are har...

Saving credit card information in MySQL database?

I want to allow my customer users to enter their credit card information so that I can charge them every month. I wonder how one should save this information? Should it be saved in the MySQL database ("user" table) or is this kind of information too sensitive and need to be stored in another place? I have no experience of this and wou...

How to access a database (like MS Access or something) in Fujitsu COBOL?

Hi, I'm looking for example code on how to connect to a ODBC database using Fujitsu COBOL. I couldn't find any documentation on their site which was useful to me :-S. Many thanks, Yvan ...

Running a query multiple times vs using a cookie

A question about query/database performance: I have a table that records how many “points” a user has earned. There is 1 row for every 1 point. When someone gains 20 points, 20 rows are inserted into the database. When someone looses 20 points, I will add a row with the value of “-1” in the database. Thus the number of points someo...

New Oracle Database

When I create an Oracle database it has a lot of tables in it with strange names. What are these tables? Should I keep them? If not, how can I avoid creating them? These are the table names: LOGMNR_UID$ LOGMNR_SESSION_EVOLVE$ LOGMNR_GLOBAL$ LOGMNR_RESTART_CKPT_TXINFO$ LOGMNR_AGE_SPILL$ LOGMNR_SPILL$ LOGMNRC_DBNAME_UID_MAP LO...

Couchdb database authentication

Hi, i want to manage my couchdb rights in _user database. But I don´t know how to set the right authentication handler. authentication_handlers = {couch_httpd_auth, default_authentication_handler} default_handler = {couch_httpd_auth, handle_request} authentication_db = _users require_valid_user = true This is my actual setting. ...

Database or format for help system?

Hi. I'm implementing a help system for my app. Its written in C and Gtk+. Help is divided on books. Each book is just a bunch of HTML pages with resource. The problem I've encountered is that each book is ~30M (using WebKit Gtk port to display it). After zipping it becomes ~7M, but opening document becomes extremely slow :( So I'm think...

I plan to use jsfiddle for html demos on my site, but how can I store my actual code?

My site will feature dozens and dozens of front end live demos ( html pages with cross browser bugs ), but instead of just throwing it on jsfiddle.net and linking to demos from articles I would actually like to store them in a database or organized dynamically generated flat files. Example: http://site/css-bug/ will feature an article ...

Programming a long-running time-based process

I was wondering what the best way to write an application would be. Basically, I have a sports simulation project that is multi-threaded and can execute different game simulations concurrently. I store my matches in a SQLite database that have a DateTime attached to it. I want to write an application that checks every hour or so to see...

IO Question: Writing a portion of a file

I have a general IO question. I was trying to replace a single line in an ascii encoded file. After searching around quite a bit I found that it is not possible to do that. According to what I read if a single line needs to be replaced in a file, the whole file needs to be rewritten. I read that this is the same for all OS's. After readi...

When to build a separate reporting database?

We're building an application that has a database (yeah, pretty exciting huh :). The database is mainly transactional (to support the app) and also does a bit of "reporting" as part of the app - but nothing too strenuous. Above and beyond that we have some reporting requirements - but they're pretty vague and high-level at the moment. ...

Querying for entities with missing properties in app engine Datastore?

I have a model which looks like this: class Example (db.Model) : row_num = db.IntegerProperty(required=True) updated = db.IntegerProperty() ... ... Now when i store values, I may not fill the value for the updated property every time, which implies that in some entities it may not exist. I want to construct a datastore query so ...

Data still not able to be showed in Listview

I cant be able to show my data into a listview using this code which Ive found on a particular website. I am able to show all the images in listview but the data are not there! Someone please help! db = new DBAdapter(this); toptext = (TextView) findViewById (R.id.toptext); bottomtext = (TextView) findViewById...

I need to know how i can write IF statements and CASE break statements that use and execute queries, etc in MySQL ?

I need to execute a query that is highly dependent on several conditions what need to be checked by analyzing that data in other tables, the base goal is to return the rows from the tables if all of the conditions in the other tables are true, I am fed up with INNER joins LEFT joins and WHERE statement, i need to look up one table, if th...

Other platform to socialize information like FLUIDDB?

In its official website, http://fluidinfo.com/, it is described as the following: "FluidDB is a platform for the web of things, each represented by an openly writable "social" object". In http://eu.techcrunch.com/2009/08/31/fluidinfo-a-database-aiming-to-socialize-information/, it is described as "Fluidinfo – a database aiming to social...

which database to use in Scala (and examples needed)

I am new to Scala. Which database connectivity is best supported in Scala? I am also looking for complete examples to access a database (authenticate, connect, query, extract result) I have a table MyTable with two columns (Value1, Value2) in a database MyDB, which I need to access. I have been thinking of postgresql, so some example...

Question about database

Hi I have problem with two parts of database diagram and I need your guidance:) database has a lot of tables that one of them is about Employee ,the other is about Customer and ... ! I have problem with two tables (Product and OrderDetail) my Product table has 3 columns (ProductID,Name,Cost) and the Other table is OrderDetail that has th...

how to backup all DB info using mysqldump?

I want not only the "Create table" statements, but also the Inserts. What flags should i pass to mysqldump? In addition - the database is relatively large (2-2.5G). Obviously, i want the backup to be as fast as possible. Any flags that might help? Thanks ...

I need some advice on storing data in mysql, where one needs to store more than one, let say userids for a single post?

In cases when some one needs to store more than one value in a in a cell, what approach is more desirable and advisable, storing it with delimiters or glue and exploding it into an array later for processing in the server side language of choice, for example. $returnedFromDB = "159|160|161|162|163|164|165"; $myIdArray = explode("|",$ret...