I am beginning to familiarize myself with basic concept in sqlalchemy.  One 
question I am still trying to wrap my head around is creating a table view.

In terms of the problem I am trying to solve, I am trying to setup schemas 
particularly related to financial reference data.  The data doesn't change 
very often, but I want to setup a good schema where changing one table row 
changes the data in the whole system, but also create table views the most 
useful aspects of the data reside in one table.

For example, say we have something like:

security
 id
 sec_type
 ticker
 cusip
 sedol
 description
 exchange.id
 country.code
 
country
 code
 name

exchange
 code
 name
 country.code

sec_type
 code
 description
 country.code
 currency.code

*From this, I would like to create a table view with something like:*

security_view
 id
 ticker
 cusip
 sedol
 description
 exchange.name
 sec_type.code
 sec_type.description
 sec_type.currency
 country.name 

The table view will be for viewing the whole table in applications, and 
mapping data between applications.  I don't want a security objects in 
Python have attributes that are also objects in these cases, but instead 
act as just another data column(think pandas DataFrames).

There's going to be more tables and fields that map to this view, but I am 
trying to understand the best way in sqlAlchemy to create these types of 
views?

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to