database

How do I return multiple results in a SQL subquery?

I have a query below and would like to know if it is possible to get more than 1 result. I would like to get the 4 most recent entries. Thanks! select c.email,c.text,m.alertDataID from client_users as c, monitor_alerts as a, monitor_alerts_data as m where c.id=a.userID and a.alertID=m.alertID and m.alertDataID = (SELECT alertDataID ...

Mixing Zend_Db with ORM Classes

Zend has Zend_Db but it's not a full ORM. I already have sections of an app written in a way that uses Zend_Db. I do however want to integrate a full ORM into the application to use it for more complex database operations, but I don't want to have to re-write existing actions that are complete. Those more experienced with Zend Framework...

Zend db adapter mysqli or PDO_MYSQL

I've seen several code samples that do this in application.ini resources.db.adapter = mysqli or resources.db.adapter = PDO_MYSQL What is the real difference between the two? Does it impact my code? when should I choose one or the other? ...

MMO - Best non-sql DB to store data

What do you think would be the best non-sql database for storing info of players in a real-time MMO game that runs on a C++ server? ...

Adding fields to a complex SQL select statement

I need to return the values of two more fields from the "sys_acl_matrix" table, but I don't know how to read these AS and LEFT JOIN things. The fields I need to add are: AllowedCount AllowedPeriodLen Here is the Query $GLOBALS['MySQL']->getAllWithKey( "SELECT `ta`.`ID` AS `id`, `ta`.`Name` AS `title` FROM `sys_acl_actions` AS `ta...

MongoDB or CouchDB or something else?

I know this is another question on this topic but I am a complete beginner in the NoSQL world so I would love some advice. People at SO told me MySQL might be a bad idea for this dataset so I'm asking this. I have lots of data in the following format: TYPE 1 ID1: String String String ... ID2: String String String ... ID3: String String...

iPad best practice to keep backend data model

Hi, I am developing iPad application, A set of forms that user has to fill (roughly 500 text fields). The form fields are displayed in a UITable view. Once user fill the forms he/she can uploaded the data to the server. Until its uploaded, the data should be persist in a temporary location in the local disk. In my application desig...

Where can I find a good MySQL Database client?

I'm looking for a good MySQL Database client similar to phpMyAdmin only for the desktop. Anyone know of any that are free and as full feature as phpMyAdmin? It needs to be able to connect to remote MySQL servers. ...

Social web application database design: how can I improve this schema?

Background I am developing a social web app for poets and writers, allowing them to share their poetry, gather feedback, and communicate with other poets. I have very little formal training in database design, but I have been reading books, SO, and online DB design resources in an attempt to ensure performance and scalability without ov...

MySQL, need some performance suggestions on my match query

I need some performance improvement guidance, my query takes several seconds to run and this is causing problems on the server. This query runs on the most common page on my site. I think a radical rethink may be required. ~ EDIT ~ This query produces a list of records whose keywords match those of the program (record) being queried. My...

Database of Countries and their Cities

I need a database of Countries and their Cities. any idea where i can get it. or any one can share it with me ? Like this http://www.worldcitiesdatabase.com/world-cities.aspx ...

sqlite memory mode support persistence to local?

i didn't know what's meaning of memory database,dose sqlite is a memory database? on this mode,is it support persistence data to local file? ...

deploy SQL Server Database with a Winforms app

I have created a SQL DB-based winforms application, and I want to deploy it on a client machine. The program is a single user desktop application. Opinions in this post suggest it's better to use SQLite or SQL Server Compact Edition in such scenarios. However, I prefer to use stored procedures, which are not supported in those product...

data collection for statistics: from web to a database

Hi, I'm a statistician by trade and I'd like some recommendations on how to set up a website that can collect data into a database. For personal use, I use Google Forms to collect data, and everything gets populated into a spreadsheet. However, this may not be appropriate in a more professional setting, especially when we have multipl...

Database performance with looped update queries?

I am currently structuring my queries for a database update model with CodeIgniter. I getting the form posted input keys with $keys = array_keys($_POST) To update according database fields I was wanting to do something like this foreach($keys as $key){ $data = $this->input->post($key); $this->db->query("Update $table SET '$key...

one to many mapping

I have a problem of mapping some scenario into data base.Problem is something like this. There are two entities called Employee(empID,empName) and Task(taskID,taskName). A employee can have ZERO-OR-MORE tasks. A task can have ZERO-OR-ONE employee. What will be the table structure that should I follow.. I'm going to implement this s...

Can I search across collections in MongoDB?

I am inserting my data into MongoDB and had 240 such files. Instead of inserting everything into one big collection, I was thinking of inserting the files as a collection by themselves. Is this a good idea if I do a lot of queries on a commonly indexed column? If so, how can I initiate a query to query all the collections in my databas...

Can you compare text alphabetically in a WHERE clause?

I'm using SQLite, and I need to do the following: SELECT * FROM fruit WHERE name<='banana' This statement should return all entries whose "name" column contains text that comes alphabetically before (or is equal to) the word "banana". So it should return the row with "apple", but not the row with "pear" or "orange". It appears that s...

Book Database Data

I am creating a database which will contain information about book. (title, author, description, edition etc). Is there anyway i can download book data from the web so that i can insert in my database. I want database to have between 500 - 1000 books information. The database is in Sql Server. ...

ASP.NET MVC 2 - simple increment value in database by submit in view

I'm guessing is very simple, but I'm learning MVC 2 right now and I'm stuck. I've got strongly typed view with some fields and buttons which should change something in database by click on them. So it is code <% using (Html.BeginForm("UpVote", "Home",FormMethod.Post,new { linkId = link.LinkID })) {%> <input type="submit" val...