Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » Database Scheme(*.sch): Can two tables share a field with the same field name?
Database Scheme(*.sch): Can two tables share a field with the same field name? [message #23450] Tue, 20 October 2009 21:14 Go to previous message
Lance is currently offline  Lance
Messages: 526
Registered: March 2007
Contributor
DBMS is PostgreSQL.

db.sch
TABLE_(t_transaction)
  SERIAL_  (transaction_id) PRIMARY_KEY
  DATE_  (transaction_date)
  STRING_  (transaction_description, 200)
  INT_	(transaction_status)
  STRING_ (transaction_no, 10)
END_TABLE

 
TABLE_(t_entry)
  SERIAL_  (entry_id) PRIMARY_KEY
  INT_ (transaction_id) //REFERENCES_(t_transaction)
  BOOL_  (doc)
  INT_  (account_id)
  DOUBLE_ (amount)
END_TABLE


the INT_ (transaction_id) in the t_entry TABLE_ will make the program fail to compile. Do I need to put it to a separate *.sch files?

From reference/examples shipped with Upp, I know the PRIMARY_KEY can be all named ID without creating any problem.

Thanks for your help!
 
Read Message
Read Message
Read Message
Previous Topic: MSSQL access from Linux
Next Topic: SQLite Schema Bugfix
Goto Forum:
  


Current Time: Sat Apr 27 01:47:57 CEST 2024

Total time taken to generate the page: 0.03685 seconds