Data Design - Multiple Short Trips Versus One Big Trip?

Jul 20, 2010

Is it better to have the calculated field returned with the rest of the results or is it better to calculate it later when you need it?

Example: I have a GridView that displays search results that has many fields like:

Application ID
Name
Account Type
Account Number
etc.

The account number field is not always consistently the same thing though. For accounts of type A they are eight digits long and for accounts of type B they are twelve.

After the search if they select a record and choose to continue the application I need to check the eigit digit account number for any access restrictions. All accounts of type A and B have an associated eigit digit account number, it is just that type B are the only ones to have the twelve digit number.

So should I add a redundant hidden field like "Common Account Number" to the search results and just hide it, thus making the heavily used search take slightly longer and making the results grid take up more space in the view state?

Or

Should I call the database when they try to continue the application and translate the Application ID into the eigit digit number so that I can use it to do my access restriction check? This will require one extra call to the database but the translation should be fast as both fields are in the same table and the application ID is a primary key. The continue application button will be used less as there are many other command options.

View 2 Replies


Similar Messages:

Iis7 - Design And Implementation For Short URLs On IIS And .NET Stack?

Mar 7, 2011

I'm interested in creating "short URLs" a segment of pages on a site. However, this isn't in the traditional sense of "short URLs" like bit.ly where it will redirect to a different destination URL. I want the short URL to be the final destination.For example, one of these URLs might be http://foo/a/Afjbg, and when you navigate to it, it stays on http://foo/a/Afjbg (IOW, http://foo/a/Afjbg is visible to the user in the address bar).

If it was static content, I would just arrange the pages and folders into these names. But the content I will have on the site will be dynamically driven from a DB, so each page is generated on the fly. So the content looks logically different, but in reality is essentially the same .aspx page with dynamic content.How can this be accomplished on a Microsoft hosting stack? The platform is IIS 7 with ASP.NET 4.

View 3 Replies

C# - Save Data As Xml In DB Versus Saving Multiple Rows Of Data?

Dec 4, 2010

I am designing my database and wanted to know the best way to handle this problem. I have tabs on a page that looks like this:

Tab1
--SubTab1
----Data1
--SubTab1
--SubTab1
Tab2
--SubTab1
--SubTab1
--SubTab1
Tab3
--SubTab1
--SubTab1
--SubTab1

I can put this information in the database that will be stored in multiple rows like this

TypeID---------------Name
1--------------------Tab
2--------------------Data

ObjectID----------Parent-------------TypeID
1-----------------0------------------1
2-----------------0------------------1
3-----------------0------------------1
4-----------------1------------------1

Or I can just put this in the database like so:

<root>
<tab name="MyTab">
<tab name="MySubTab">
<data>1234567890</data>
</tab>
</tab>
</root>

If I pull just the xml from the database then I would not need to select multiple rows i just need to select one row then parse the xml into a class then pass that data to the controller. I just would like to know if this is a good idea? Will I be making a mistake if my site to scale in the future? Will this make more maintenance as the site gets bigger and want more features?

View 5 Replies

Data Controls :: Database Design For Multiple Columns

Jul 23, 2013

The user enter the  name,address,country,qualifiction,experience the user enter more than one qualification, and experience the add another button click will add another qualification, and experience...i am confused in designing the database  how to design the database for this . i am design this tables .

==employee table==                     ===Qualification==                       ==Experience===

 employee_id                                  qualificatin-id                                         Experience_Id
 employee_name                            University                                           Company
 employee_address                         Degree                                               Year-of-0experience
 employee_qualification                    End_Date                                             employee-id
employee_Experience                     employee-id

View 1 Replies

Configuration :: Deploying Versus Releasing Versus Implementing

Sep 16, 2010

What is the difference between; Deploying an application Releasing an application Implementing an application

View 1 Replies

C# - Cache A Dataset To Stop Round Trips To Db?

Sep 11, 2010

I am creating a search results page in C# in an ASP.NET 1.1 page. In my data layer I have a DataSet that stores the result of a plain old ADO.NET stored procedure call. The DataSet has two DataTables and I'm using a DataVIew to filter and sort the columns.

I only want to fill the dataset once, and then work on the DataTables and derived DataView until the page is unloaded. How best should I cache the DataSet in my DAL so that it is filled only PageLoad? Do i put it in a Cache object, a static member variable, a property...

View 4 Replies

Security :: Why Does Application_AuthenticateRequest Make So Many Round Trips

Feb 11, 2010

Why does Application_AuthenticateRequest make so many round trips before actually loading a page. I've noticed that at times it will process the same logic 10 or more times before actually loading a single page?

I don't understand why this is happening, and it makes me worry about excessive & unnecessary performance loads.

View 5 Replies

Application_Start Versus OnInit Versus Constructor?

Jul 23, 2010

I've gone rounds with this ever since I started programming classic ASP 12 (or so) years ago and I've never found a great solution because the architecture of ASP and ASP.NET has always been a swamp of bad practices, magic shared singletons, etc. My biggest issue is with the HttpApplication object with its non-event events (Application_Start, Application_End, etc.).

If you want to do stuff once for the entire lifespan of an HTTP application, Application_Start is the obvious place to do it. Right? Not exactly. Firstly, this is not an event per se, it's a magic naming convention that, when followed, causes the method to be called once per AppDomain created by IIS.

Besides magic naming conventions being a horrible practice, I've started to think it might be a reason there exist no such thing as a Start event on the HttpApplication object. So I've experimented with events that do exist, such as Init. Well, this isn't really an event either, it's an overridable method, which is the next best thing.

It seems that the Init() method is called for every instantiation of an HttpApplication object, which happens a lot more than once per AppDomain. This means that I might as just put my startup logic inside the HttpApplication object's constructor.

Now my question is, why shouldn't I put my startup logic in the constructor? Why does even Init() exist and do I need to care about Application_Start? If I do, can anyone explain why there is no proper event or overridable method for this pseudo-event in the HttpApplication object?

And can anyone explain to me why in a typical ASP.NET application, 8 instances of my HttpApplication are created (which causes the constructor and Init to run just as many times, of course; this can be mitigated with locking and a shared static boolean called initialized) when my application only has a single AppDomain?

View 2 Replies

Forms Data Controls :: "undisplay" The Items User Clicked In ListView Without DB Trip

Feb 2, 2010

I'm displaying a bunch of items in a ListView. Each item has a button that the user can click if he/she is not interested in the item. What I want to do is this: if the user clicks the button, I want to remove that item from the list but I don't want to necessarily make a datadabase trip for each and every item the user clicks. I'd rather make one DB trip and take care of all the items user has clicked. However, as the user clicks them, I'd like to remove them from the ListView.

View 2 Replies

Is It Safe Saving Credential Data In Session State For Short Period Of Time

Jan 1, 2011

Because of some situation , I had to save users password in session state for short period of time .it unsafe holding some important data in session state?

View 5 Replies

Data Controls :: Strip (Cut Short) Long Texts In GridView Column Fields

Nov 22, 2013

I have used datagridview to display certain data to  users...

It works f9 but what I am concerned with is that there are a few columns having large text...n the text moves to the next line...i want that after a fixed length of letters it should display "......"

So the my datagridview would be of fixed size....

View 1 Replies

MVC :: The Form Is Submitted, The Server Side Validation Trips And I'm Told The Entry Is Invalid?

Jun 27, 2010

I've got my validation wired up through my Service layer, and my Birthdate property looks like this.

[Code]....

The client side validation works properly if I input something like `12/12/1990` but when the form is submitted, the server side validation trips and I'm told the entry is invalid. I'm using the jQuery-UI Datepicker to input the date, however when I disable the datepicker, the problem persists.Am I missing something here? I thought the client side and server side would be the same thing.If I remove

[Code]....

Then the form submits. It's obviously something to do with the Regex.

View 8 Replies

Update An Entity Without A Round-trip?

Dec 3, 2010

tried the following:

public void UpdatePlayer(int id)
{
Player player = new Player() {ID = id};
player.Password = "12";
Entities.Players.Attach(player);
Entities.SaveChanges();
}

No change at the db.

View 4 Replies

Is It Possible To Detect If Cookies Are Disabled In One Round Trip

Aug 4, 2010

If I disable javascript and cookies, [URL] detects that cookies are disabled without a redirect. If you click the cart link, there's only a get on the cart page.

I'm guessing [URL] is most likely not using ASP.NET, but how would you accomplish detecting disabled cookies using ASP.NET without the use of javascript and redirecting? Is it possible to detect if cookies are disabled in one round trip?

View 4 Replies

SQL Process Design Connect To Multiple DBs?

Aug 11, 2010

Web server running an ASP.NET site that's connected to a sql server instance for all the web related DB needs (products, pricing, users, etc.)...

The companies accounting, inventory control(FIFO, etc.) and whatnot are mainly done on another system which uses a different SQL server...much more complex, for obvious reasons.

What I Need

What I need is to retrieve the current quantity on hand for every product that's on the web by connecting to the internal accounting sql server, even though the website uses a different sql server for it's own requirements.

The reason I can't have the information that is required to calculate the quantity on hand for every product on the web to be on the same sql server is because there are way too many tables that are needed to calculated that information...what's on purchase order, what's on sales order, and the physical inventory.

What is the best way to accomplish this without altering either database?

View 1 Replies

Combine Several Images Into One For Use With CSS And To Reduce Round Trip Count?

Aug 15, 2010

I'm looking at ways to reduce the quantity of Round Trips to my site for my clients. Right now I have several images that I think should be combined into a single image like this:

[URL]

and then spit out some CSS like this:

[URL]

... that way I can reduce the round trips and increase the speed in which my site is used (after the first load). Is there any simple tool that will do this for me? I figure it's 2010 and someone somewhere automated this. I have Visual Studio, and Expression Web and don't see it there

View 2 Replies

Architecture :: Design On Calling Multiple Web Services

Feb 23, 2011

My requirement is i need to display some quotes from some vendors in my User Interface. Some of the quote details will be fetched from database where as some vendors are giving web services to get the quote results. I need to combine the quotes from database as well as the various web service response and display in the grid.

View 1 Replies

Design Multiple Column ChartType In Chart Control?

Sep 28, 2010

I want to develop a Chart control in asp.Net 3.5 where in each section 2 data are comparing each other(like multiple Column) . In my attachment image that is first One.

View 1 Replies

DataSource Controls :: Calculate Average Duration To Cover A Route Trip?

Jan 10, 2010

I want to calculate average time to cover a duration of a route.

A route can have multiple trip between different time slots.

trip have TripStartTime and TripEndTime.

For more clear of the Qns for Qns please go to this URL and for table structure please go to this Url.

Trip Time = TripEndTime - TripStartTime from columnin the table.

I have to calculate Actual trips time for different time slots group by Fleet Id which is related to route no in another table..

View 2 Replies

Forms Data Controls :: Binding The Datatable To A Gridview And Format The Date Columns To Short Date?

Jan 27, 2010

I'm looking for the best way (Performance) to do gridview columns formating RunTime /Dynamic depending on the datatable Columns type ,I want to bind the datatable to a gridview and format the Date columns to short date, and currency columns formatted with comma ex 10,000.00 inplace 100000.00 at datatable the column type is double run time (without converting them to String) since I do a filtering and sorting at these columns.

View 3 Replies

Data Controls :: Strip / Trim And Cut Short Label Text In GridView TemplateField And Display Complete Text On MouseOver?

May 7, 2015

I am unable to get it done as i have huge data in my table which is spoiling the standard look and feel of grid view..

if (row.RowType == DataControlRowType.DataRow) {
ViewState["description"] = e.Row.Cells[10].Text;
if (e.Row.Cells[10].Text.Length >= 25){
e.Row.Cells[10].Text = e.Row.Cells[10].Text.Substring(0, 30) + "...";
e.Row.Cells[10].ToolTip = ViewState["description"].ToString();} }

View 1 Replies

Long URLs From Short Ones Using C#?

Jul 4, 2010

I've been using the LongURL.org API for expanding short URLs. The great thing about this service is that it returns a long URL, the title of the actual page and meta-info.The real problem I have is that it seems to take an inordinate amount of time to fetch the data. I'm considering shifting the request to JavaScript so that the URL is fetched via an AJAX update panel, in order that the page loads quickly, and the URL data is updated while the user looks at the content (some search results).Does anyone know how else I could gather the info described above, n a better time-frame? I'm using C# ASP.NET but would consider solutions in other languages.

View 2 Replies

MVC :: Short Hand Name Attribute For Controller?

Feb 1, 2010

I noticed the ActionNameAttribute lets you alias your controller methods. This is nice but I was curious if there was a comparable attribute for a controller name. Specifically, I have a controller with a lengthy name in c# world but would like to shorten / alias it in the actual URL. I was hoping for some kind of controllername attribute. Is there such a beast?

View 3 Replies

Control Panel - Short Date Format?

Feb 10, 2011

We are having an issue with a website...the short story is a date is selected from a calendar control such as 11/15/2010 but when it is saved it becomes 11/15/201 (last digit truncated). I am not the programmer debugging this so I don't know all the details, but it seems to be working on one server but has the problem on another.Could this have anything at all to do with the Regional and Language Options where you can specify your date format to be M/d/yyyy or MM/dd/yyyy? I would *hope* that would only change 02/09/2010 to 2/9/2010 and not truncate a year! But I remember this being a problem on the last project I worked on where dates were getting returned in a different format than that expected (again, suppressing the month from 2 digits to 1, or the day, but not the year...) Since this is machine-specific, it would explain why one server had it but the other didn't. But I don't want to suggest to the SA that he take a look, if I am way off.

View 7 Replies

Crystal Reports :: Set Band Height As Short As Possible?

Nov 9, 2010

Is there any way to tell a band to be shorter if there is no data in the fields in the bottom area of the band? Lets say we want to print in detail band:Line 1: Invoice Code, Invoice Total, Invoice Shipment ToLine 2: Invoice CommentsNormally if you set two lines of fields in detail band, Crystal Report force Min Height of Band to be the bottom of the second line, or bottom of objetcs in Band in general.I want to be able to tell him, make this Band As Short As possible, so if bottom controls or fields havent Data set the Height of Band to be not that tall !!!In other words if you let me "Can Grow" for some objects, please let me "Can shrink" for the whole Band.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved