Architecture :: SQL Tables Or Enums Or Both?

Nov 12, 2010

I have a design question about whether to use sql tables or enums or both for a application I am developing for work.

Example - Gallery

Let say you have a database for displaying albums and photos. You want the ability to allow the user to set the display mode for the photos differnently in their albums i.e. LightBox, Scrolling, Single

Do you create an enum for DisplayModes so you can for example:

[Code]....

But then for reporting and admin you need to know the Album DisplayMode, so do you then have a SQL Table that just repeats the values of the enum?

View 3 Replies


Similar Messages:

Architecture :: Option To Using Enums And Switch Statements?

Oct 26, 2010

Is there any design pattern or architectural design that prevent the following type of code, where I have an enum with different fileformats and I have to make a switch anywhere I want to distinguish between the different fileformats?

[Code]....

If add an item to the enum definition in this case I have to change all the code that uses switches and that kind og enum which, I guess, is a bad approach in terms on maintenance of the application?

View 1 Replies

Architecture :: Database Tables Have To Include?

Oct 20, 2010

I'm developing Web Desktop like Glide or Icloud. It's gonna be a web application that gives the real world desktop application functions.

The DBMS I'm goin' to use is SQL Server. Now, I'm designing the database schema, but having some problems with it. I've no idea what tables I've to include.

So far I've only Users, Folders, Files, RecycleBin, Contacts, ContactGroups tables, but it seems very few. May be I've missed something.

View 2 Replies

Architecture :: Handling Data From Two Tables?

Jul 17, 2010

I will try to explain my doubt and keep the code out, maybe for a second post. The greatest problem i am facing here is the logic :P.

At this point i have two tables: Empregado (Worker) and Cargo (Post). One post have many workers and one worker has only one post. In the database i think i am fine, a simple relationship one - many.

I've mapped the tables into classes with the same fields. As well i've created collections using generic lists. Each collection has a method that acess the bank and recover the data.

My worker class agregates one instance of post. I mainly use this to show the data i need. Basicaly i do a select, join the tables and fill the properties of the worker and the post.

The doubt: Is this a good pattern? Up to this moment i am not worried with blinding light performance, but in how to act in an good OOP pattern.

View 2 Replies

ADO.NET :: Insert Into 3 Related Tables Using Three Tier Architecture And Typed Datasets

Aug 29, 2010

I am using ASP.NET (C# and sql server express 2005) for my web application project. I have three related tables. I want to do an insert using typed datasets,tableadapters and three tier architecture. I wish to know how to do simultaneous inserts in 3 tables. So i wish to insert a row in first table and get its primary key. Same with the second table. I will use the primary keys of those first two tables to do the insert in the third table. How can i accomplish this using formview control and what methods should i use??

View 3 Replies

Architecture :: Naming Conventions&meaning Of Tables Is Not Clear On SQL Server?

Feb 2, 2011

I have been using Sql Server since 2003, and still encouter situations that are just hard to solve :)I know it's a an sql server question, but since it's from a methodology and architecture point of vue, I thought it fit in this forum I am facing a sort of conflict with my current customer :An old sql server database, migrated from sql server 2000 to sql server 2008 (2003 project), which serves an asp.net application and cubes.naming of tables are like the following : tbl_ and Vw and yet procedures have no underscores. The database contains no functions.All object names are abbreviated, without any dictionary to understand what they mean. We have to ask every time.We developed a new module, and followed Pascal Casing, with clear words for the tables meaning.The customer makes a code review and says, that object are not correctly named :) and the meaning of tables is not clear. Names like AnalyticsAxis, is simply not clear. We also are asked to follow tbl.

View 1 Replies

How To Use Enums In Project

May 15, 2010

i heard that Enums are very useful while we are developing the Project.

View 25 Replies

C# Want To Switch On Enums?

Jul 2, 2010

I have an enum:

public enum Status
{
Incomplete = 1, Complete = 2, Cancelled = 3, Deleted = 4
}

Now on a certain page I wish to list this enum in a checkboxlist. This would be fine except that I want the text of each checkbox to display different text than the enum.

i.e the check boxes should say:"Not Processed" instead of "Incomplete"

"Processed" instead of "Complete"

"Void" instead of "Cancelled"

Is it possible to put this enum in a foreach and then switch on the status and update the text. Like so:var statuses = Enum.GetNames(typeof(Status));
foreach (var status in statuses)))
{
switch (status) [code]....

View 3 Replies

MVC :: Forms Authentication (with Enums)?

Oct 25, 2010

Up until now I've been using the Session object to store the currently logged on user and using a strongly typed wrapper class to access it. I've been reading up on using the Session object in MVC, and it seems frowned upon (especially for user authentication), so I want to look at using forms authentication instead, but I'm not quite sure how to use it.


One issue I have is that I validate a user's permission level using an enum, whereas all the examples on forms authentication I've found use a "roles" object which is just a string. Can I still implement it using enums?

View 1 Replies

Overloading Enums And Properties In VB.NET?

Sep 23, 2010

I have a base class with the the following enum and property:

Public Enum InitType
Focus = 0
Help = 1
ErrorToolTip = 2
End Enum

[Code]....

First off, how do I do this - is it by simply overloading it? And secondly will my original property pick up the new enum automatically when using the derived class or will I need to overload that too?

View 1 Replies

Web Forms :: Using Enums In Global.asax>?

May 4, 2010

I was given a web app written in VB.net. I am using VS2008. The project has a Global.asax page with Enums declared

Example:Public Enum eCurrentLoc as Integer

Admins

AdminTools

Home

LogIn

Status

End Enum

But in the web application itself I get errors on this line of code:

Ads = Global.eCurrentLoc.Admins

I get the blue scwigly line under Global.eCurrentLoc

The error states 'eCurrentLoc' is not a memeber of '<Defaults>'

View 1 Replies

Web Forms :: Bitwise Operations Using Enums

Dec 22, 2010

I have a page which is accessible only from Monday to Friday. If i try to open it on Saturday or Sunday it shouldn't.I have a column in my DB naming WorkingDays and iam storing Bitwise value

Monday=1,Tuesday=2,Wednesday=4,Thursday=8....

So the value in my DB is 31 which is equal to Monday to Friday.If i open the page on saturday how should i check?

How should i convert todays day to bitwise value and how should i compare with the DB value.

View 12 Replies

Geting String From Integer Using Enums?

Oct 6, 2010

The .NET Framework contains an Enum called DayOfWeek.so now if i have an integer 7how can i ge the string "Saturday" using the enum?

View 1 Replies

Web Forms :: Enums And Checkboxlist / How To Insert The Selected Items To A List

Jan 27, 2011

i defined an enum with the [flags] attribute and binded it to a checkboxlist.

my question is how can i insert the selected items to a list?

this is my code:

[Code]....

View 4 Replies

Databases :: Importing - Updating Sql Tables From Excel Sheet Into Multiple Tables Daily

Jan 4, 2011

I have an C# ASP application I am writing that needs to have the capability to import a generated excel or a comma delineated sheet each day. A clerk will have this job each morning so it doesn't need to be automated. My problem in trying to understand the solution to this is that the 1 sheet contains loan information, including customer information all in the same sheet. I would like to send certain columns to update information in the loan table and send other information to update the customer table. I need it to create relationships when new loans appear in the spreadsheet.

View 1 Replies

SQL Server :: How To Export The Data From Dat File To Tables(Two Tables)

Dec 30, 2010

I am using bulk insert concept to export the data from dat file to tables(Two tables). I am using the temporary table for to do the calculation and insertion to two tables. My problem is whenever I selecting the temp table data after the execution of bulk insertion , the order is changing .I need to get the order as it is in file order(csv,dat,txt).

View 5 Replies

Architecture :: Articles/Links On Asp.Net Pipeline And Internal Request Processing Architecture?

Oct 4, 2010

I am looking details on the internal working of asp.net architecture. The topics need to include the following:

Asp.Net Thread/Application Pools HttpRuntime HttpApplication - When and how it is set up How HttpContext is set up How objects can passed along the pipeline using HttpContext.Current.Items Why does modification of static variables requires locks in ASP.NET (advanced)IIS 7 Integration Mode

View 1 Replies

Architecture :: How To Design A Centralized Business Or Service Authentication Architecture

Sep 22, 2010

i want to create a centralised business or Service authendication architecture in .net. for example, we have a clients like c1, c2, c3, c4, ... etc. everybody logins seperatly as well as grouply. ie, if client "C1" logins [with login authentication] he can access c2 , c3, c4 also without login authendication. So its like a google. if we enters gmail account, we can access orkut, picasa like that.. i need the cetralised architecture.

And, client "c1" seperately asks seperately how will be the authendication architecture.

so give me the single solution for both these two scenarios. how will be the architecture for these two and how is the Data Base (Login) Structure.

View 3 Replies

Architecture :: Entity Model Design Framework And N - Tier Architecture

Dec 25, 2010

recently i've studied on ADO.NET's Entity Model Framework and say 'wow' as ORM is one of the fevourite pattern i practice..but suddenly i've come to an ambiguous situation when i'm going to start. i usually follow the following 3-tier architecture..

1. UI Layer
2. BLL - business logic layer
3. DAL - Data Access Layer
a. DTO / DAO
b. Gateway (contains the sql query/stored procedure and connection with DB)

now when i'm going to use the Entity Model Design,where the DBML/ .edmx File should be placed? Because many a times i'm using the DBML file as DTO because of the mapped objects.. in the same time, sometimes DBML ( .edmx file in .NET 4.0) contains CRUD methods and stored procedured method as well as methods with different selection operations,- which should be in Gateway. so where the .edmx file should be placed !?!! IN DTO namespace !? or in Gateway namespace!

moreover sometimes there is no need for the BLL which breaks the rules of inter-layer-communication (UI > BLL > DAL.Gateway)! what makes me confuse is, what should be the ideal n-tier architecture when i'll use the ADO.NET Entity Model Design Framework

View 4 Replies

Architecture :: Asynchronous Page Processing In 3 Tier Architecture?

Jul 30, 2010

I am working on 3 tier architecture: UI, BL, DAL. In my UI i have following code for Asynchronous page processing:

[Code]....

But I want a database fetch operation to be performed in this asyncronous method. And due to 3 tier arch. i am unable to do this in UI Layer. Can anyone guide me that how can I implement Asynchronous processing in 3 tier architecture? Note: If you are going to place EndAsyncWork1 in DAL then show that how can I return a value back to UI layer from this function.

[Code]....

View 1 Replies

Architecture :: What Is The Difference In 3-tier Architecture And Gereral Way Of Programming

May 20, 2010

I want to know that What are the factors if we use methods on each .cs page for connection and executing query on each aspx code behind page rather then using BAL .

How our application get affected in terms of performance and speed or other way?

when we put our website on server after publish/compile in general approach (using query in C# code behind) rathor than using stored procedures?

then which logic is better and why ?

View 8 Replies

Architecture :: Function Implementation In 3-tier Architecture?

Apr 28, 2010

I have implemented the 3-tier architecture project; DAL, BAL, and presentation layer are three layers in it. I am going to implement the following scenario:

Presentation layer calls to a function in the BAL layer which returns 2 string variable, and in turn this function from BAL layer calls to a DAL layer function which also returns 2 string variable. How can I implement the above scenario?

View 2 Replies

Architecture :: Exception Layer In N-tier Architecture?

May 13, 2010

I'm developing a n-tier architecture... I'm confused with handling exception in the layers... Is it a good practise to add a Exception Layer to the architecture.

View 3 Replies

Architecture :: Design Pattern And Tier Architecture

Jun 12, 2010

I am a newbie to asp.net and work in a firm where the projects are quite small.

I was told by my manager that in a few weeks or so we would be getting a bigger project and I need to be well versed with Design Patterns and N tier arcihtecture.

I would really appreciate if someone could provide me some links and also drop me a few sentences on how this things are useful?

View 4 Replies

Architecture :: Architecture FOR SAAS ( Service As A Product)?

Dec 22, 2010

I am going to create the SAAS (Software as a service) Application. Can you please provide all the attributes that we have to consider in SAAS application (for example usability, pluggable architecture etc .. )

How architecture should be build for this project, provide sample architecture for SAAS application. This architecture should be easy to upload and upgrade or degrade the features. Error handling should be easy.

View 2 Replies







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