Wed Jan 30 09:24:04 GMT 2008
From
/weblog/database/vendor
After default install of oracle at win32, here is the step of creating user:
1) sqlplus /noloh (enter sqlplus shell without login)
2) connect oracle/oracle as sysdba (super user connection)
3) CREATE USER CITY IDENTIFIED BY city DEFAULT TABLESPACE "USERS" TEMPORARY TABLESPACE "TEMP" PROFILE DEFAULT ACCOUNT UNLOCK;
4) GRANT "CONNECT" TO CITY;
5) GRANT "RESOURCE" TO CITY;
grant dba to CITY;
-- Grant/Revoke system privileges
grant create view to CITY;
grant unlimited tablespace to CITY;
imp CITY/city full=y file=c:\xxxxx.dmp
6) sqlplus city (try login)
About create table space
create tablespace TBL01 datafile 'H:\oracle\oradata\ora9\TBL01.dbf' size 50M extent management local segment space management auto;
Other useful views
1) sys.dba_tablespaces;
2) sys.dba_users
3) v$database
4) dba_data_files
5) v$datafile
Start and stop oracle batch
net start OracleCSService
net start OracleDBConsole[db name]
net start OracleOraDb10g_home1iSQL*Plus
net start OracleOraDb10g_home1TNSListener
net start OracleService[db name]
net stop OracleCSService
net stop OracleDBConsole[db name]
net stop OracleOraDb10g_home1iSQL*Plus
net stop OracleOraDb10g_home1TNSListener
net stop OracleService[db name]
An useful link:
http://agents.csie.ntu.edu.tw/Projects/VF/docs/use_oracle.txt How to install oracle in Redhat 9 -
http://www.linuxdevcenter.com/lpt/a/4141 Check store procedure issues: select * from user_errors
If there is join like a.column1 = b.column2, and column1 in DATE datatype while column2 is VARCHAR2 datatype, oracle will auto-cast it in JDeveloper, but always return false if I call that stored procedure using JDBC.
Show plsql function detail implementation: select text from user_source where name = MY_PROCEDURE order by line; -
http://forums.oracle.com/forums/thread.jspa?threadID=515948 It is possible to get NullPointerException from oracle driver with IBM JDK... it look like IBM issue -
http://www.ibm.com[..]s/forums/message.jspa?messageID=13980641 plsql result caching -
http://gojko.net[..]ed-up-database-code-with-result-caching/ Oracle date foramt -
http://www.oradev.com/oracle_date_format.jsp
(google search)
(amazon search)
Wed Nov 14 11:05:19 GMT 2007
From
/weblog/database
An arguement of use / not use RDBMS
http://www.cincomsmalltalk.com[..]gView?showComments=true&entry=3366636502 .
Hsql is a very nice tool for development: fast, support most sql standard, easy to setup. In addition, there is a one really nice feature. It will store the INSERT, UPDATE and DELETE statement in a script file to persist the database status. This make debug a lot simpler. Highly recommend!
http://hsqldb.sourceforge.net/ Besides, a nice introduction of SQLite and Java Berkeley DB -
http://www-900.ibm.com[..]operWorks/cn/java/l-embed-db/index.shtml A solution of close don't commit data to disk:
http://blog.taragana.com[..]ion-close-doesnt-write-to-disk-solution/ but for me this is feature than bug, as I can easily keep my data back to the copy I want.
A document base DB, it is not hold a table ( or relation ) , it hold a Document , what I understand it is a map -
http://www.couchdbwiki.com/index.php?title=Main_Page
(google search)
(amazon search)
Mon Oct 15 11:32:55 GMT 2007
From
/weblog/database/sql
A nice article about standard ANSI joining syntax:
http://www.oracle.com/technology/oramag/oracle/01-nov/o61sql.html Recognizing well known patterns involving outer joins will form a ground-level vocabulary for your further explorations of your data. This article examined syntax, surprises, and rules of thumb with respect to the usage of joins.
http://www.onjava.com/lpt/a/4443 A blog with nice graphic show how join work -
http://www.codinghorror.com/blog/archives/000976.html
(google search)
(amazon search)
Tue Apr 10 16:51:38 GMT 2007
From
/weblog/database
The one I long for is the SQL Exception Handling Enhancements, look like I don't need to issue an select everytime before insert or delete to prevent SQL exception from duplicate record or foreign key constraint
However, not sure why we need Annotation-Based SQL Queries, better than putting SQL as String?
http://www.artima.com/lejava/articles/jdbc_fourP.html http://java.sys-con.com/read/111252_p.htm http://javaswamy.blogspot.com/2006/08/jdbc-40-resources.html http://www.javaspecialists.co.za/archive/newsletter.do?issue=138 http://today.java.net[..]day/2007/04/10/whats-new-in-jdbc-40.html
(google search)
(amazon search)
Fri Mar 30 11:22:20 GMT 2007
From
/weblog/database/transaction
Improve scalability via turn off transaction... do you think it will work?
http://martinfowler.com/bliki/Transactionless.html I think this Idempotency help a lot if we like to implement system in this way:
http://www.artima.com/intv/distribP.html or example is soft update
http://www.mckusick.com/softdep/ Follow up discussion -
http://www.artima.com/forums/flat.jsp?forum=276&thread=200350 Already get two comments from friends, there is the key points:
=== Rob
Not if everything works as intended. But if something goes wrong you might get an unexpected state in the database. Then you have to do more work in other places to deal with the fact that the database might be in a state that wasn't intended, but is theoretically possible because you didn't use transactions.
=== Rex
Rex: exactly the thing what i did in last year to boost up performance from 700 txn per second to more than 10K txn per second.
Carfield Yim: handle rollback yourself you mean?
Rex:
u've to understand what is a system before talking the details...
different application can apply different rollback.
online/batch different are different.
Rule 1. make your txn simple.
if it can't be simple, your design must have problem
u have to understand your capacity & limitation..... such article is meaningless if you have no actual requirement...
if client is requiring 500 txn, that's no pt to have it like that.
(google search)
(amazon search)
Thu Oct 12 09:33:03 GMT 2006
From
/weblog/database/objective
Transparent Persistence is a marketing term (that means "lie"), it isn't. However, because you need to spend far less effort on persistence you tend to really want it to be true, and code as if it is.
...
Probably, what we all need to do, is to remove the word "transparent" from "transparent o/r mapping" and admit that it is simply a high level tool, be up front about the design considerations, and talk a lot more about how to design applications using these tools rather than what the tools can do.
http://kasparov.skife.org/blog/src/objects-wars-tb.writeback
(google search)
(amazon search)
Wed Jun 07 08:40:48 GMT 2006
From
/weblog/database
Do not use ORDER BY if the query has a DISTINCT or GROUP BY on the same set of terms, because they have the side effect of ordering rows
http://archives.postgresql.org/pgsql-general/2004-12/msg01340.php
(google search)
(amazon search)
Mon Nov 28 09:33:19 GMT 2005
From
/weblog/database
Interview Hibernate creator, a nice reading
JPT: Have your original ideas about O/R mapping changed much since you embarked on this project?
Gavin King: I went into this knowing very little about ORM, and even very little about databases. One of my first tasks was to go out and buy a book to learn SQL properly. All my understanding of the problem comes from what our users have taught us over the last two years.
http://www.javaperformancetuning.com/news/interview041.shtml
(google search)
(amazon search)
Wed Oct 26 09:11:22 GMT 2005
From
/weblog/database
Discuss about ehcache, I think this is a nice discussion about possible issue of disk base caching (e.g.: persist generated HTML at disk so that don't need to waste time to generate HTML again and again)
http://twasink.net/blog/archives/2005/10/ehcache_dissect_1.html
(google search)
(amazon search)
Mon Oct 24 10:16:27 GMT 2005
From
/weblog/database
Just know that calling Connection.close() can result in either commit or rollback. It depend DBMS only
http://blog.hibernate.org/cgi-bin/blosxom.cgi/2005/10/19
(google search)
(amazon search)