Browse by Tags

All Tags » RDBMS (RSS)

Should I cache the java.sql.DataSource?

Yes! While trying to brush up and plain Servlets and JSP, I was trying to improve on architecture and I happen to read the MySQL connector/J documentation. I was wondering if I should cache the DataSource or just create a call to JNDI everytime I invoke...
Posted by lamia | with no comments
Filed under: , ,

How do I DisCOUNT that Row?

SQL has always been my weakest point as a developer. So in times like this, I usually resort to application-level solutions. This is the magic of doing pet-projects, you get to work on your weak points. PROBLEM: The COUNT(*) function was return 1 on zero...
Posted by lamia | 2 comment(s)
Filed under:

Strip that hour, minute, second part out of my Date field in Oracle

I was trying to get a set of records in oracle with a certain date interval. I wanted to make sure that I only get the month, day and year part. Good thing I had an oracle guru officatemate and told me that the TRUNC function strips out the hour, minute...
Posted by lamia | 2 comment(s)
Filed under:

Passing an Array in a PL/SQL Function/Procedure

Note: The code provided will not compile. It should only serve as a guide! We had a performance issue and one of the solutions I came to to prevent excessive rountrip from my Java application to the database is to pass the things I need as an array to...
Posted by lamia | with no comments
Filed under:

Exception handling in PL/SQL

Note: I'm doing this code inside a Package. I've never written an PL/SQL program outside of a Package. You can declare exception everywhere inside a PL/SQL Stored Procedure or Function. PROCEDURE MY_PROC(V_ARG_SOMETHING IN MY_TBL.MY_FIELD%TYPE...
Posted by lamia | with no comments
Filed under:

My PL/SQL Experience

I've been doing quite a lot of PL/SQL lately. It's funny because I was able to utilize the stored procedures more in Oracle although the product I was able to code my first stored procedure in was SQL Server 2000. Not that I did not do any stored...
Posted by lamia | 1 comment(s)
Filed under: ,

Oracle SQLDeveloper

I've been fiddling with Oracle SQLDeveloper lately. What I liked about it is that it's free and second, it's an alternantive to M$ SQLServer. I think you could even use it for other RDBMS other than Oracle like MySQL and SQLServer. It's...
Posted by lamia | 3 comment(s)
Filed under:

Levels of Data Normalization

I've been thinking my whole career through what the Levels of Data Normalization means. I know I've been doing it, but I didn't know on which level I am at during this process. I had a discussion with an office colleague and he told me to...
Posted by lamia | 6 comment(s)
Filed under:

I had a talk with the most silent person in our team...

I just had a talk with one of our senior .Net developers. I asked him if he know about Execution Plan and Indexing in Database. Hmmm... I was shown a diagram in SQLServer which apparently computes the cost of each query in percentage. I guess query optimization...
Posted by lamia | 2 comment(s)
Filed under:

Database Execution Plan and Database Indexing - Two things your mama probably didn't tell you

Truly, in life... There is no shortcut. And the same rule applies to me. I just came from a very exhausting interview today and I was asked about several things about Java technology tools which I don't have experience with and SQL Performance Tuning...
Posted by lamia | 6 comment(s)
Filed under: ,

Back to basics - SQL Wild Cards

It's funny how the simplest of things could actually fool you. If you want to search for a particular String, let's say "Lamia", but you don't know if that name actually has some trailing numbers or something. You just know that...
Posted by lamia | 3 comment(s)
Filed under:

SQLServer 2000 Problem: The account name is invalid or does not exist

I just got in the office and turned on my computer when I noticed that I didn't have an internet connection. Now, I didn't notice if my SQLServer was already up and running that time. I changed from my current DNS to another DNS including my Alternative...
Posted by lamia | with no comments
Filed under:

SQLServer 2005, jTDS and Netbeans

The thing I hate about SQLServer is that it gives me too much headache whenever I use it with Java. Since I already had share of of those from my last company, I already had some precautions. Use jtds driver Enable TCP/IP on default port 1433 For SQLServer...
Posted by lamia | 2 comment(s)
Filed under: , ,

Redirect operator in MySQL causes error in Java

I was instructed to convert a PHP script that executes a shell command(mysqldump command) to Java. There were various resource available and executing the mysqldump command was a peice of cake. However, I wasn't getting the output that I expect. The output...
Posted by lamia | 2 comment(s)
Filed under: ,

Database-driven policy feature

I still remember back then when I was working as a trainee in one of my former companies. My boss gave a requirement wherein a user will only have specific areas of the application(this is a webapp) which he can gain access. I have to admit that it was...
Posted by lamia | with no comments
Filed under:
More Posts Next page »