Simplest approach for creating database for small collection of data - new project design phase

Hello. I am at the design stage of a VB.NET project, which I hope will help me strengthen some skills I have learnt so far, and learn new ones. I have a couple of questions. Firstly regarding data types, is there a unified, standardised, all-convergent
data type available I can use? Secondly I've read about numerous avenues to create a database, namely binary serialisation, access-based, excel-based, notepad-based - The project I intend to create, will only require storage of a "relatively" small
collection of data, which may grow over time, but not significantly - so, taking this into account, which method is advisable for creating my database? (a beginner-friendly option is preferred). I have included a couple of images, with my questions, to give
a rough idea of what I'm planning to do. Thanks for your advice and suggestions.

Type would be the type of recording, as in LP (Long Play - standard album), EP (Extended Play) or Compilation. Most would be LP.
Chris,
I have a start on this and I want to pause here to post what I have and to discuss it.
There’s a lot to talk about because you’re going from little knowledge of a class to a lot in a hurry. There is no real hurry
in any of this; if you don’t understand then let’s stop and talk about it – until you fully have a handle on it, adding more would only fuel the confusion.
I’ll add this at this juncture: There is no one single right way to do this. There are definitely some
wrong
(or maybe just simply ineffectual) ways, but certainly no single right way. A lot of what you’ll see in the following will reflect my preference; nothing more than that.
Also though, I’m doing some of this to expose you to it. By that I mean that I may or may not have done it this way all along,
but I decided that I want to open the doors, even though at first it’ll seem like you’re trying to get a drink of water from a fire hydrant. ;-)
I have it set up with two namespaces: CMJR and Common. The latter one is for use for what I’m considering to be a ‘common’ need
– things that you may use in several classes. In time, the routines for serialization will be there but no need to even talk about that now so it’s not there.
The code so far (which I’ll show by the end of this discourse) is about 500 lines. For a class library, that’s puny! Most of
what I have thus far is just a shell of what will be filled in later. I won’t at all be surprised that by time this is completed, that 500 lines can easily grow to 5000 lines or more.
Like I said yesterday, the great thing about doing it this way is that it’s done
your
way; the drawback is just how much there is to do though, so if nothing else, this will perhaps influence your decision on how you want to handle things like this in the future.
The namespaces/classes are laid out as:
CMJR
Music (a class)
Film (a class)
Games (a class)
Common
IDataSource (an interface)
IGenre (an interface)
Utilities (a class)
This
image shows the structure of things thus far. The reason why the enum “GenreType” isn’t expanded in that
image is because it’s hugely long! In fact I fully expect that you’ll likely delete most of those. I got them from someone else’s class library (about a decade ago) so it was convenient to use.
Let’s start from the inside and work toward the outside here:
What is an
enum?
An enum (enumeration) is a type all its own. It’s a constant (of integral type) that you define. You can think of it as “an
integer with a name associated with it” because in code, you’ll use it like a multiple-choice selection and [typically] you’ll use its name.
Any time there’s a need for some something to be “this or that”, an enum very often is a useful type to use. In what we talked
about yesterday regarding what the source of the data is (CD or PC), that’s what came to mind; select which of the two from an enum. I always include a “_String” property with these so that it can later be used in whatever will consume the class. Often it’s
nothing more than use the .ToString method of the enum itself, but remember that then enum is actually an integer, not a string.
In this library so far, I have three enums defined. Two of those are in each of two interfaces (discussed in a bit) and one
is specifically related to only the music, so it’s in the class “Music”:
       Public Enum MusicFrom
           LP
           EP
           Compilation
       End Enum
The “type” that I asked about earlier is encompassed in that enum and you can more or less see how it works without any further
explanation.
Do understand that enum is only ‘useful’ for programming. We could use strings for all that it matters, but the problem with
doing that are many, including things like typos and capitalization. That’s not the case with an enum because you select one of the choices offered. In the one above, that would be either LP, EP, or Compilation. It can’t be anything else.
So if strings have this issue with typo’s and the like, what about if we just assigned it a number (an integer). Sure that’s
a better idea but are you really going to remember what 23 means? I doubt it, or not for long.
BUT – if we had a number that has a string associated with it, yea that’s a good idea!
Right! Now you know what an enum is. ;-)
Notice from the
class
diagram though – it’s not shown; I’m not using it all and that’s because I question its worth here, at least
for the current setup. I’ll explain what I mean:
As it’s currently set up, the basic unit of the class “Music” is a song. Even though there’s a title for the album, the album
– as a type – doesn’t exist. LP, EP, and Compilation refer to the album, not the song (in my opinion here) so I don’t see how it can be used.
If, however, we create a new type called “Album”, then I can see how it could be used. In something I worked on a while back
that’s exactly how I have it set up: An album is a “container for songs” and the album (a class in what I’m referring to from a few months back) has certain properties like a name and cover art, etc..
I don’t have this set up that way, but give that some thought.
What is an
interface?
Until quite recently I ‘knew of them’ but I never used them. There may or may not be merit in it here either but I wanted to
expose you to them.
From that link above:
“An
interface defines a set of members, such as properties and procedures, that classes and structures can implement. The interface defines only the signatures of the members and not their internal workings.”
The interface is a way in which you create a ‘code contract’. You don’t define what the methods, properties and events do in
the interface – you define that they have to be implemented if a class uses it.
It’s up to the class to actually put it to use (i.e., the code that’s executed in the member of the interface).
It’s a lot deeper than I’m discussing here – including a fair amount of ambiguity – so I won’t go any further than that for
now.
I have two interfaces set up and I have them in the “Common” namespace. They are “IDataSource” and “IGenre”.
IDataSource has an enum named “SourceType” and two read-only properties (see it later in the code).
The interface IGenre is likewise set up the same way and that’s where the long list of elements are in the enum named “GenreType”
that I talked about earlier.
I think it’s a good idea with Genre that it’s a “pick one of these” rather than simply a string and here’s why: If we later
add in a method to choose songs from a collection of them, one of the options might be of a particular genre. That’s not an uncommon request I would think. By using an enum, we don’t have to worry about your users mistyping when they add the data:
RockAndRoll
Rock and Roll
Rock
…etc., and imagine some of the typos your users might come up with, so by using an enum it’s definitive rather than guessing.
I said that an enum is ‘only for programming though’ so we’ll need to make it more usable later on. For example, I can also
build in methods to hand you back a string array of the string equivalent of those enums and then later a method to turn that string back into the actual enum member. By doing this then the method(s) which will use this will filter the data from the collection
to only include those with that particular genre.
Other than something simple, I’ve learned that once you get involved in a really long enum – like the genre that I showed above
– it’s better to create a class which, all on its own, has methods for handing you the string array and then handling the conversion back to an enum, so that’s a possibility too.
That’s for use in your UI so the blinders will start to come off at that point. ;-)
Continued in a subsequent post…
Still lost in code, just at a little higher level.

Similar Messages

  • Create  of (demo for)OVAI (transaction for create entries for each vendor)

    hi all,
    can anyone plz tell me how 2 create (demo for)OVAI (transaction for create entries for each vendor)
    thans & regards,
    srinivas reddy.

    hiii
    yes you can call transaction like that..take tcode in that parameter then you can use it in your program with statement like
    call transaction (variable)..in background process.
    regards
    twinkal

  • Best workflow for creating games for pc and starling games in AIR

    best workflow for creating games for pc and starling games in AIR.
    I need to develop for tablets with starling and AIR as well as for pc without starling ie: downloading from a server.
    In starling you have to
    1. instantiate starling
    2. use texture atlases for loading graphic assets - well its the recommended way
    3. use juggler
    etc...
    ie: with all these differences is it best to:
    1. create completely different projects
    2. just create different classes for the starling specific parts
    3. use a conditional compile constant
        eg: CONFIG::STARLING
                "then do this"
    or      CONFIG::CPU
              "then do this"
    I currently have the latter but it feels a little messy. I would prefer separate classes for each platform where the image loading is concerned.
    There must be so many game developers out there but in large gaming companies that know exactly what to do. Perhaps you can point me in the right direction with a book or something.
    CHEERS

    The other thing is that I can't see the games being very different as you suggest. I have downloaded Lee Brimelows tut on creating a starling game on Lynda.com and the code is great for creating games using states for menu, play, gameover etc... The only difference is that he uses texture atlas and there is a great difference in loading them etc... so technically you would only need to handle them in a different class as collision and the rest of game play should be the same in both. I think!!!
    Well, actually not exactly but near enough - maybe it might be easier to create separate projects and just cut and paste the new code introduced.

  • Free Report Writer for Oracle Database except Crystal Report and Data Vison

    Dear All,
    I want Free Report Writer for Oracle Database except Crystal Report and Data Vision software.
    Wr are working on Linux and windows both platform.
    Any one have direct link or website address for it ?
    Regards,
    Vipul Patel
    Ahmedabad

    Please check the following link -
    http://www.google.co.in/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&q=open+source+report+writer+for+oracle&meta=&btnG=Google+Search
    Regards.
    Satyaki De.

  • Where can I download the agent for 11g database for 10.2.0.4 grid control?

    where can I download the agent for 11g database for 10.2.0.4 grid control? i can't find the link.

    I don't think there is one yet, but you can use Grid Control 10gR4 to monitor a 11g database. Please refer the certification matrix in Note 412431.1 Oracle Enterprise Manager 10g Grid Control Checker

  • Is db_name is the only parameter for creating database ? [Exper. on 32-bit]

    Because of the discussion present in the following thread, I did few experiments and would you like to share with you. Hope it is a useful information for you guys.
    Re: db_name & memory allocation
    OS: Win XP SP2 or Windows 2000 <b>(32-bit)</b>
    Oracle Version: Oracle 10gR2
    System RAM: 1G
    <b>Attempting to create the database CCC by specifying db_name parameter only</b>
    C:\oracle\product\10.2.0\db_1\database>copy con initCCC.ora
    db_name=CCC
    ^Z
            1 file(s) copied.
    <b> Starting the service </b>
    C:\oracle\product\10.2.0\db_1\database>oradim -new -sid CCC -startmode m
    Instance created.
    C:\oracle\product\10.2.0\db_1\database>set oracle_sid=CCC
    C:\oracle\product\10.2.0\db_1\database>sqlplus "/as sysdba"
    SQL*Plus: Release 10.2.0.1.0 - Production on Fri Apr 6 07:50:06 2007
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to an idle instance.
    SQL>
    SQL>
    SQL> startup nomount
    ORACLE instance started.
    Total System Global Area  <b>113246208</b> bytes -- Default SGA size
    Fixed Size                  1247588 bytes
    Variable Size              58721948 bytes
    Database Buffers           50331648 bytes
    Redo Buffers                2945024 bytes
    <b> On seeing dynamic components size, shared pool got
    33m, large pool got 0m, java pool got 25m and buffer cache
    got 50m. Please check the references for these default
    values. </b>
    SQL> select component,current_size from v$sga_dynamic_components;
    COMPONENT                                                        CURRENT_SIZE
    shared pool                                                          33554432
    large pool                                                                  0
    java pool                                                            25165824
    streams pool                                                                0
    DEFAULT buffer cache                                                 50331648
    KEEP buffer cache                                                           0
    RECYCLE buffer cache                                                        0
    DEFAULT 2K buffer cache                                                     0
    DEFAULT 4K buffer cache                                                     0
    DEFAULT 8K buffer cache                                                     0
    DEFAULT 16K buffer cache                                                    0
    COMPONENT                                                        CURRENT_SIZE
    DEFAULT 32K buffer cache                                                    0
    ASM Buffer Cache                                                            0
    13 rows selected.
    <b>Total=109051904 </b>
    SQL>
    create database
    ERROR at line 1:
    ORA-01092: ORACLE instance terminated. Disconnection forced
    <b>Errors in alert log file</b>
    ORA-00604: error occurred at recursive SQL level 1
    <b>ORA-04031: unable to allocate 40 bytes of shared memory ("shared pool","create unique index
    i_proxy_...","sql area","kksol : kksnsg")
    </b>
    Error 1519 happened during db open, shutting down database
    USER: terminating instance due to error 1519
    <b>It was thought that shared_pool memory area is not
    sufficient. Then thought to know how oracle will behave on
    setting sga_target parameter.</b>
    <b>initCCC.ora</b>
    db_name=CCC
    sga_target=113m
    SQL> startup nomount
    ORACLE instance started.
    Total System Global Area  <b>121634816 bytes -- Got around 121m  </b>
    Fixed Size                  1247636 bytes
    Variable Size              54527596 bytes
    Database Buffers           62914560 bytes
    Redo Buffers                2945024 bytes
    <b>Now create database statement got success here.
    Instance got few extra Mbs of memory and oracle can create
    the database.</b>
    <b>Then it was thought that, why to give 121Mb even. Let exactly 113246208 bytes be devoted to the instance.</b>
    initCCC.ora
    db_name=CCC
    sga_target=113246208 -- providing exact number of bytes as obtained in default case
    SQL> startup nomount
    ORACLE instance started.
    Total System Global Area  113246208 bytes
    Fixed Size                  1247588 bytes
    Variable Size              54527644 bytes
    Database Buffers           54525952 bytes
    Redo Buffers                2945024 bytes
    SQL>
    <b> Now create database statement got success here as
    well. Because of sga_target, automatic shared memory
    management enabled and instance was taking care of buffer
    cache, shared pool, large pool, java pool and
    streams_pool. In this case shared pool got 46m (greater
    than default case value). Java pool and Large pool got 4
    mb each and buffer cache got 54m. </b>
    SQL> select component,current_size
      2  from v$sga_dynamic_components;
    COMPONENT                                                        CURRENT_SIZE
    shared pool                                                          46137344
    large pool                                                            4194304
    java pool                                                             4194304
    streams pool                                                                0
    DEFAULT buffer cache                                                 54525952
    KEEP buffer cache                                                           0
    RECYCLE buffer cache                                                        0
    DEFAULT 2K buffer cache                                                     0
    DEFAULT 4K buffer cache                                                     0
    DEFAULT 8K buffer cache                                                     0
    DEFAULT 16K buffer cache                                                    0
    COMPONENT                                                        CURRENT_SIZE
    DEFAULT 32K buffer cache                                                    0
    ASM Buffer Cache                                                            0
    13 rows selected.
    <b>Total=109051904 </b>
    SQL>
    By providing 113246208 bytes (as in default case) of
    memory to SGA by setting sga_target value, Oracle gave
    extra memory to shared_pool and buffer cache than in case
    of default, thus helping create database statement to get
    pass. Oracle always recommends to use automatic shared
    memory management by setting sga_target parameter value.
    Hope this experiment provides few clues about automatic
    shared memory management feature of Oracle 10g. This case
    was conducted on 32-bit Oracle. It is quite possible that
    create database statement might get success in 64-bit
    Platform as by default Oracle will provide 84 Mb to Shared
    pool. But to confirm, it has to be experimented.
    References:
    Shared pool
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams196.htm#sthref804
    Large Pool
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams090.htm#sthref377
    Java Pool
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams087.htm#sthref364
    Buffer Cache
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams043.htm#sthref185

    Hi,
    Good Work Mohammed !!!
    Regards
    Taj

  • Manual script to create database for Access Manager installation

    Hi,
    Is it possible to perform new installation on OAM Access server in the database using manual methods (By running specific scripts). Without using GUI method to create the component databases?
    The databases for the OAM will be manually created, What are the list of scripts that needs to be run against the database which are responsible for creating the "OAM-Coreid Access" component?
    Does not find the informationin the installation guide.
    thanks in advance.

    Hi Franck,
    I have found the script(rw_server.sql). I want to known who will be the owner of objects which i will create with this script.
    Can you explain me this sentence:"
    alternatively just uncomment the references in rp2rro.pll."
    Thank you for your help.
    TYAG

  • Possible for using profiler for creating workload for Database Engine Tuning Advisor in case of SSRS reports

    I have SSRS reports with each 5 parameters. Parameter datasets includes statements like WHERE @CategoryKey
    I have 20 tables in SQL Server. We don't have OLAP cube.
    I have created SQL Server Profiler trace. I have clicked all reports during process.
    I have opened Database Engine Tuning Advisor.
     I have selected all tables to Tune.
     Tuning options are Indexes/No Partitioning/Keep all existing PDS
    Result is following:
     14% improvement
     10 recommendations (8 statistic for Calender table and 2 index for Calender)
    Tuning logs:
    S008 exec sp_executesql N'  LongSQLStatment including IN (@CategoryKey) Event does not reference any tables
    S007 Replaced event exec sp_executesql
    My question is that why I did not get any recommendations for other tables that Calender?
    Could it be because of SSRS parameters like @CategoryKey?
    Is it possible at all to use SQL Server profile for creating workload in case of SSRS reports with parameters?
    I have tables and reports like ProductSales, which I suppose should be get indexedbecause of WHERE statements.
     I have where statement like Month and Category and Color.

    Yes it is possible to capture a trace using profiler, but please provide the t-sql behind your dataset before I can answer your question about the DTA recommandations.
    Regards
    Rasmus Glibstrup
    http://blog.sqlguy.dk

  • Listener pre-requisite for create database using dbca

    Hello All:
    Oracle binaries successfully installed using dbca (Advanced Installation, Custom, Install DB software only)
    Now when i use dbca to create a database, i have noticed one of the screen prompts me to "Select the listeners for which you want to register the database".
    Question:
    Do we have to create the listener before we create the database so we can register the database.
    Is this a standard step asking us to register the database with the listener or we can get along with the create database without having to create the listener ahead of the database creation.
    Is this step asked because of the type of install i choose earlier for binaries using dbca (Advanced Installation, Custom, Install DB software only)
    Thanks
    San~

    sannidhi wrote:
    The screen doesn't let me go on to the other screen without making a selection. That is the reason i was wondering if it has been tied up the the install options you choose when you install software only.
    Thanks
    San~I don't have dbca in front of me at the moment, but does it present you with a list from which to choose? If so, is one of the choices 'listener' or 'default'? If so, choose one of those.

  • How to Extract CREATE DATABASE for 10g?

    I've seen utilities that will re-create the full 'CREATE DATABASE' syntax for a 8i or 9i database. I'd like to do the same thing for 10g that understands the features of 10g like SYSAUX and other new features. I looked at DBMS_METADATA but it doesn't really cover the CREATE DATABASE syntax.
    Has any seen a routine to extract CREATE DATABASE syntax for a 10g database?
    -Crispin

    Hi,
    have you tried by using dbca?
    Create a new template from existing db..
    Acr

  • Special characters in password for "create database link"

    It seems that one cannot create a DB link if the password has a special character in it (like '!')?
    create database link MYLINK connect to SOURCE identified by mypwd! using 'MYDB'
    - returns "ORA-00933: Command not properly ended"
    create database link MYLINK connect to SOURCE identified by values 'mypwd!' using 'MYDB'
    - returns "ORA-00988: missing or invalid password(s). This is the syntax that works in "create user".
    Nikolai

    1* create database link MYLINK connect to SOURCE identified by "mypwd!" using 'MYDB'
    SQL> /
    Database link created.
    SQL>
    Joel Pérez

  • Procedure for Standby Database for SAP ERP 6.0

    Hello All,
    We are using SAP ERP 6.0 with Oracle 10g with AIX 5.3.
    We are planning to setup a standby database for our SAP ERP 6.0 production system as part of remote DR site using Oracle Data Guard.
    I was under the assumption that i can first install an erp 6.0 (ABAP) system using homogeneous system copy from my erp 6.0 (ABAP) production system and then start configuring oracle dataguard.
    But the System Copy Guide "System Copy for SAP Systems Based on SAP NetWeaver 7.0 SR3 ABAP" has mentioned that "You cannot create standby systems with a system copy".
    Please suggest the best practise or the procedure for creating standby database for SAP ERP 6.0 system. Iam not looking at the steps for creating a pure oracle 10g standby database, but with SAP instances as well.
    Thanks in advance.
    CVS

    Hi,
    Please refer the below mentioned link for configuring data guard.
    http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10823/create_ps.htm
    Below mentioned are the sequence of stpes, which needs to be followed for setting up data guard.
    3.1 Configuring the Primary Database
    3.1.1 Enable archiving and define a local archiving destination
    3.1.2 Create a password file
    3.1.3 Configuring the Oracle networking files
    3.1.4 Set initialization parameters on the primary database
    3.1.5 Take Offline/Online backup of the primary database
    3.1.6 Create a control file for the standby database
    3.1.7 Prepare initialization parameter file for the standby database and start the primary database with the changed pfile.
    3.1.8 Copy all files from the primary host to the standby host
    3.2 Configuring the Standby Database
    3.2.1 Configuring the Oracle networking files
    3.2.2 Create a INIT parameter file for the standby database
    3.2.3 Copy the standby controlfile to the appropriate location
    3.2.4 Create Oracle Password File
    3.2.5 Start the physical standby database
    3.2.6 Initiate log apply services
    Regards,
    Ranjith

  • Seeking Software for Creating Manifest for Sequenced SCOs

    Can anyone make a recommendation for software to create the
    manifest for a SCORM 2004 course with complex sequencing? I am
    constructing a course that is made from multiple SCO's that are
    created in Captivate 3 and intended to be played linearly. The
    course should launch the SCO's in the appropriate sequence as
    determined by the "open new project" instructions at the end of
    each project. We do not want to hand-code the entire manifest. I
    have many courses that will use this same approach. I have heard of
    Manifest Maker softwares out there for SCORM 1.2 and Dreamweaver,
    but can't seem to find one for SCORM 2004. Trying to exhaust all
    possibilities before replacing Captivate or redesigning entire
    course.
    (I found this posting on another forum and borrowed the
    language to make sure I was getting the important points across -
    desperately hoping the right people see this and have the answer
    we're looking for!) Thanks.
    Marcia

    I use reload-editor,
    easy to use, friendly interface and...free.
    Good luck,
    Marc

  • Cw 9.5 for creating plugins for adobe indesign cs2 in mac 10.4.8

    i am new to plugin creations.please anyone give me an basic idea of creating plugins for adobe indesign cs2.
    and how to debug the plugin, how to create it using code warrior 9.5, if any one know the site reference please inform me.
    thanks in advance
    subha

    i am new to plugin creations.please anyone give me an basic idea of creating plugins for adobe indesign cs2.
    and how to debug the plugin, how to create it using code warrior 9.5, if any one know the site reference please inform me.
    thanks in advance
    subha

  • T code for creating font for smartform

    Hi All,
      please give the transaction for creating <b>FONT</b> which is to be used in smartforms.
    Regards
    Anil Kumar K

    hi anil,
    goto transaction 'SMARTSTYLES' from the control bar .
    in here u an set the font family , font size ,font style like bold, italic etc.
    after setting the font use the same in smart forms .
    note: assign the same in the transport request of the smart form cause if the release status is gone wrong then the font will cause problems.like if u r familiar with scripts u will understand..
    vijay.

Maybe you are looking for

  • 10.5.8 Server Software Update Server and 10.6.4 clients getting error

    I'm running Software Update Server on an Intel XServe 10.5.8 OS. When I try to run software update from 10.6.4 client I get the following error: +The Software Update Server (su.MYSERVERNAME.org) is not responding.+ +Check to make sure your network co

  • Logical column using union

    Hello All, I have posted a similar thread before,now the requirement is little different ,so i am posting as a new thread I have a column organization code with values 1000,1001,1002,1003,1004,1100,1101,1200,1201,1300,1301 .... My customer asked me t

  • Some weblogic real time questions....

    Hi All, Have some weblogic related real time questions. I am posting them below. I would appreciate you kind replies to them. if two managed servers is there Same Domain is configured in both servers, but one physical server is crashed then how can y

  • Error 404 - Requested resource is not available

    Hi all, I have a Web application. It just contains 1 file index.jsp (i just want to test) Actually, when i run the Web application as a stand alone application then it works. But when i add this application to an Enterprise application, then run the

  • BAPI to update/change the accounting document

    Hi all, Is there any BAPI to update or change the accounting document. I am aware of the BAPI_ACC_DOCUMENT_POST which is used to post the document. Please reply soon. Thanks and regards, Anishur