database

Single Large v/s Multiple Small MySQL tables for storing Options

Hi there, I'm aware of several question on this forum relating to this. But I'm not talking about splitting tables for the same entity (like user for example) Suppose I have a huge options table that stores list options like Gender, Marital Status, and many more domain specific groups with same structure. I plan to capture in a OPTIONS ...

MySQL best usage in Tomcat?

Which one is better way of using MySQL in Tomcat : A) assign a DB connection for user as long as it's session is valid. [OR] B) open connection to DB, on every request come to server and when it's done close that. C) Connection pool. [BEST answer] ...

Best way to Store Passwords, User information/Profile data and Photo/Video albums for a social website?

Need some help figuring out how to best Store Passwords, User information/Profile data and Photo/Video albums for a social website? For photos/videos the actual photo/video + even encrypting the URL with the IDs to the photo/videos so other users cannot figure it out. Creating a site like myspace and designing retirement documents but i ...

How turn text links into HTML links at the client side with javascript

In my db I have saved every links in the form: www.example.com or http://www.example.com Is there a way to turn this text links into HTML links at the client side ( e.g. javascript ) with tag and parameter like this ?: <a href="http://www.example.com" rel="nofollow">www.example.com</a> ...

Update String Columns without Using Single Quotations - General Question

UPDATE CustomerPhone SET PhoneTypeID = 7, PhoneNumber = 999-444 WHERE CustomerID = 500 AND PhoneNumber = 9-1-1; PhoneNumber is of type varchar(20) whereas PhoneTypeID and CustomerID are of type int. I'm running the above statement in SQL Server, it works fine. I wonder how come it works? I thought any string value has to be put betwe...

How to prevent updating duplicate rows in SQLite Database?

I'm inserting new rows into a SQLite table, but I don't want to insert duplicate rows. I also don't want to specify every column in the database if possible. I don't even know if this is possible. I should be able to take my values and create a new row with them, but if they duplicate another row they should either overwrite the existi...

How to find out if a Java ResultSet obtained is empty?

Class.forName("org.sqlite.JDBC"); Connection conn = DriverManager.getConnection("jdbc:sqlite:userdata.db"); Statement stat = conn.createStatement(); ResultSet rs = stat.executeQuery("SELECT * from table WHERE is_query_processed = 0;"); int rowcount = rs.getRow(); System.out.println("Row count = "+rowcount); // output 1 rs.first()...

PhpMyAdmin; Should I disable root login?

I have this setup in Phpmyadmin: USER HOST PASSW PRIVILEGES GRANT debian-sys-maint localhost Yes ALL PRIVILEGES YES phpmyadmin localhost Yes USAGE NO root 127.0.0.1 Yes ALL PRIVILEGES YES root...

cms with remote database: performance issues

my problem's a bit complicated. basically i created a client/server CMS architecture that worked very well for a while. now that there are more customers, it's getting very slow and i don't really know how to fix it. let me explain you the current architecture: i've developed a content management system to serve various different custom...

I have a 18MB MySQL table backup. How can I restore such a large SQL file?

I use a Wordpress plugin called 'Shopp'. It stores product images in the database rather than the filesystem as standard, I didn't think anything of this until now. I have to move server, and so I made a backup, but restoring the backup is proving a horrible task. I need to restore one table called wp_shopp_assets which is 18MB. Any ad...

How do I populate a MEF plugin with data that is not hard coded into the assembly?

I am working on a program that will communicate with various pieces of hardware. Because of the varied nature of the items it communicates and controls, I need to have a different "driver" for each different piece of hardware. This made me think that MEF would be a great way to make those drivers as plugins that can be added even after...

0.00 decimal fields in MySQL database giving empty value when in a PHP array

The fields read as 0.00 in phpMyAdmin, but when put into an array, the value is blank, is there a way to get it to show just '0'? From my Model: $query = $this->db->query("SELECT t1.numberofbets, t1.profit, t2.seven_profit, t3.28profit, user.user_id, username, PASSWORD , email, balance, user.date_added, activation_code, activated FROM...

Deploying ASP.Net MVC application

I've recently reached the stage where an ASP.net MVC application I am developing is ready to be deployed to the production server. I've worked out how to publish the application - I've got all the files on the server, and can access them over the internet. However, I can't work out how to deploy my database. The server has the SQL Ser...

Storing i18n data in a database using XML

Hello, I may have to store some i18n-ed data in my database using XML if I don't fight back. That's not my choice, but it's in the specifications I have to follow. We would have, by example, something like following in a 'Country' column: <lang='fr'>Etats-Unis</lang> <lang='en'>United States</lang> This would apply to many columns in...

How to implement geo-based data store and computation?

Well, let me explain this briefly: 1.I want to build a website that provides location based services, like http://fireeagle.yahoo.net/ . 2.I guess most of these services have something do with longitude and latitude. 3.Is there any particular database/datastore/data structures fit well for such apps? I mean easy to store longitude, la...

Question about using an access database as a resource file in Visual Studio.

Hi I am trying to embed a Microsoft Access database file into my Class assembly DLL. I want my code to reference the resource file and use it with a ADODB.Connection object. Any body know a simpler way, or an easier way? Or what is wrong with my code, when i added the resource file it added me dataset definitions, but i have no idea what...

Define tables from a part of my ER Diagram.

I have a ER-Diagram (Show in http://www.4freeimagehost.com/show.php?i=f82997ca4d5d.png). In the diagram you see 2 entities and a 1:N relataion together. Project has 2 columns as ProjectID, ProjectName. Employee has 3 colums as EmployeeID, EmployeeName and ProjectID. A project has ONLY 1 project-manager and project-manager is a employee. ...

Access Database Integration with website

I'd like to have my website be automatically and continuously updated with information from an access database, but I'm not sure how to do so? Any suggestions? ...

Using Hidden Iframes to run PHP scripts - good? bad? opinions?

I am a little bit new to the PHP/MYSQL arena, and had an idea to be able to interact with my Database by using a hidden Iframe to run PHP pages in the background(iframe) on events without having to leave the current page? Good? Bad? Common Practice? Opinions? ...

PHPpgAdmin: How delete rows without using SQL

In PHPmyAdmin I can delete rows without using SQL. Is there a way to do this in PHPpgAdmin ? ...