database

Symfony Jobeet Tutorial Day 3, databases.yml error

Hi all, I'm new to Symfony and I'm going through the Jobeet tutorial v1.4 for Doctrine. I am currently stuck on Day 3. I've followed all the instructions on configuring the database and building models and modules; however, when I try to access "http://localhost:8080/frontend_dev.php" I receive the following error: 'Configuration "conf...

Regarding ORA 21000

Hi, I am struggling with an ORA 21000 which says ORA-21000: error number argument to raise_application_error of 3739 is out of range. This error is coming intermittently. I am not sure why this is occurring. This worked absolutely fine earlier, but after migrating to Linux from Solaris, this error has suddenly come up. Googling it d...

Database best practices

I have a table which stores comments, the comment can either come from another user, or another profile which are separate entities in this app. My original thinking was that the table would have both user_id and profile_id fields, so if a user submits a comment, it gives the user_id leaves the profile_id blank is this right, wrong, i...

Parsing complicated query parameters

My Python server receives jobs that contain a list of the items to act against, rather like a search query term; an example input: (Customer:24 OR Customer:25 OR (Group:NW NOT Customer:26)) So when a job is submitted, I have to parse this recipient pattern and resolve all those customers that match, and create the job with that input....

How to organise team work on mysql databases?

How to organise team work on mysql databases? Probably, something like svn, but for databases ...

Using database in Android

Does anyone know a good step by step tutorial for using sqlite on Android? I've found this: http://developer.android.com/guide/topics/data/data-storage.html#db and it ok to start with, but then it wants me to jump into other source code then its difficult to follow. I've tried others on the web, one from screaming penguin and that just...

Good strategy for copying a "sliding window" of data from a table?

I have a MySQL table from a third-party application that has millions of rows and only one index - the timestamp of each entry. Now I want to do some heavy self-joins and queries on the data using fields other than the timestamp. Doing the query on the original table would bring the database to a crawl, adding indexes to the table is not...

Save phone calls data in a DB?

How would you save this data on a database: An user can make phone calls (id, date, hour, duration, outcome). The "outcome" can be, for example, to recall the client on another day (so I have to save the date, the hour, etc of this "future" call). How would you manage this data on a db? At the moment i have only a "Call" table. ...

Do you know of a good F# and C# interop example available?

I am going to write a C# WinForms application which will run a long data-crunching task in a BackgroundWorker, show progress in a ProgressBar and have buttons to start, pause, resume and cancel the operation. I'd like to write the calculation in F#. Do you know of any good examples or readings available in the Web which can help me? ...

I want define tables from ER Diagram.

I have a unary relationship. (Image Url : http://freezpic.com/pics/666c94955212a2f757fa25f9f7d31a5e.png) But I want define a table for person. The table has personID and personName column. What columns add it? ...

Building Licensing server for per-seat licensing model - database design and payment aspects

Hi, sorry for lengthy post, and thanks in advance for reading through it. I am developing software that should use licensing model which is I believe similar to per-seat licensing: There is a central licensing server, which approves/denies licenses Central server allows customers to purchase certain number of licenses at any given mo...

Why doesn't PHP's oci_connect return false?

I have a situation in which we have two production databases that synchronize with one other. Server One is considered the primary. Sometimes due to maintenance or a disaster Server Two will become primary. In some of our code that means we have to manually go in and edit the server name for database connections. I find this annoyi...

Database Design: Why do some ecommerce database have separate tables for products and product_variants?

Hi Why do some ecommerce database have tables: product product_variant Why not only one product table with all teh fields of product_variant and is_default_product(bool) field? Thanks ...

Timed planning Mysql database cleaning

We need to create a script (ajax or php or javascript) that will clean some tables from our database at fixed time. We can not use server features such like Cron tab or others. Any suggestions??? Thanks ...

IntegrityError with Booleand Fields and Postgresql

I have this simple Blog model: class Blog(models.Model): title = models.CharField(_('title'), max_length=60, blank=True, null=True) body = models.TextField(_('body')) user = models.ForeignKey(User) is_public = models.BooleanField(_('is public'), default = True) When I insert a blog in admin interface, I get this err...

(Database Design) why in the database tables most of the times primery key name is: <tablename_id> and not <id>?

Hi, why in the database tables most of the times primery key name is: tablename_id and not id? example: user_id and not just id. Thanks ...

Many-to-many relationships examples

I haven't found any MYSQL many-to-many relationships examples here and in google. What I am looking is to see a very simple example with php+mysql showing database's results. Can anybody write a very simple example? ...

DB Design to store custom fields for a table

Hi All, this question came up based on the responses I got for the question http://stackoverflow.com/questions/2785033/getting-wierd-issue-with-to-number-function-in-oracle As everyone suggested that storing Numeric values in VARCHAR2 columns is not a good practice (which I totally agree with), I am wondering about a basic Design choice...

Rails - single ID for multiple models

I'm building an app which will allow a user to scan the barcode on a 'shelf', 'box' or 'product' which will then bring up that particular item or all the associated items. As these are all separate models with their own ID's, I need a global ID table. I was thinking of a polymorphic table called 'barcodes' barcodes id barcode_numbe...

How can I Display an extract from MySQL database entry?

I'm after creating a webpage that includes a blog section and it currently displays the whole post on the homepage. I'd like to set it so that it only displays a certain part of the entry i.e 50 words. I'd then like to be able to set it so that I have a read more button below the post that links to the post id. I currently use post.php?=...