database

Should DateTime be stored in UTC or local time(of server) in a website that is accessible all over the world. what is the pros and cons of each approach.

Please kindly explain what is the impact of the system like shopping cart in which one customer(buyer) sits in one timezone and the other(seller) is on other timezone and the date is changed at one end. so the report data for one customer who bought is different than the other. ...

What are the advantages and disadvantages of using Database over plain files?

Hi, i couldn't find the advantages and disadvantages would you please help me? thanks. ...

Sql returning 3 million records and JVM outofmemory Exception

I am connecting oracle db thru java program. The problem is i am getting Outofmemeory exception because the sql is returning 3 million records. I cannot increase the JVM heapsize for some reason. What is the best solution to solve this? Is the only option is to run the sql with LIMIT? ...

Does Anyone Use Address Line 2

So it's a standard in basically every address form out there and I'm questioning why? Address Line 2. It's in every form that asks for address details. It's never actually seemed necessary to me. It requires another field in the database and all the goofy maintenance that goes with it. Every time you use an address, you have to concaten...

Can this MySQL db be improved or is it good as it is?

In a classifieds website, you have several categories (cars, mc, houses etc). For every category chosen, a hidden div becomes visible and shows additional options the user may specify if he/she wishes. I am creating a db now, and I have read some articles about normalization and making it optimized etc... Here is my layup today CATEGO...

Is a Transaction active when a IBQuery component is active

When opening a TIBQuery (IBQuery.Open), is the correspondig Transaction active only the time the data is fetched from the DB or as long as IBQuery is closed? ...

How do I search for names starting wih A in MySQL?

hi, I have a question that how can we use SELECT for searching the name which start with 'A' in MySQL table? thanks ...

how we use BigInt ?

Hi, this is my code but it givas an error would you please help me(in mySQL I have a table that has VARCHAR name ,VARCHAR address and VARCHAR telephone and TINYINT age and BIGINT charge) I want to insert a name and address and telephone and age with calling this method .but it will give an error for line insertARow("Adam Smit","21 First...

Wrong number of database records is output by a Java program

Hi, I have a table in mySQL and has 3 line which has name ,address,Telephone,Age,Charge. in two of them the names are "Adam" and the last row is "Abas" ,i don't know that why it prints in the console like this,please help me thanks! Statement s; int s4,s5;String s1,s2,s3; List<InfoClass> clientList = null; try { ...

Alternatives to Northwind

Well, what alternative sample databases exist that have: an un-restrictive license loads of sample data lots of data types a simple mechanism for adding the database to a db server are not Northwind I'm not too fussed what server type (MSSQL, SQLite, MySQL, etc.) the db is designed for. ...

MySQL linking tables; some final issues

Firstly I want to thank all of you who have helped me understand Normalization and how I should build up my database. Now, I have some final issues left... How does LINKING of tables actually work? Say you have three tables: CATEGORY TABLE: cat_id (PK) -> 1 cat_name -> cars CATEGORY_OPTIONS TABLE: cat_opt_id (FK) -> 1 cat_id (FK) ->...

system for absences

I would like to know what should be a good option to implement a system like that: The system will be use by teachers in a school. They can login and see a list of the pupils that they have in the current class/subject. In this list they could mark the pupils that are not attending the class, and some other options... The system shoul...

Experience with IBPP interface for Firebird database

I'd like to the ask guys with experience in Firebird and IBPP (especially the latter). I found a lot of positive posts about Firebird but I'm having a problem to decide about IBPP. The interface itself is clean and simple but it seems that the project does not have much of activity going on (maybe because it's very stable). Would you r...

Is it possible to hide sensitive data from Oracle DBAs?

I would like to know if there is a way to hide sensitive information (assume data that could be used for insider trading, for instance) from DBAs in an Oracle 10g environment. Is Oracle Database Vault the right tool for the job, or is there something else I should be looking at? ...

@GeneratedValue(strategy = GenerationType.SEQUENCE) and startVaule

when using the @GeneratedValue Annotation in Hibernate, and adding a new Entity to DB it has the id 1 ... n . Is is it possible to set the first value, so it would get the id e.g. 10000 ... n ? ...

Ordering by the first alphabetical char in a column in MYSQL

A table in a MYSQL database has address details- eg... add1, add2, add3, district, postalTown, country Ordering by postal town is usually fine, but some details have numbers in the postalTown column. For example 1420 Territet or 3100 Overijse. This will mean these will appear at the top above Aberdeen or Bristol. Is there a way of order...

Reducing the recordset where a particular field has similar data. (MySQL)

I have two tables, 'discussion' and 'discussion_responses'. A unique ID from 'discussion' is used in 'discussion_responses' to identify the response to the original post in a forum. I created the following query to extract the posts that have NEW replies, but are NOT linked to new topics. Both tables have a field for the date added and '...

MS Visio Category relationships to SQL Server

I'm using MS Visio to model a database and part of the model contains Transaction categories - the parent table has a transactionId, timestamp, amount, and transactionType. There are three child tables - cheque, bank transfer, and credit card, all related to the parent by transactionId. Is there a specific way this kind of relationship...

Can anyone please explain "storing" vs "indexing" in databases?

What is storing and what is indexing a field when it comes to searching? Specifically I am talking about MySQL or SOLR. Is there any thorough article about this, I have made some searches without luck! Thanks ...

c3p0 Connection Checkin

I'm trying to implement a solution with c3p0 for the first time. I understand how to initialize the connection pool and "checkout" a Connection from the pool as follows: ComboPooledDataSource cpds = new ComboPooledDataSource(); cpds.setDriverClass(driverClass); cpds.setJdbcUrl(url); cpds.setUser(username); cpds.setPassword(password); Co...