Relative Content

Tag Archive for database

Why shouldn’t you use JDBC in Java applets?

I’ve heard people saying usage of JDBC (Java Database Connectivity) isn’t recommended in Java applets. All I they say is: ‘because of the security reasons’. What ‘security reasons’ do they mean? What would a potentially ‘bad person’ do when he/she found out about JDBC used in an applet, placed somewhere on a website?
To make one’s applet safe, it is wise to place a servlet between an applet and a database. I believe most programmers do it, I would like to know why.

Scalability: How does splitting a database table work on different replicated SQL Servers?

I would like to know more about the general concepts behind dividing data of a database into different servers. For example, suppose I have a SQL Server database which has a massive table. Assume one single server cannot handle the amount of data in this table. I would like to break that table down and split its contents among different servers with an identical database (replicated).

Do I really want a dynamic Enum, or something else? Better caching? A Struct?

This question is asked on SO and this site often it looks like. “How do I do a dynamic enum?” Answers range from you shouldn’t to possible compile time solutions. Now my question is do I want a dynamic enum that is generated from look up tables in the DB, or do I want something else that is similar?

Why is NoSQL better for this scenario?

Hypothetical scenario: Let’s say we are downloading JSON from Facebook with details of a user’s friend’s checkins, posts, etc… These come in as one document per friend per activity, so with 8 activities a user with 300 friends will cause our system to make 2400 requests to Facebook, downloading 2400 JSON documents.

In agile development, should I try persistence in flat file before database?

Somebody explained to me that since in agile development, policy and the application logic should be more important than details such as persistence method, persistence decision should be taken at the end. So it might be a good idea to start with simpler persistence such as flat files, until we reach the point the weakness of this method become apparent, and only then we change the persistence, e.g. by using relational database.

Senior team members want to move query-relevant persistent data from DB to cache. Does this make sense?

I am a young engineer recently employed at a small company that sells products to the general public. We use Ruby On Rails and MySQL. Our database has a lot of customer data, but a great deal more of “static” persistent data. This data is so rarely changed that some of the more senior engineers have begun to talk about moving it to a cache data store. One of the touted benefits of this plan is that it would make deployments easier, since we would no longer have to bootstrap the database; instead, a lot of data would have permanent IDs, and we could just backup the cache and deploy the backup.