Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Views vs. Tables in Business Objects
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00260732
Message ID:
00260801
Views:
13
>Hello again,
> When using business objects, I am trying to stick with views, but I was curious if there was any disadvantage (aside from the lack of table buffering) to using the tables directly? I have a table that I need to see all the records in order to search the table and I thought that using a view would be a mistake, the reason being that the table has the potential to grow to over one million records. It doesn't seem logical to use the view and create the index every time the user needs to access the table--that would seem to be a waste of time. Am I mistaken in this theory, or would that be the correct way to design the application?
>

It depends on what you're searching the table for. Usually you just create a parameterized view that filters out just the records you need. For example, if you had a customer table and wanted to search for all the customers in Ohio, I'd create the customer table, create an index on state, then create a view that filtered on the state (ie. Customer.State == ?vp_State). Then you either fill in the state in the "vp_state" or let the framework handle it in PostInitHook()/AddParameter and requery the view. Your view will just have the records you need.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Reply
Map
View

Click here to load this message in the networking platform