database

Need help with MySQL query & PHP

I have the following 3 tables: (PK = Primary Key, FK = Foreign Key) Files Table File ID (PK) File Name ... ------------ --------- 1 a.jpg ... 2 b.png ... 3 c.jpg ... . . . . . . Tags Table Tag ID (PK) Ta...

When should I use Oracle's Index Organized Table? Or, when shouldn't I?

Index Organized Tables (IOTs) are tables stored in an index structure. Whereas a table stored in a heap is unorganized, data in an IOT is stored and sorted by primary key (the data is the index). IOTs behave just like “regular” tables, and you use the same SQL to access them. Every table in a proper relational database is supposed to ha...

Why in cpanel databse size is showing 0.00MB?

Why in cpanel database size is showing 0.00MB while when i take backup of database then it is 1.2 MB? ...

Relationships and data modeling in document oriented databases

I just read a few articles on data modeling and relationships in document oriented databases (... anti pattern, CouchDB article, MongoDB article ...). There are certain "issues" about which I would like to talk and hopefully find a solution/pattern to stop them deluding me. There is a common saying that you should stop thinking like you...

Foreign key to one of many tables?

The usual way of setting a foreign key constraint is to choose which table the foreign key will point to. I'm having a polymorphic relation between 1 table and a set of table. That means that this table will have a relation with one of those tables in the set. eg. images: person_id, person_type subordinates: id, col1, col2...col9 pro...

Data model: parent and child 'dual' relationship

I am trying to create a proper parent/child relationship within my data model. I have a typical one to many relationship between the parent and children. I am wondering if I have parents that know about their children, is it 1) ever acceptable and 2) a good idea for each child to specifically know about its parent. (a child can only hav...

Memcached for Social Network Application

I asked this question over at ASP.NET... http://forums.asp.net/t/1584731.aspx ...but wanted to ask it here as well. I’m sure this problem has been solved before so I figured why reinvent the wheel… Short story, I’m building a web application with social features using memcached as a caching layer for the database. To simplify the prob...

php breadcrumbs from url and query database

I have a php function that works for what i need but now i've found that there is chance for it to fail. I use mod rewrite to rewrite urls and this function needs urls to be rewritten for it to work. If i have 2 pages that have been rewritten as the same even though they are not the same, it could fail. The function reads the url and ...

NTier with MFC... ?

I am writing a Visual C++ MFC application and getting stumped over what seems to be simple issue. There is a server and database (MSSQL) Open ports are HTTP, HTTPS There is the MFC client. It needs to connect a TCP/IP stream (possibly HTTP, SOAP, REST) to the server. Sometimes the MFC client goes off-line and then the MFC client store...

Using MySQL to search through large data sets?

Now I'm a really advanced PHP developer and heavily knowledged on small-scale MySQL sets, however I'm now building a large infrastructure for a startup I've recently joined and their servers push around 1 million rows of data every day using their massive server power and previous architecture. I need to know what is the best way to sea...

How do i retrieve items from a database ?

REALLY SORRY FOR THE BAD QUESTION. HERE'S AN EXAMPLE OF MY CURRENT CODING. BASICALLY I TAKE THE INPUT FROM A TEXTFIELD. SO HOW DO I STORE AND RETRIEVE THE INPUT? String input = txtInput.getText(); StringBuilder builder = new StringBuilder(); char[] charArray = input.toCharArray(); for(int i = 0; i < charArray.length; i +=2) { if(...

Desktop software development (possibly using web technology) and cryptographic checks

OK, go easy on me as it's my first question here. ;) I am experienced in Web Application development, but I need to design 2 different desktop applications at work. I need advice on what languages to use (I use PHP for Web Applications, I have little other experience), any frameworks that may help me accomplish this easier and any IDEs ...

Help with showing data on spinner.

Hi , i would like to show data from my database onto a spinner. how would that be possible? As there is an null error in my logcat. Booking.java public class Booking extends Activity { private DBAdapter db; private Spinner colourSpinner; private String txtArrival; /** Called when the activity is first created. */ ...

Database usage online

How does database make paying for things online possible? ...

How do I modify this query in MYSQL?

SELECT title, title REGEXP 'apple' as is_fruit FROM mytable; TO: SELECT title, title REGEXP 'apple' or orange...or grapes...as is_fruit... Basically, how do I do an "OR" for REGEXP? ...

How to create Facebook like friends system in php with mysql

I want to create a friends system like facebook, well quite weird than that. When a user adds someone, the someone will be notified, if agree then they'll be mutual friends(in this case, meaning both parties are friends, literally) or if the someone leaves the request unresponded, they'll become fan of the someone. The someone reject the...

Multi language - large scale social network

What is the best way to implement multi-language support for a social (100% user content) website. Currently it's being developed in PHP in english with multi support. The plan is to keep adding in as many languages as possible as the site grows. There are 200 identified languages to target 1 by 1. Two content types: System content -> t...

Made Django's auth track on emails, how to relate username field to email?

My original though was to simply put the email address into both username and email fields when creating accounts, this doesn't work as Django limits the username field to 30 characters which may not be enough for email addresses. My second thought was to md5 the email address, put the hash into username, and that would make it always ...

Why is long an issue with Oracle?

Why is long an issue with Oracle? It will be better if some one can tell me what are the issues with using the long data type in oracle? something related to storage? I was asked this in an interview. ...

How to handle database logic from model

Hi, I created a enterprise system model from a class diagram and converted it php object oriented code. What I have now is just an empty model, it's able to relate and the connections are handled. Now the next step is ahead. I have a database and have to put the object into the database. Now there is a lack of experience on my side. I...