Advice required - using entity framework with normalised data -


i've recent gone through process of revamping database, normaising lot of entities. have few more tables had. lot of data use on website readonly simple denormalise using view, there entities benefit denormalised retrieval still need updated.

here's example.

a user may member member may have profile member may have account  

in addition have 3 further lookup tables.

in total there 3 tables user , 4 tables member.

ideally, can create 2 views above tables.

however, user needs updated entities belonging member. additionally there 6 separate tables associated users/members, i.e. favouritecategories need retreived , updated time time.

i'm struggling come best, efficient way of doing this.

i not use views , bring entities , lookups model, reliant on ef produce retreival queries. stuff i've read suggest ef not best @ dealing joined data.

i add both view , tables, using tables updates only. seems sloppy due duplication, complication of model, underutilising ef model functionality.

maybe use readonly view data retrieval , create stored procs. believe process of using ef stored procs bit of hack, i'd keep stored procs distinct ef , pass params , call sp via traditional methods. again seems bit of halfway house.

i'm not experienced .net or ef, appreciate solid advice on either methods i've referred above or better technique acheive this. don't want go hacking edmx file @ stage because... it's wrong.

i have few entities benefit right solution. user example amongst simplest, there's lot gain right approach.

help , advice appreciated.

do want use ef? if yes use either first approach not using views @ , allowing ef handle or last approach using views , mapping stored procedures insert, update , delete operations.

combining mapped views reading , mapped tables modifications possible first solution (allowing ef handle everything) additional views query optimization.

you not find cleaner approaches. mentioned approaches valid solution problem. question if want write sql yourselves (view , stored procedures) or let ef that.

the worst approach using ef querying , manual calling of stored procedures updating in cases can useful.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -