database

how to create sql database connectivty in cocoa???

Hiii, I am creating a preference Panes (in system preferences).I want to fetch data from sql database.....HOw do i do that??? plz tell the code for basic sql database connectivity in cocoa... ...

Is it a bad idea to make a generic link table?

Imagine a meta database with a high degree of normalization. It would blow up this input field if I would attempt to describe it here. But imagine, every relationship through the entire database, through all tables, go through one single table called link. It has got these fields: master_class_id, master_attr_id, master_obj_id, class_id2...

create a database with scala/lift and a simple interface to log in

Hi, I'm a beginner with scala/lift and POO. At first, i would like to create a database and a simple interface to log in (ID and password). Then create an application to allow the user to modify this database. My problem is: i didn't find anything (like a tutorial) to do something like that. Maybe somebody could help? ...

If my entity has a (0-1):1 relation to another entity, how would I model that in the database?

For example, lets say I have an entity called user and an entity called profile_picture. A user may have none or one profile picture. So I thought, I would just create a table called "user" with this fields: user: user_id, profile_picture_id (I left all other attributes like name, email, etc. away, to simplify this) Ok, so if an user ...

Put a function in an XML field

Is it possible to put a function in an XML field? For example i have the following xml file: <?xml version="1.0" encoding="utf-8" ?> <prova> <prova> <continente>Europa</continente> <stato>Italia</stato> <societa>SSC Napoli</societa> <actual>1.09769</actual> <estimate>0.447969</estimate> </prova> <prova> .... </prova> </prova> I...

What kind of different relationships do I have to think about?

I'm sure that I missed something, and that I've got something plain wrong. 1:(0-1) (one to zero or one) 1:1 (one to one) 1:(0-n) (one to zero, one or many) (0-m):(0-n) (zero, one or many to zero, one or many) m:n (many to many) m:1 (many to one) m:(0-1) (many to zero or one, i.e. 10 people share one meeting room) Constrained Rela...

Servlet - how to download multiples files from database

I look around and it seems that zipping all the files together is the way to go. If that the case this is the design I am thinking of doing. Please let me know if there is more efficient way of doing this Client select multiples file of downloading, then click Download servlet receive the requests, then do multiple SELECT (files are sa...

Best practices writing unit tests with NHibernate

I'm new to NHibernate (+Fluent), and I can't decide on what's the best strategy when it comes to structuring my code to make it testable. I have a plain structure including a domain model, mappings to map the model to database, and a few classes with behavior which will work towards the model classes and do transactions for updating and ...

Does Google Webapp framework for Google App Engine maintain a link to the database?

1) When a script gets data from the database using the db.Model.get_element_by_id("id") method, what id does it refer to, and how can you get it from the database. 2) If you get a result using this method, does that result maintain a link to the database so that any changes to the result are reflected on the database? If not, how would y...

ASP.NET Oracle Query

What code would put the results of the query (or any query) into an HTML table? ReadOnly QUERY As String = "SELECT * FROM DUAL" Public Sub page_load() Dim myConn As New OracleConnection( _ ConfigurationManager.ConnectionStrings("DB").ConnectionString) myConn.Open() Dim myCommand As New OracleCommand(QUERY, myConn) ...

Use case of DB design

Hello Merry Christmas and happy new year to all. I wondered if there is any site out there with some detailed examples of normalization and DB design in general.Any comments are welcome.Thanks for your time. ...

Value from last inserted row in DB

Is there some way to get a value from the last inserted row? I am inserting a row where the PK will automatically increase due to sequence created, and I would like to get this sequence number. Only the PK is guaranteed to be unique in the table. I am using Java with a JDBC and Oracle. I forgot to add that I would like to retrieve thi...

Securing tables vs databases on a mutitool web site with confidential information

I am working on a site that multiple projects will be using to enter confidential subject information for various research projects. Project data access will be limited to specific users and tools. But certain core data will be referenced in and joined to the project tables (username, project meta-data, etc). The current plan is that ...

Inserting CLOB data with ANT

Hello, I am trying to use Ant to initialize my Oracle database by using Ant. I followed this guide: http://www.roseindia.net/tutorials/ant/AntScripttoInsertDatainMysqlTable.shtml and that works but I was wondering if anyone knows how to insert CLOB data into Oracle tables using Ant. Thanks in advance. ...

Database Schema Diagram From SQL Server

Is Visio the only way here?? I saw another stackoverflow question about this http://stackoverflow.com/questions/30474/database-schema-diagram-design-tool And whilst Sql Designer is nice I dont want to draw all the tables by hand - Is there any way to short circut this and upload SQL DDL and it generates the tables in a diagram?? ...

MySQL UPDATE statement batching to avoid massive TRX sizes

I am often writing datascrubs that update millions of rows of data. The data resides in a 24x7x365 OLTP MySQL database using InnoDB. The updates may scrub every row of the table (in which the DB ends up acquiring a table-level lock) or may just be scrubbing 10% of the rows in a table (which could still be in the millions). To avoid ...

How to load a one-to-many relationship in Data Mapper?

While I'll go for the Ghost pattern in a 1:1 relationship, I'm not sure if this is sufficient in a 1:n relationship. For example, when I load an Order object that may have a hundred Item objects, I would first assign NULL to the items property. The question is: A) Should I assign NULL and then, upon first access of the items property...

Parsing UPS Worldship shipping zone dat file

For licensing reasons, our shipping product tries to obtain UPS rate information without using the API. Most of this is reasonably straight-forward, but obtaining a complete set of zipcode-to-zipcode postal zones is a large hassle. We're looking at the Worldship databases (with UPS's permission, but not support) for rate infromation, an...

Rails - I need a checkbox to change a field in the DB

I know I have done this before, but for the life of me I can't figure it out. I have a table with a "called" field in it. I need to use a checkbox to update the db and check if "called" is "true" or not. Doesn't need to be AJAX, just needs to update the field. table: rsvp field: called Thanks a ton. ...

Looking for free GUI tool to work with PostgreSQL

Currently, I am using standalone GUI tool DbSchema to design my database schema. I like it because it can Generate SQL code. Have graphing view on my entire database schema. However, I realize the SQL code generate by DbSchema is not being recognized by PostgreSQL. CREATE TABLE lot ( lot_id serial AUTO_INCREMENT NOT NULL,...