Tag Info

New answers tagged

1

Most modern database management systems allow for storing XML data in a column. Using different techniques based on the DBMS, you can query values contained in the XML column. SQL server and Oracle both support XML column types. I am fairly certain that mysql does as well, but can't confirm that at the moment.


0

I would probably do this a third way, which is by adding a column to your rating table whose value is the average rating after that rating is applied. This means that this stage of the calculation will only need to be preformed once rather than every time your stored procedure is executed, resulting in somewhat better performance. Technically this results in ...


2

You are right, DAL reference should NOT exist in the UI project. You should instead create DTO objects for sending/recieving data to your BLL. It can be a separate project called DTOs or can be included in the BLL by creating specific folders like Customer and placing its facade classes along with the DTOs in that folder. BLL will be responsible for mapping ...


1

The most efficient way would be for the client application that is responsible for sending the email to query the DB at startup and remember the next meeting time. It would sleep until 3 hours before this time, then wake up and send the email. However, the application would also have to be informed of changes to the meeting schedule - either meetings that ...


5

I'm not sure that I see what "huge impact on the database" a process would have that polled the database every 5 minutes. Presumably, you have some sort of table that stores your meetings and their start times. It should be relatively easy to index the column that stores the start time and to write a query that looks for all the meetings set to start ...


1

One aspect not mentioned so far is the push for "open" systems in the 1980s and 1990s. In many places, software vendors would have to provide industry standard access to the data in their databases. At the time, SQL was an established standard which was well know and understood; Prolog was pretty esoteric and academic. Once you started getting interfaces ...


4

There is another reason. Practically speaking, SQL is useful for data persisted on disk. So databases are used to store data for a "long" time (several months). Every SQL database (e.g. PostgreSQL, MySQL, Oracle, ....) is managing data on disks (or SSDs, i.e. hardware which could keep data if properly powered down). However, most Prolog implementations I am ...


18

I believe this is primarily historical thing. SQL was primarily used in businesses for making business applications. Some companies build their livelyhood on selling SQL solutions and they used their money to advertise and push SQL into minds of many. This was especially empowered by how important data is for business people. This is why SQL won over it's ...


5

The reason is actually pretty simple. It has nothing to do with how useful the language is for a given task and everything to do with how maintainable the code is. Reading an SQL statement, many developers will be able to determine what most basic queries do without knowing the language. They might have a harder time in the case of complex examples but ...


0

I generally don't expose my poco objects to the UI layer. Create a wrapper/domain objects layer that will transform the data of Dal layer. This way you can control the data going to the UI layer.


0

You need to put it all into one database. SuperUsers should only link to ReadOnly users data, so that the ReadOnly user data is not duplicated.


0

The common mistake many people make with database mapping is that they focus on the schema and develop a tightly-coupled representation of the tables in business logic classes. This is not the best way at all - obviously it makes the business logic layer so tightly coupled to the DB that they quickly realise its a mistake and end up adding another layer to ...


-1

I recommend having one class per table, and one field per column. This pattern is widely used by Object Relational Mappers (ORMs) in many languages, and it works very well. These classes form your domain model. One issue, as others have noted, is that if you want to change your data schema, you need to change application code. If that is an issue for you, ...


0

If you're only worried about spreading the similar rows apart, and not as bothered by making sure they are in regular intervals, you can use something like the following: It determines a weight for each group of letters, then uses the ROW_NUMBER function to calculate a distribution of sorts. By tweaking the weighting and/or sorting in the final select, you ...


2

I'm assuming that you're using .NET for development since you mentioned MSSQL as your database but my recommendations apply to O/RMs available for other platforms as well. CRUD Soft Deletes and Auditing For your first issue, CRUD operations and filtering of "soft deletes". The O/RM itself provides a foundation that allows for more complex scenarios to be ...


1

Call delete method, which sets the delete flag and updates the object. ORMs have some impressive functionality beyound simple CRUD operations. And they still allow SQL as a fall back. If by 'the application' you mean the UI, then the real reason for the middle layer is so you don't have a 'Smart UI' design which becomes harder and harder to maintain and ...


3

Have you considered hiring your developers and then letting them decide what architecture to use? By doing this you will ensure that you aren't excluding developers from the selection process simply because they don't like the architecture you've chosen. Getting the best possible team of developers is the most important thing for ensuring your project is ...


1

You want to build a database with all the accessibility code and business logic and then hire developers to build some sort of user interface. You're taking on a lot of the development responsibility here and not giving the developers enough room to do their job. Is there some reason you don't feel you're going to hire competent people who can help you ...


3

First of all no matter what you choose you want your business logic outside your database as much as possible. There are many reasons for this, the top couple being you get tied to your database so if you need to change to Oracle or SQL Server it becomes a much harder task, SQL isn't designed to handle business logic gracefully which results in massive ...



Top 50 recent answers are included