data-access

.NET Data Access [closed]

孤街醉人 提交于 2019-12-23 04:31:12
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . What is the best way to learn data access in .net? The Entity Framework seems to be the new "it" thing, but what other options do I have? Thanks, Robert 回答1: Your starting point is ADO.NET , with documentation available at :http://msdn.microsoft.com/en-us/library/e80y5yhx(v=vs.80)

Using interfaces for writing DAO classes

我的未来我决定 提交于 2019-12-21 17:54:12
问题 I'm creating a new web application which will use a bunch of Data Access Object(DAO) classes for doing CRUD operations on the data. I know I should write java interfaces when I have external users/applications using my DAO classes. But if there is no such need do you think I should still write the interfaces? I'll be injecting DAO classes in to the Spring Controller(I'm using Spring MVC) classes using spring. 回答1: NOTE THAT : You should always try to separating the Interface from the

How to limit user access at database level in Hibernate

戏子无情 提交于 2019-12-21 04:46:10
问题 The App I need to implement a web app that will be used by different users. Each user has different privileges on various tables, e.g. User A can see fields 'name' and 'address' from the table Student User B can see fields 'name' and 'phone number', but not 'address' from the table Student User C can see and modify all fields mentioned above I will have something at the UI level to limit certain access, e.g. hide the "edit" button for users that don't have permission to modify entries.

Spring mvc:resources access to outside folder

点点圈 提交于 2019-12-19 20:34:51
问题 I have stored medias (pictures and movies) in a folder (for example C:\test\tes.png) and I'm trying to access to pictures with an url like : http://localhost:8080/app/picture/test.png. To do that, i have used resources tag (spring 3) as below : <mvc:resources mapping="/picture/**" location="file:/test" /> When I try to access, I have an error with no more details. Requested Resource Not Found I have in logs : 2011-11-07 20:48:55,241 [http-8080-2] DEBUG org.springframework.web.servlet

Java: Advice on handling large data volumes. (Part Deux)

一曲冷凌霜 提交于 2019-12-19 03:44:28
问题 Alright. So I have a very large amount of binary data (let's say, 10GB) distributed over a bunch of files (let's say, 5000) of varying lengths. I am writing a Java application to process this data, and I wish to institute a good design for the data access. Typically what will happen is such: One way or another, all the data will be read during the course of processing. Each file is (typically) read sequentially, requiring only a few kilobytes at a time. However, it is often necessary to have,

simple jdbc wrapper

こ雲淡風輕ζ 提交于 2019-12-18 14:58:26
问题 To implement data access code in our application we need some framework to wrap around jdbc (ORM is not our choice, because of scalability). The coolest framework I used to work with is Spring-Jdbc. However, the policy of my company is to avoid external dependencies, especially spring, J2EE, etc. So we are thinking about writing own handy-made jdbc framework, with functionality similar Spring-jdbc: row mapping, error handling, supporting features of java5, but without transaction support.

ORM vs Handcoded Data Access Layer

岁酱吖の 提交于 2019-12-18 10:16:16
问题 I'm a bit scared to ask this question as it may start a religous war so I want to be really clear on what I'm looking for. I'm looking for a reason(s) why you would or have jumped one way or the other and also for items to add to my lists. I'm looking for the big ticket, big bang items. Also, items specific to a product, maybe, if they are really relevant. At this point I'm trying to evaluate ORM vs Manual not product A vs product B. ORM Advantages - Quick to code and low maintenance (in some

How can I generate database tables from C# classes?

大憨熊 提交于 2019-12-17 10:13:10
问题 Does anyone know a way to auto-generate database tables for a given class? I'm not looking for an entire persistence layer - I already have a data access solution I'm using, but I suddenly have to store a lot of information from a large number of classes and I really don't want to have to create all these tables by hand. For example, given the following class: class Foo { private string property1; public string Property1 { get { return property1; } set { property1 = value; } } private int

Functions can not to return individual items of a record, is it? Any workaround?

人走茶凉 提交于 2019-12-14 03:15:57
问题 Basic things as struct in C data types, exist in all popular languages, and is expected that functions, of these languages, also can return a struct ... And, by an orthogonality principle, is expected you can access the returned struct itens . PostgreSQL, nevertheless, did not offer access to the struct itens of a FUNCTION ... RETURNS RECORD . It is correct? But programmers use PostgreSQL without complaining... There are a simple and intuitive workaround? Similar question: PostgreSQL v9.X

This spring data query is not working

一曲冷凌霜 提交于 2019-12-13 21:22:54
问题 Here is my UserRepository and a find function @Repository public interface UserRepository extends CrudRepository<JPA_Users, Long> { List<JPA_Users> findByName(String Name); } then in one of the controller function i try to access this find function as follows @RequestMapping(value = "/jpadata1", method = RequestMethod.GET) public String jpadata1(ModelMap map) { UserRepository repository; ApplicationContext context = new ClassPathXmlApplicationContext("beans1.xml"); repository = context