Search Results

Search found 10966 results on 439 pages for 'kevin db'.

Page 4/439 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • The C++ Standard Template Library as a BDB Database (part 1)

    - by Gregory Burd
    If you've used C++ you undoubtedly have used the Standard Template Libraries. Designed for in-memory management of data and collections of data this is a core aspect of all C++ programs. Berkeley DB is a database library with a variety of APIs designed to ease development, one of those APIs extends and makes use of the STL for persistent, transactional data storage. dbstl is an STL standard compatible API for Berkeley DB. You can make use of Berkeley DB via this API as if you are using C++ STL classes, and still make full use of Berkeley DB features. Being an STL library backed by a database, there are some important and useful features that dbstl can provide, while the C++ STL library can't. The following are a few typical use cases to use the dbstl extensions to the C++ STL for data storage. When data exceeds available physical memory.Berkeley DB dbstl can vastly improve performance when managing a dataset which is larger than available memory. Performance suffers when the data can't reside in memory because the OS is forced to use virtual memory and swap pages of memory to disk. Switching to BDB's dbstl improves performance while allowing you to keep using STL containers. When you need concurrent access to C++ STL containers.Few existing C++ STL implementations support concurrent access (create/read/update/delete) within a container, at best you'll find support for accessing different containers of the same type concurrently. With the Berkeley DB dbstl implementation you can concurrently access your data from multiple threads or processes with confidence in the outcome. When your objects are your database.You want to have object persistence in your application, and store objects in a database, and use the objects across different runs of your application without having to translate them to/from SQL. The dbstl is capable of storing complicated objects, even those not located on a continous chunk of memory space, directly to disk without any unnecessary overhead. These are a few reasons why you should consider using Berkeley DB's C++ STL support for your embedded database application. In the next few blog posts I'll show you a few examples of this approach, it's easy to use and easy to learn.

    Read the article

  • row specific class

    - by stimpie
    How do I create a Zend_Db_Table which returns a different class for each row.? Example UserTable has id,name and type Type contains class names (admin,client,etc...) The classes admin, client are all subclasses of user If I call fetch I need to get a admin or client object depending on the corresponding value in the db.

    Read the article

  • How to write a subquery using DB

    - by Rita
    SELECT SUM( amount_disbursed ) disbusedamount, (select SUM( loaninstallmentpaid_amount ) FROM ourbank_loan_repayment) paidamount, SUM( amount_disbursed )- (select SUM( loaninstallmentpaid_amount ) FROM ourbank_loan_repayment) differenceamount FROM ourbank_loan_disbursement Any Help would be appreciated

    Read the article

  • Synchronising scripts / db / files from dev system to web server

    - by Spoonface
    I work as a freelance web dev, and up until now have been ftping my scripts / databases / static files to my web server manually, but I'm finding that is too error prone. So I'm looking for an app to automate uploading new and updated scripts / files / databases / etc. I know a lot of independent devs use WinSCP or Unison, but I don't think those apps can synch databases. Does anyone have any other suggestions? It doesn't need to be anything overly feature rich as I'm not working within a team or across multiple operating systems or anything like that. I can purchase any reasonably priced license if necesary. My work is primarily for PHP / MySQL / Apache on a Windows system, and then uploaded to a Linux / Apache server. thanks for your time!

    Read the article

  • Zend Framework Db Select Join table help

    - by tester2001
    I have this query: SELECT g.title, g.asin, g.platform_id, r.rank FROM games g INNER JOIN ranks r ON ( g.id = r.game_id ) ORDER BY r.rank DESC LIMIT 5` Now, this is my JOIN using Zend_Db_Select but it gives me array error $query = $this-select(); $query-from(array('g' = 'games'), array()); $query-join(array('r' = 'ranks'), 'g.id = r.game_id', array('g.title', 'g.asin', 'g.platform_id', 'r.rank')); $query-order('r.rank DESC'); $query-limit($top); $resultRows = $this-fetchAll($query); return $resultRows; Anyone know what I could be doing wrong? I want to get all the columns in 'games' to show and the 'rank' column in the ranks table.

    Read the article

  • servlet connection to DB

    - by underW
    Initially, after reading books on the subject, I firmly believed that the algorithm for working with a database from a servlet is as follows: create a connection - connect to the database - form a request - send the request to the database - get the query results - process them - close connection - OK. Now, with a better understanding of the practical side, I realized that nobody does it that way, and everything happens through a connection pool according to the following algorithm: initialize the servlet - create a connection pool - a request comes from a user - take a free connection from the pool - form a request - send the request to the database - get the query results - process them - return the connection back to the pool - ok. Now I have this problem: We have 100 users, they are divided into 10 groups, each group has it's own username and password to connect to the database. Moreover, each group may have different rights to the database. How am I supposed to use a connection pool in this situation? If I understand correctly, a pool is nothing more than just a group of similar connections with a single login and password. And here I have 10 pairs of username / password. It looks like I cannot use the pool in this situation. What should I do?

    Read the article

  • Berkeley DB tuple with unknown datatype

    - by Ronnie
    I'm working with a Berkeley database (in Java). I need to read a tuple where the sequence is a string, either an int or long, then another string. How can I determine if the tuple holds an int or a long? Depending on what the tuple holds, I'll do one of the following: String s1 = input.readString(); int num1 = input.readInt(); String s2= input.readString(); or String s1 = input.readString(); long num1 = input.readLong(); String s2= input.readString(); The int is 4 bytes and the long is 8 bytes. If the tuple holds an int and I read it in as a long, I get an invalid value as it converts the 4 byte int + 4 bytes of the following string into a long.

    Read the article

  • How can I restore a corrupted Shotwell db?

    - by Yann Dìnendal
    While I was importing photos from a SD card in Shotwell, my laptop has crashed (shutdown because of over-heating). Now, I can no longer launch Shotwell: $ shotwell ** ERROR:x86_64-linux-gnu/db/VersionTable.c:104:version_table_construct: assertion failed: (res == SQLITE_OK) If I move the .db file ~/.shotwell/data/photo.db elsewhere so it is no longer present (but backed-up), shotwell will launch, but will rebuild its library, which will be empty. I can re-import the folders shotwell creates, but I lose nearly all meta-data (most importantly the "folders", or events, and their main picture) Is there a way to repair/rebuild/restore photo.db? How can I see what's inside? how bad it's damaged? Or is there another way to get back my events and imports?

    Read the article

  • CDbException: CDbConnection failed to open the DB connection

    - by Vinay Rajput
    Hi I am new to ubuntu and php mysql, i have intalled xampp and learning Yii, but while testing a script i got this problem, not able to figure out the solution, i have been through many forums solutions but none of them worked for me. Please help. 1) DbTest::testConnection CDbException: CDbConnection failed to open the DB connection. /opt/lampp/htdocs/YiiRoot/framework/db/CDbConnection.php:388 /opt/lampp/htdocs/YiiRoot/framework/db/CDbConnection.php:331 /opt/lampp/htdocs/YiiRoot/framework/db/CDbConnection.php:309 /opt/lampp/htdocs/YiiRoot/framework/base/CModule.php:388 /opt/lampp/htdocs/YiiRoot/framework/base/CModule.php:104 /opt/lampp/htdocs/trackstar/protected/tests/unit/DbTest.php:6 FAILURES! Tests: 1, Assertions: 0, Errors: 1.

    Read the article

  • How to Structure a Trinary state in DB and Application

    - by ABMagil
    How should I structure, in the DB especially, but also in the application, a trinary state? For instance, I have user feedback records which need to be reviewed before they are presented to the general public. This means a feedback reviewer must see the unreviewed feedback, then approve or reject them. I can think of a couple ways to represent this: Two boolean flags: Seen/Unseen and Approved/Rejected. This is the simplest and probably the smallest database solution (presumably boolean fields are simple bits). The downside is that there are really only three states I care about (unseen/approved/rejected) and this creates four states, including one I don't care about (a record which is seen but not approved or rejected is essentially unseen). String column in the DB with constants/enum in application. Using Rating::APPROVED_STATE within the application and letting it equal whatever it wants in the DB. This is a larger column in the db and I'm concerned about doing string comparisons whenever I need these records. Perhaps mitigatable with an index? Single boolean column, but allow nulls. A true is approved, a false is rejected. A null is unseen. Not sure the pros/cons of this solution. What are the rules I should use to guide my choice? I'm already thinking in terms of DB size and the cost of finding records based on state, as well as the readability of code the ends up using this structure.

    Read the article

  • ???????/???Oracle DB??????????

    - by Yusuke.Yamamoto
    ????? ??:2011/06/29 ??:??????/?? ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? Oracle Database ?????????????????????????? ??????????Oracle DB ?????????????Oracle DB ?????????? ????????? ????????????????? http://otndnld.oracle.co.jp/ondemand/otn-seminar/movie/20110629_DataAnalysis.wmv http://www.oracle.com/technetwork/jp/ondemand/db-new/0629-1500-dataanalysis-431394-ja.pdf

    Read the article

  • ???????/???DB??????????!???????Oracle?????????????

    - by user788995
    ????? ??:2012/01/23 ??:??????/?? Oracle ?????DB??????????????11gR2 ??????????????????????????DB??????????????????????????????? Oracle Maximum Availability Architecture(MAA)???????? ?????????????????? / ????(?) ~ ?????????????????(?) ~ ??????????????????(?) ~ ?????????????????????????????????? - Flashback TechnologyOracle DB ???????????·????????? ????????? ????????????????? http://otndnld.oracle.co.jp/ondemand/otn-seminar/movie/111128_B-1_OracleMAA.wmv http://otndnld.oracle.co.jp/ondemand/otn-seminar/movie/mp4/111128_B-1_OracleMAA.mp4 http://www.oracle.com/technetwork/jp/ondemand/db-technique/b-1-oraclemaa-1448352-ja.pdf

    Read the article

  • Django + dbxml + Apache = problems. Any solutions?

    - by Jason
    I'm trying to set up a Django application using WSGI. That works fine. However, I am having some issues with part of my Django app that uses BDB XML. My Apache config is as follows: Listen 8000 WSGISocketPrefix /tmp/wsgi <VirtualHost *:8000> ServerName <server name> DocumentRoot <path to doc root> LogLevel info WSGIScriptAlias / <path to wsgi> WSGIApplicationGroup %{GLOBAL} WSGIDaemonProcess debug threads=1 WSGIProcessGroup debug </VirtualHost> However, I'm still getting the following error: DB_ENV->repmgr_stat interface requires an environment configured for the replication subsystem [error] child died with signal 11 My environment is opened as: environment = DBEnv() environment.open( <absolute db env path>, DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL, 0 ) I am using: python 2.6.2 apache 2.2 ubuntu 9.04 dbxml 2.5.13 compiled from source (so libdb-4.8, bsddb3, all that jazz) I see Apache seems to link to libdb-4.6. Is this a problem? ldd /usr/sbin/apache2 | grep libdb libdb-4.6.so => /usr/lib/libdb-4.6.so (0xb7c01000) Updated Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb5a48b90 (LWP 12700)] 0x00000000 in ?? () (gdb) thread apply all bt Thread 4 (Thread 0xb6a67b90 (LWP 12698)): #0 0xb7f11422 in __kernel_vsyscall () #1 0xb7de07b1 in select () from /lib/tls/i686/cmov/libc.so.6 #2 0xb7ea5bcf in apr_sleep () from /usr/lib/libapr-1.so.0 #3 0xb6d7afee in ?? () from /usr/lib/apache2/modules/mod_wsgi.so #4 0xb7ea38ec in ?? () from /usr/lib/libapr-1.so.0 #5 0xb7e6d4ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #6 0xb7de849e in clone () from /lib/tls/i686/cmov/libc.so.6 Thread 3 (Thread 0xb6249b90 (LWP 12699)): #0 0xb7f11422 in __kernel_vsyscall () #1 0xb7de07b1 in select () from /lib/tls/i686/cmov/libc.so.6 #2 0xb7ea5bcf in apr_sleep () from /usr/lib/libapr-1.so.0 #3 0xb6d7ab39 in ?? () from /usr/lib/apache2/modules/mod_wsgi.so #4 0xb7ea38ec in ?? () from /usr/lib/libapr-1.so.0 #5 0xb7e6d4ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #6 0xb7de849e in clone () from /lib/tls/i686/cmov/libc.so.6 Thread 2 (Thread 0xb5a48b90 (LWP 12700)): #0 0x00000000 in ?? () #1 0xb4f03b5e in DbXml::XmlManager::XmlManager () from /home/jason/dbxml-2.5.13/install/lib/libdbxml-2.5.so #2 0xb501b29b in _wrap_new_XmlManager (self=0x0, args=0xac66fcc) at dbxml_python_wrap.cpp:5183 #3 0xb6b77aed in PyCFunction_Call () from /usr/lib/libpython2.6.so.1.0 #4 0xb6b3198c in PyObject_Call () from /usr/lib/libpython2.6.so.1.0 #5 0xb6bd70b5 in PyEval_EvalFrameEx () from /usr/lib/libpython2.6.so.1.0 #6 0xb6bdb910 in PyEval_EvalCodeEx () from /usr/lib/libpython2.6.so.1.0 #7 0xb6b6187a in ?? () from /usr/lib/libpython2.6.so.1.0 #8 0xb6b3198c in PyObject_Call () from /usr/lib/libpython2.6.so.1.0 #9 0xb6b427a8 in ?? () from /usr/lib/libpython2.6.so.1.0 #10 0xb6b3198c in PyObject_Call () from /usr/lib/libpython2.6.so.1.0 #11 0xb6b9ae03 in ?? () from /usr/lib/libpython2.6.so.1.0 #12 0xb6b90f55 in ?? () from /usr/lib/libpython2.6.so.1.0 #13 0xb6b3198c in PyObject_Call () from /usr/lib/libpython2.6.so.1.0 #14 0xb6bd7618 in PyEval_EvalFrameEx () from /usr/lib/libpython2.6.so.1.0 #15 0xb6bdb910 in PyEval_EvalCodeEx () from /usr/lib/libpython2.6.so.1.0 #16 0xb6b6187a in ?? () from /usr/lib/libpython2.6.so.1.0 #17 0xb6b3198c in PyObject_Call () from /usr/lib/libpython2.6.so.1.0 #18 0xb6b427a8 in ?? () from /usr/lib/libpython2.6.so.1.0 #19 0xb6b3198c in PyObject_Call () from /usr/lib/libpython2.6.so.1.0 #20 0xb6bd3a34 in PyEval_CallObjectWithKeywords () from /usr/lib/libpython2.6.so.1.0 #21 0xb6b44a7d in PyInstance_New () from /usr/lib/libpython2.6.so.1.0 #22 0xb6b3198c in PyObject_Call () from /usr/lib/libpython2.6.so.1.0 #23 0xb6bd7618 in PyEval_EvalFrameEx () from /usr/lib/libpython2.6.so.1.0 #24 0xb6bdb910 in PyEval_EvalCodeEx () from /usr/lib/libpython2.6.so.1.0 #25 0xb6b61969 in ?? () from /usr/lib/libpython2.6.so.1.0 #26 0xb6b3198c in PyObject_Call () from /usr/lib/libpython2.6.so.1.0 #27 0xb6bd70b5 in PyEval_EvalFrameEx () from /usr/lib/libpython2.6.so.1.0 #28 0xb6bdb910 in PyEval_EvalCodeEx () from /usr/lib/libpython2.6.so.1.0 #29 0xb6b61969 in ?? () from /usr/lib/libpython2.6.so.1.0 #30 0xb6b3198c in PyObject_Call () from /usr/lib/libpython2.6.so.1.0 #31 0xb6b427a8 in ?? () from /usr/lib/libpython2.6.so.1.0 #32 0xb6b3198c in PyObject_Call () from /usr/lib/libpython2.6.so.1.0 #33 0xb6b9b483 in ?? () from /usr/lib/libpython2.6.so.1.0 #34 0xb6b3198c in PyObject_Call () from /usr/lib/libpython2.6.so.1.0 #35 0xb6bd70b5 in PyEval_EvalFrameEx () from /usr/lib/libpython2.6.so.1.0 #36 0xb6bdab4f in PyEval_EvalFrameEx () from /usr/lib/libpython2.6.so.1.0 #37 0xb6bdb910 in PyEval_EvalCodeEx () from /usr/lib/libpython2.6.so.1.0 #38 0xb6b6187a in ?? () from /usr/lib/libpython2.6.so.1.0 #39 0xb6b3198c in PyObject_Call () from /usr/lib/libpython2.6.so.1.0 #40 0xb6b427a8 in ?? () from /usr/lib/libpython2.6.so.1.0 #41 0xb6b3198c in PyObject_Call () from /usr/lib/libpython2.6.so.1.0 #42 0xb6b9b483 in ?? () from /usr/lib/libpython2.6.so.1.0 #43 0xb6b3198c in PyObject_Call () from /usr/lib/libpython2.6.so.1.0 #44 0xb6bd3a34 in PyEval_CallObjectWithKeywords () from /usr/lib/libpython2.6.so.1.0 #45 0xb6d7172d in ?? () from /usr/lib/apache2/modules/mod_wsgi.so #46 0xb6d7539f in ?? () from /usr/lib/apache2/modules/mod_wsgi.so #47 0xb6d7e1d8 in ?? () from /usr/lib/apache2/modules/mod_wsgi.so #48 0xb6d7a42c in ?? () from /usr/lib/apache2/modules/mod_wsgi.so #49 0xb6d7a8bd in ?? () from /usr/lib/apache2/modules/mod_wsgi.so #50 0xb6d7a9c5 in ?? () from /usr/lib/apache2/modules/mod_wsgi.so #51 0xb7ea38ec in ?? () from /usr/lib/libapr-1.so.0 #52 0xb7e6d4ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #53 0xb7de849e in clone () from /lib/tls/i686/cmov/libc.so.6 Thread 1 (Thread 0xb7460b00 (LWP 12697)): #0 0xb7f11422 in __kernel_vsyscall () #1 0xb7e75300 in sigwait () from /lib/tls/i686/cmov/libpthread.so.0 #2 0xb7ea3f3b in apr_signal_thread () from /usr/lib/libapr-1.so.0 #3 0xb6d7b48d in ?? () from /usr/lib/apache2/modules/mod_wsgi.so #4 0xb6d7bc98 in ?? () from /usr/lib/apache2/modules/mod_wsgi.so #5 0xb6d79632 in ?? () from /usr/lib/apache2/modules/mod_wsgi.so #6 0xb7e9a2c9 in apr_proc_other_child_alert () from /usr/lib/libapr-1.so.0 #7 0x08092202 in ap_mpm_run () #8 0x080673c8 in main () #0 0x00000000 in ?? ()

    Read the article

  • Zend Framework: How to include an OR statement in an SQL fetchAll()

    - by Scoobler
    I am trying to build the following SQL statement: SELECT users_table.*, users_data.first_name, users_data.last_name FROM users_table INNER JOIN users_data ON users_table.id = user_id WHERE (users_table.username LIKE '%sc%') OR (users_data.first_name LIKE '%sc%') OR (users_data.last_name LIKE '%sc%') I have the following code at the moment: public function findAllUsersLike($like) { $select = $this-select(Zend_Db_Table::SELECT_WITH_FROM_PART)-setIntegrityCheck(false); $select-where('users_table.username LIKE ?', '%'.$like.'%'); $select-where('users_data.first_name LIKE ?', '%'.$like.'%'); $select-where('users_data.last_name LIKE ?', '%'.$like.'%'); $select-join('users_data', 'users_table.id = user_id', array('first_name', 'last_name')); return $this-fetchAll($select); } This is close, but not right as it uses AND to add the extra WHERE statements, instead of OR. Is there any way to do this as one select? Or should I perform 3 selects and combine the results (alot more overhead?)? P.S. The parameter $like that is past is sanitized so don't need to wory about user input in the code above!

    Read the article

  • One-to-many relationship in the same table in zend

    - by Behrang
    I have groupTable(group_id,group_name,group_date,group_parent_id) in face each group have many group child I create groupModel and I want to begin coding is this right code to handle protected $_name = 'group'; protected $_dependentTables = array('Model_group'); protected $_referenceMap = array('Model_group' = array('columns' = array('group_parent_id') , 'refTableClass' = 'Model_group' , 'refColumns' = array('group_id') , 'onDelete' = self::CASCADE , 'onUpdate' = self::RESTRICT) );

    Read the article

  • How do I add complex where clause to Zend Table Select?

    - by AD
    I searched the Web and could not find anything that would show me a good solid example. My question is basically this: How do I convert this: SELECT * FROM table WHERE ((a = 1 AND b = 2) OR (c = 3 OR c = 4)) AND d = 5; To Zend syntax similar to this: $this -select() -from($this-_schema.'.'.$this-_name) -where('a = ?', '1'); So how can it be done? Thank a lot in advance.

    Read the article

  • Getting the last User ID in Zend Framework

    - by Ryan Murphy
    Using MySQL query browser, I manually made a table called users and input some date in the fields. I set the primary key to id and set it to auto increment. There are 3 rows, the highest id is 3. I then made the following class in the method directory to call upon the data in the table etc. class Application_Model_DbTable_User extends Zend_Db_Table_Abstract { protected $_name = 'user'; public function getLatestUserId() { $id = $this->getAdapter()->lastInsertId(); return $id; } } In the controller I do the following which gets the value generated by the method and lets the view access it: $usersDbModel = new Application_Model_DbTable_User(); $lastUserId = $usersDbModel->getLatestUserId(); $this->view->lastUserId = $lastUserId; In the view I then echo it to display it to the user: echo $this->lastUserId; However, even though my last id in the users table is 3. It displays 0. I have also tried: public function getLatestUserId() { $sql = 'SELECT max(id) FROM user'; $query = $this->query($sql); $result = $query->fetchAll(); return $result; } But this just throws out a server error. What have I done wrong? Am I missing something? Is there another way of doing this?

    Read the article

  • Zend_Db_Select where() and Zend_Db_Adapter quoteInto()

    - by Chris
    Are Zend_Db_Select's where() method, when including the optional value to quite into, and Zend_Db_Adapte's quoteInto() methods basically the same as far as escaping SQL? In other words, are these two pieces of quote identical and equally secure? $select->where($this->getAdapter()->quoteInto('id = ?', 3)); $select->where(id = ?, 3); Thanks!

    Read the article

  • Why does Dropbox fail with a "dropboxd not found" error?

    - by Kevin
    This is a fresh install of Dropbox on a 12.04 server running on a 32bit system. It does not seem to fail the installation, but when I try to run it, I am told it can't find the file. Following the instructions on the Dropbox site, I get the following message: /home/kevin/.dropbox-dist/dropboxd: 10: exec: /home/kevin/.dropbox-dist/dropbox: not found Permissions currently being used: $ ls -l ~/.dropbox-dist/dropboxd -rwxrwxrwx 1 kevin kevin 258 Jun 13 20:40 /home/kevin/.dropbox-dist/dropboxd Has anyone had this problem and know a work around?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >