Architecture of database heavy application

A program I'm currently designing is extremely database heavy, almost anything the user does will alter the database, or read from it. Now I have one interface which defines all these operations, and one database class which implements this.
The result is that that class is huge, it contains logic for creating users, editing them, creating events, showing events to the user, editing, adding friends, adding items to a product, ....
On the one hand I can argue this does not violate SRP, because the whole use is database communication. On the other hand, this is a lot of code for one class.
Are there any design patterns that solve this, or is this acceptable?

Moderators,
Please look closely, I have already pointed it and you would find that ALL answers which Takken go is from Engsoochean. This is highly not possible its clear favoritism. There are couple of users who are marking ONLY HIS ANSWER and ONLY VOTING HIS POST helpful.
I am not saying answer is incorrect and question is not relevant to Database design.
I have ONLY UNMARKED the answer as I want other moderators to have a look and then they can mark the answer.
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My Technet Wiki Article
MVP

Similar Messages

  • Architecture change in existing application

    Aim: Architecture change in existing application
    Domain: Health Care
    Background: There are 2 application ( Front end: one in oracle forms - deals with accounts module and another in some legacy application - deals with patient, clinical and diagnose module) using and sharing the same Oracle 9i database.
    Patient related modules are moved into another database ( java as a front end, oracle 10g as backend ) which is normalized - eliminating duplicate tables and column, also its tables and columns names are not matching with existing (patient)system.
    Now the requirement is making the existing application related only to Accounts module ( having complicated business logic written in packages ) to work as it is without changing the code, design drastically.
    Questions:
    1. Now how best this task can be completed without affecting existing Accounts system drastically ( with minimal changes )?
    2. what are the possible best approach to achieve this ?
    3. what are the best way for communicating the 2 DB in this scenario ( may be creating synonym, views etc ) ?
    4. What are challenges that needs to be addressed ?
    Any recommendation, suggestion and solution will be very much appreciated.
    Thanks and Regards,
    Lokesh

    Views are one possible approach which make it possible to change the "real" datamodel without changing the appliacation itself. I can't tell you if its the "best" approach for your problem.
    Since most of the Patient related tables ( more than 200 tables ) are modified and if views are created for all this tables, What will be the performance.Performance is not influenced by just the fact that you use views instead of tables. It depends on the structure and complexity of the views you use. This question can not be answered in general.
    If 2 databases resides in 2 different server then, what is the best approach for communicating databases
    ( can you please put a thought on MQ, staging database... ) ?Again, it depends. How much data has to be read from one db in the other one? Are there data changes happending in one db which have to be applied in the other db?
    Based on above two, Is it still view are the best option?I don't know enough of your requirements to answer that question.

  • TRANSFER OF DATA FROM DATABASE TO APPLICATION SERVER

    I have to upload /transfer data from database to application server .
    I am not able to get it.
    If anyone have any solution to it,
    post it to me.
    thanks

    *& Report <name>
    REPORT name.
    DATA:
    BEGIN OF FS_SPFLI,
    CARRID TYPE SPFLI-CARRID,
    CONNID TYPE SPFLI-CONNID,
    COUNTRYFR TYPE SPFLI-COUNTRYFR,
    CITYFROM TYPE SPFLI-CITYFROM,
    AIRPFROM TYPE SPFLI-AIRPFROM,
    COUNTRYTO TYPE SPFLI-COUNTRYTO,
    CITYTO TYPE SPFLI-CITYTO,
    AIRPTO TYPE SPFLI-AIRPTO,
    FLTIME TYPE SPFLI-FLTIME,
    DEPTIME TYPE SPFLI-DEPTIME,
    ARRTIME TYPE SPFLI-ARRTIME,
    DISTANCE TYPE SPFLI-DISTANCE,
    DISTID TYPE SPFLI-DISTID,
    FLTYPE TYPE SPFLI-FLTYPE,
    PERIOD TYPE SPFLI-PERIOD,
    END OF FS_SPFLI.
    DATA:
    T_SPFLI LIKE
    STANDARD TABLE
    OF FS_SPFLI.
    DATA:
    BEGIN OF FS_TABLE,
    CHAR(100) TYPE C,
    END OF FS_TABLE.
    DATA:
    T_TABLE LIKE
    STANDARD TABLE
    OF FS_TABLE.
    DATA:
    BEGIN OF FS_TABLE1,
    CHAR(100) TYPE C,
    END OF FS_TABLE1.
    DATA:
    T_TABLE1 LIKE
    STANDARD TABLE
    OF FS_TABLE1.
    SELECT CARRID
    CONNID
    COUNTRYFR
    CITYFROM
    AIRPFROM
    COUNTRYTO
    CITYTO
    AIRPTO
    FLTIME
    DEPTIME
    ARRTIME
    DISTANCE
    DISTID
    FLTYPE
    PERIOD
    FROM SPFLI
    INTO TABLE T_SPFLI.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE =
    FILENAME = 'd:\files\p_spfli04'
    FILETYPE = 'ASC'
    APPEND = ' '
    WRITE_FIELD_SEPARATOR = ' '
    HEADER = '00'
    TRUNC_TRAILING_BLANKS = ' '
    WRITE_LF = 'X'
    COL_SELECT = ' '
    COL_SELECT_MASK = ' '
    DAT_MODE = ' '
    CONFIRM_OVERWRITE = ' '
    NO_AUTH_CHECK = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    WRITE_BOM = ' '
    TRUNC_TRAILING_BLANKS_EOL = 'X'
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    IMPORTING
    FILELENGTH =
    TABLES
    DATA_TAB = T_SPFLI
    FIELDNAMES =
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    FILENAME = 'd:\files\p_spfli04'
    FILETYPE = 'ASC'
    HAS_FIELD_SEPARATOR = ' '
    HEADER_LENGTH = 0
    READ_BY_LINE = 'X'
    DAT_MODE = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    CHECK_BOM = ' '
    VIRUS_SCAN_PROFILE =
    IMPORTING
    FILELENGTH =
    HEADER =
    TABLES
    DATA_TAB = T_TABLE
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_READ_ERROR = 2
    NO_BATCH = 3
    GUI_REFUSE_FILETRANSFER = 4
    INVALID_TYPE = 5
    NO_AUTHORITY = 6
    UNKNOWN_ERROR = 7
    BAD_DATA_FORMAT = 8
    HEADER_NOT_ALLOWED = 9
    SEPARATOR_NOT_ALLOWED = 10
    HEADER_TOO_LONG = 11
    UNKNOWN_DP_ERROR = 12
    ACCESS_DENIED = 13
    DP_OUT_OF_MEMORY = 14
    DISK_FULL = 15
    DP_TIMEOUT = 16
    OTHERS = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *LOOP AT T_TABLE INTO FS_TABLE.
    WRITE:
    / FS_TABLE-CHAR.
    *ENDLOOP.
    OPEN DATASET 'p_spfli04' FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF SY-SUBRC EQ 0.
    MESSAGE 'File Already Exists' TYPE 'I'.
    STOP.
    ELSE.
    CLOSE DATASET 'p_spfli04'.
    ENDIF.
    OPEN DATASET 'P_SPFLI02' FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    LOOP AT T_TABLE INTO FS_TABLE.
    TRANSFER FS_TABLE TO 'p_spfli04'.
    ENDLOOP.
    CLOSE DATASET 'p_spfli04'.
    *ENDIF.
    OPEN DATASET 'p_spfli04' FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    LOOP AT T_TABLE INTO FS_TABLE.
    READ DATASET 'p_spfli04' INTO FS_TABLE.
    APPEND FS_TABLE-CHAR TO T_TABLE1.
    ENDLOOP.
    Here is the sample code to download and upload the file onto presentation server and then using OPEN DATASET you'll be able to transfer the data to APPLICATION SERVER....
    Regards,
    Pavan P.

  • Centralized Database and Application Control

    Hi,
    I am looking for idea to centralized control software to manage (start/stop/display status) oracle database, oracle application or other component on unix box, it become harder to manage database (i.e. which command, where is database location/server name) when in organize have lots of database/application/server/version to manage. How is it managed from other people, idea is appreciated.
    Thank you.

    And I assume that you are familiar with all the Enterprise Manager plug-ins that let you monitor non-Oracle systems from Enterprise Manager.
    If you are looking for enterprise management software that has no relationship to Oracle, any enterprise software company is likely to have something for you. But if you specifically want to exclude Oracle's offerings I'm not sure why you would post this request in an Oracle forum. Surely, if you want to use HP software or IBM software or some other vendor's software, it would be more appropriate to post in a HP forum or an IBM forum...
    Justin

  • How to improve database and application performance

    Hi,
    Any body please help me out that how can we improve the database and Application performance.
    Regards,
    Bhatia

    bhatia wrote:
    Hi,
    Any body please help me out that how can we improve the database and Application performance.
    Regards,
    Bhatiathere is no simple answer. There is no DATABASE_FAST=TRUE initialization parameter. There are a myriad of reasons why an application is performing poorly. It could be that the application (code and data relationships) is poorly designed. It could be that individual SQL statements are poorly written. It could be that you don't have enough cpu/memory/disk bandwidth/network bandwidth.
    You need to determine the root cause of poor performance and address it. If you application is poorly designed, you can tune the database until the cows come home and it won't make any difference. If you are trying to run 100k updates per second against a database hosted on hardware that only meets minimal requirements to install Oracle ... well, hopefully you get the picture.
    First, go to tahiti.oracle.com. Drill down to your selected Oracle product and version. There you will find the complete doc library. Find the Performance Tuning Guide
    Second, go to amazon.com and browse titles by Tom Kyte and Cary Milsap. I particularly recommend "Effective Oracle by Design" and "Optimizing Oracle Performance", though I see a lot of new titles that look promising (I think I'll be doing some buying!)

  • Differences in the characterset used by the database & Oracle Applications

    Hi All,
    I have encrypted one column in the database using Oracle DBMS_OBFUSCATION tool package.When the same field is viewed from the application the characters appear different from those that are there in the database and also sometimes the value is truncated from the applications.
    Could anyone please help me understand why it is happening.
    Is there any difference in the characterset used by the database & Oracle Applications ??
    Please help me ASAP.
    Thanks in Advance,
    Aush

    What I mean by the characters displayed on the form in the Oracle Applications is different from the database value is that suppose the value in the database is 8¿x¿"h the characters(part of the string) displayed in the form are different from what is present in the database.

  • Script to know number of users over database and applications.

    hi brothers.
    kindly i need helpl to know script or command of number of online users over database and application.(i need it for performance issue).
    Message was edited by:
    user633617

    set pages 100
    set lines 3000
    col machine format a25
    col username format a15
    col program format a25
    break on 1;
    set heading off;
    select
    'Sessions on database '|| d.name ||' having instance name '|| i.instance_name
    from v$database d,v$instance i;
    set heading on;
    compute sum label 'Total Sessions' of sessions on 1
    select
    1,username,machine,program,count(*) sessions
    from v$session
    group by username,machine,program
    order by username,sessions desc;

  • FW: ADF BC4J unable to connect to database on Application Server 10.1.3.1.0

    Please see ADF BC4J unable to connect to database on Application Server 10.1.3.1.0

    Hello Steve. I'm getting the same error message as Carlos got when he tried to fire up the SRDemo. Following logon the splash screen has this error message:
    Error
    Failed to checkout SRService application module. Ensure your datasource name is SRDemo [case-sensitive!] and that connection settings are properly defined for a database with the SRDEMO schema installed. See server log for more exception details...
    Apparently you guys have figured out a fix for this, but my command of JDeveloper/J2EE jargon is pretty limited at this point in my learning curve. (I've heard about Jndi, but have no idea what it does). Is there a statement I can add to the web.xml file that will fix this? If so, what is that statement, and where does it go in web.xml?
    Thanks in advance.

  • Agents for database and application servers

    hi all,
    I have to go to a client site this week to install Gagents onto some database servers, some will be RAC and some application servers. it is on AIX. are there different agents for database and applications? In a RAC cluster do I need an agent per node?
    rgds
    alan

    When installing agents in a cluster (read - RAC), during the installation, on one of the screens, you will have the option of picking up all the nodes in the cluster. Else, if you are using a push or agent deploy method, you just have to pass the correct flag (can't remember) and then list all the nodes in the cluster.
    To your other questions, you do not need different agents for database, and app servers etc. The only time you would need different agents is when you are installing on different platforms.

  • Architecture types to achieve application isolation,scalability,HA, etc

    Hello,
    Can someone please point me to a document/material for different architecture types and best practices for weblogic architectures? Like different architecture types to achieve application isolation,scalability,HA, Clustering, etc
    Edited by: user9021545 on Mar 18, 2011 10:51 AM

    We have several pieces of documentation that cover this type of thing.
    Here's the Fusion Middleware High Availability Guide:
    http://download.oracle.com/docs/cd/E14571_01/core.1111/e10106/toc.htm
    and some high level topologies:
    http://download.oracle.com/docs/cd/E14571_01/core.1111/e10106/busreq.htm#CHDEECIG
    And WebLogic Server specific HA information:
    http://download.oracle.com/docs/cd/E14571_01/core.1111/e10106/aa.htm#CFADJHAC
    That's probably as good as place as any to start with and hopefully gives you something to work with.
    -steve-

  • Automaticallu restart ebs 11i database and application services on rhel5

    Hi,
    I have installed ebs 11i on rhel5.
    Pls advice hot to automatically start services(database and application) after system restart.
    Thank you in advance,
    Denis

    Hi,
    Please see these threads.
    Autostart of Services
    Re: Autostart of Services
    Auto Start Oracle Services didn't work
    Auto Start Oracle Services didn't work
    Regards,
    Hussein

  • MAP Database to Application Mapping

    Experts,
    Can MS MAP(Microsoft Assessment and Planning ) tool be used to extract database to application mapping information for an environment.
    If yes, would it be able to extract info for MS Applications only or all the applications.
    Thanks

    Hi, 
    the MAP is possible to collect information from other software besides MS, for this you must install the SQL Management Studio, Connect the MAP Database "(localdb) \ maptoolkit" and execute the query.
    Do not forget to mark as resolved
    SELECT AllDevices_Assessment.HardwareInventoryCore.ComputerName,Win_Assessment.WindowsInstalledSoftwareFull.Name,Win_Assessment.WindowsInstalledSoftwareFull.Version,Win_Assessment.WindowsInstalledSoftwareFull.InstallLocation
    from AllDevices_Assessment.HardwareInventoryCore
    INNER JOIN Win_Assessment.WindowsInstalledSoftwareFull on (Win_Assessment.WindowsInstalledSoftwareFull.DeviceNumber = AllDevices_Assessment.HardwareInventoryCore.DeviceNumber)
    WHERE Name LIKE '%%'
    AND Name NOT LIKE '%Flash%'
    AND Name Not Like '%Reader%'
    ORder by ComputerName
    Virtual Machines 
    select AllVirt_Assessment.VirtualizationAssessment.ComputerName,AllVirt_Assessment.VirtualizationAssessment.VmachineType,AllVirt_Assessment.VirtualizationAssessment.VmTechnology,AllVirt_Assessment.VirtualizationAssessment.MachineStatus,HyperV_Inventory.HostGuestDetails.GuestName,Win_Inventory.Processors.NumberOfCores,
    Win_Inventory.Processors.NumberOfLogicalProcessors,Win_Inventory.ComputerSystemProduct.Name,ISNULL(AllDevices_Assessment.CategorizedDevices.IsVirtual,0) AS IsVirtual
    from AllVirt_Assessment.VirtualizationAssessment
    inner join AllDevices_Assessment.HardwareInventoryCore on AllDevices_Assessment.HardwareInventoryCore.DeviceNumber
    = AllVirt_Assessment.VirtualizationAssessment.DeviceNumber
    inner join HyperV_Inventory.HostGuestDetails on HyperV_Inventory.HostGuestDetails.DeviceNumber = AllDevices_Assessment.HardwareInventoryCore.DeviceNumber
    inner join Win_Inventory.Processors on Win_Inventory.Processors.DeviceNumber = AllDevices_Assessment.HardwareInventoryCore.DeviceNumber
    inner join Win_Inventory.ComputerSystemProduct on Win_Inventory.ComputerSystemProduct.DeviceNumber = AllDevices_Assessment.HardwareInventoryCore.DeviceNumber
    inner join AllDevices_Assessment.CategorizedDevices on AllDevices_Assessment.CategorizedDevices.DeviceNumber
    = Win_Inventory.ComputerSystemProduct.DeviceNumber
    Printer
    Select AllDevices_Assessment.HardwareInventoryCore.ComputerName,[Unused].[Printers].DeviceId
    from AllDevices_Assessment.HardwareInventoryCore
    inner join Win_Inventory.NetworkAdapterConfigurations on Win_Inventory.NetworkAdapterConfigurations.DeviceNumber
    = [Win_Inventory].[NetworkAdapterConfigurations].DeviceNumber
    inner join Unused.Printers on (Unused.Printers.DeviceNumber) = AllDevices_Assessment.HardwareInventoryCore.DeviceNumber 
    where [Unused].[Printers].DeviceId like 'HP%' or [Unused].[Printers].DeviceId  like 'EPSON%';
    Lucas Simoes Rezende MCP, MCTS , ITIL V3

  • Database Design/Application architecture question

    I'm working on a Java web app that includes creating a database from scratch. The UI needs to model a mostly static set of choices that led to other choices that lead to other choices..... I'm trying to figure out how to model this in a table or set of tables and how to design the UI and servlet interaction. Here's an example, in Petstore lingo:
    Do you need a dog house?
    For a small dog?
    Red?
    Blue?
    How many?
    For a big dog?
    Brown?
    Yellow?
    How many?
    Side windows?
    Do you need a bird cage?
    How many water dispensers?
    For big bird?
    This sort of multiple dependent options seems hard to model in a database. I'm trying to do this at the database level so that I can have a dynamic front end, in which I get the collection of options and then use JSTL to populate the UI with the chocies for whatever level or step I'm at. Any suggestions? I haven't had to solve a design problem precisely like this where some choices may have dependent choices, but others do not, and some have dependent choices which have very specific dependent choices that have very specific dependent choices. Thanks.
    Ken

    I'm working on a Java web app that includes creating
    a database from scratch. You mean the UI drives creating the database?
    Why?
    That is often driven by developer rather than business requirements and is often a bad idea. It is often done solely so the developer doesn't have to type as much. And not typing very much is solved by code generation while using meta data solutions for it is usually a bad maintainance idea.
    But if you need to then you create meta data.
    Table TheValues
    - Field: Value Id.
    - Field: Value Name
    - Field: Value Value
    Table: Collection
    - Field: Collection Id
    - Field: Collection Name
    Table: Link table
    - Field: Collection Id
    - Field: Id type
    - Field: Id (Collection or Value)
    Display values can be kept in another table or used directly.
    Notice that a collection can contain another connection.
    You can combine the first two tables as well.

  • Which Architecture of the deployed application (two/ three/ four tier)?

    Hi iam subbu
      iam using in the server windows 2003  Oracle Application Server 10g Relase2(10.1.2.0.2),Database is Oracle Database 11g Enterprise Edition Release 11.1.0.7.0
    in client machine we accessing the  url primary server formweb.config .may i know how would i know which architecture deployed the application help for this.
    thanks,

    Webforms such as Forms 10g and onward use a 3 Tier architecture: https://en.wikipedia.org/wiki/Multitier_architecture#Three-tier_architecture
    cheers

  • Building mysql database driven application using JSF

    hello
    i have to build a JSF application that uses a connection with a MySql database
    first the user fills in a booking form, then he clicks on the button submit to save his operation
    where should i place the code to connect with the database?
    i mean the following:
    DataSource ds=(DataSource) new InitialContext().lookup("java:comp/env/jdbc/DreamsBeachDB");
    Connection c= ds.getConnection();
    Statement st = c.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
    String req="insert into  ...";
    +int exec = st.executeUpdate(req);
    should it be in a method of the managed bean or in a ActionListener class?
    in the first case where is the controller of the MVC2 architecture?
    in the second case how can i retrieve the values of the managed bean?
    thank you for answering

    You should use a persistence framework like Hibernate or EJB 3.

Maybe you are looking for

  • Terms of Payment Due date as Tuesday Every Week.

    Dear Gurus, I was trying to figure out a term of payment by the following rule: If the invoice was posted on Nov 2009, the due date shall be From  Nov 2 to 8: Due date is Dec 22 (Tuesday) 47 days pasted. From Nov 9 to 15: Due date is Dec 29 (Tuesday)

  • Supplier Due Payment / Ageing report

    Dear All , Can i have a report in SAP about supplier due for payments in SAP ? Pl guide Regards

  • IPhone Contacts won't sync with iCloud

    Hi! I have my Macbook Pro and iPhone 4S synced with iCloud, so everything I do in one device shows up in the other. About 2 days ago I noticed my iPhone contacts were not syncing with iCloud. Calendars, Notes, etc. is syncing and the Macbook Pro is s

  • FCP project to DVDSP4??

    I converted the FCP project to "MPEG-2" in Compressor like a lot of you recommended. The video played well, but there was no sound. Did it not convert audio? How can I include the audio? What setting do I have to use in Compressor so I can convert my

  • Lenonvo T440 with Intel SSD SC2BF240A4L - failing to install apps via SCCM 2012 task sequence

    Hi there Wondering if anyone else has encountered this issue with a T440 with Intel SSD hard disk. Our firm purchased two Lenovo T440 laptops. One has a magnetic hard disk, the other a SSD hard disk. Here are the models: SSD hard disk:           Inte