Where should I have the create table

I am making an application which it has a customer, an order and a food objects.
I know that I can do it in one class (which will have main inside) but I am trying to make it as object oriented..
so.. I have to make a class for a customer, a class for food, and I will handle all this in another class which will have main method..
am I right up to here??
if yes I was now wondering where should I have the sql statment about creating the table.. my thought is to have it at the constructor so when I will make a customer object the table will be created..
then I will have an add_data(d1,d2,d3,d4....) method where I will insert the data to my database for each customer.. actually only one time I will make a customer object from main and then through this I will call add_data() method to add customers to my database..
Am i thinking right or I am too far away from what I must do...?
Thx

Doesn't particularily matter given that the application is small.
However in larger applications the database is created outside of the application usually using a SQL script.

Similar Messages

  • Where the created table will be saved and in what format?

    Hi,
    Plz let me know , where the created tables in oracle 10g will be stored and what will be file format? and how to copy created tables from one system to another.
    Regards

    799707 wrote:
    Hi,
    Plz let me know , where the created tables in oracle 10g will be stored and what will be file format? and how to copy created tables from one system to another.
    RegardsAn individual table is not stored in an individual file. Oracle is far more complex than that. Actually, even MS Access is more complex than that.
    A table is a logical structure that is stored in a "tablespace". A tablespace is, itself, a logical structure that is made up of one or more data files. A given data file can belong to only one tablespace, but may not be the only file belonging to that tablespace. A tablespace can contain many, many tables, indexes, and or other segments. The physical realization of those segments (say, one of the tables) is in the form of data blocks, but if a tablespace has more than one file, the data blocks that make up a table may very well be scattered across all of the files in the tablespace. Even if the tablespace has only one file, the individual data blocks for a table will be scattered around that file - although groups of them will be logically contiguous, in allocation units known as "extents".
    So, first you CREATE TABLESPACE, nameing one or more files to be created in support of that tablespace. Next you CREATE TABLE and specify the tablespace (NOT the data file) the table is to reside in. It is up to oracle internals to determine which blocks of the table go into which files ... and even where within those files.
    Edited by: EdStevens on Oct 27, 2010 5:03 PM

  • Create a table in SQL Server, Export tables from Microsoft Excel to Microsoft SQL Server, Populate the created table

    Hello team,
    I have a project that I need to do, what is the best approach for each step?
    1- I have to create a table in Microsoft SQL Server.
    2- I have to import data/ tables from Microsoft Excel or Access to Microsoft SQL Server. Should I use Microsoft Visual Studio to move data from Excel or Access?
    3-I should populate the created table with the data from the exported data.
    4-How should I add the second and third imported table to the first table? Should I use union query?
    After I learn these, I will bring up the code to make sure what I do is right.
    Thanks for all,
    Guity
    GGGGGNNNNN

    Hello Naomi,
    I have imported all the tables into SQL Server,
    I created a table:
    CREATE
    TABLE dbo.Orders
    Now I want to populate this table with the values from imported tables, will this code take care of this task?
    INSERT INTO dbo.Orders(OrderId, OrderDate)
    SELECT OrderId, OrderDate
    FROM Sales.Orders
    UNION
    SELECT OrderId, OrderDate
    FROM Sales.Orders1
    Union
    SELECT OrderId, OrderDate
    FROM Sales.Orders2
    If not, what is the code?
    Please advise me.
    GGGGGNNNNN
    GGGGGNNNNN

  • Where should i put the DEFAULT&SMARTBAR

    Hello,
    where should i put the DEFAULT&SMARTBAR ? and the main Menu ?
    in order to be shown in each form..
    in using Forms 6i.
    Regards,
    Abdetu..

    Hello Gerd,
    Thanks for reply..
    put such things into *a reference form* what is meant by a reference form do u mean the main form?
    Create a property class (PC) for your FORM-MODULE-properties,
    put this PC into the reference form.
    Create there an object group (OG), put the PC into the OG and the inherit the OG to your local form.
    Automatically you have then the PC inherited too.i did all what u mentioned..
    Bbut the problem is that the DEFAULT&SMARTBAR
    can't be seen in allllllllllll my forms in the main menu inspite of i put it into the form module property ->in the intial menu property.
    Regards,
    Abdetu..

  • How to create index not unique at the time of the CREATE TABLE

    Hi,
    I am trying to find out how in Oracle create secondary indexes that can accept duplicated into the CREATE TABLE statement, without have to execute a CREATE INDEX separately.
    As far I can see the only syntax accepted by Oracle 9i to create more than one index at the time of the table creation is:
    CREATE TABLE test_tab (x INTEGER, y INTEGER, z INTEGER PRIMARY KEY(x,y), UNIQUE(z))
    But, in my case I need to have the unicity only for the primary key, but not for the second index, that I would like to have not unique.
    How to do that inside of the CREATE TABLE statement?
    Any help?
    Thanks a lot in advance.

    To create an index automatically (not constraint related) , you will need to have an 'event' trigger on the schema that will (IE: detecting a table create/drop matching ARCHIVE_%) , generate the appropriate SQL required (create index sql) and pass THAT to a DBMS_JOB.
    Make sure you have job queue's enabled.
    This was the ONLY way that I could re-create a view automatically as new tables were created that matched a criteria IE ARCHIVE_JAN06, ARCHIVE_FEB06 etc.
    The application's "archiving" method created and was thus aware of these tables and permitted searching within 'archived' data, but 3rd party reporting applications needed to see a view encompassing all data, regardless of the tables involved. The view automatically created was a 'union_all' of all tables concerned.

  • Where Should I Set the Layer Break Marker?

    I am burning to a Memorex DVD+R DL media------
    I received this error message when burning:
    "Formatting was not successful. Layer 0 exceeds the
    maximum layer size allowed. Please choose a suitable
    marker location that will support this condition."
    I placed one approx halfway through my main sequence, which
    is a total of 4.6 GB, but I am still receiving this message.
    Where should I place the marker so I can successfully output?
    My total project is about 6.2 GB.

    So you are telling me that I could delete the DNS from each machine and set it in either the new modem or Time Capsule router.
    That is correct!
    I guess what I'm confused at is what device is doing what.
    Let's look at a few examples, hopefully to help understand where all these protocols/services (PPPoE, DNS, & DHCP) come into play:
    Scenario 1: Modem > Computer
    In this scenario, your ISP provides the DNS server IP address information to your computer via DHCP. DHCP also provides the other important IP address information: IPv4 address, subnet mask, & router IP to your computer in order to communicate on the Internet.
    Since your DSL ISP requires that you are authorized to access their Internet service, they utilize PPPoE to pass your account credentials (username & password) from your computer to their authorization server. Once verified, you are granted access.
    Scenario 2: Modem > Router (Actiontec) > Computer
    In this scenario, your Actiontec router provides your account credential (via PPPoE) to the ISP and also acts as a DHCP server. As a DHCP server, it provides your computer with the required IP addresses and passes on the ISP's DNS IP addresses as well. You do have an option with this router to enter a different set of DNS IP addresses ... like those for Google DNS or OpenDNS if you do NOT want to use the ISP's DNS servers. In this case, the Actiontec, uses its DHCP server to provide those addresses to your computer.
    Scenario 3: Modem > Upstream Router (Actiontec) > Downstream Router (TC) > Computer
    Since you have the TC configured as a bridge, it is basically a "pass-through" device. That is, the Actiontec will continue to provide the IP addresses just like in Scenario 2 "through" the TC so that wired or wireless clients connected to the TC get the addresses. Also, like in Scenario 2, you can assign DNS IP addresses on the TC ... and these would be provided to clients connected to it.

  • Where should i call the rfc function module? in xi or in r/3

    where should i call the rfc function module?
    for the synch scenario: file < -- >  xi <---> rfc
    i know the type of rfc is tcp/ip; but i'm not sure with the followings,
    and with some trials i can not even see any message via rwb even all the setting
    can be activated without errors.
    where should i create the rfc destination? in r/3 or xi
    where should i call the rfc via abap program? in r/3 or xi
    i guess the calling program should belong to the different server with the rfc itself....
    so confused....
    Thanks for your reply!!
    Jun

    if i create the destination in xi point to r/3, then i call the rfc use the destination in r/3 right ?
    The call doesnt use the destination in R3. XI has the RFC destination which is just used to connect to the R3 system
    but where i need to create the fm via se37? in xi or r/3 ?
    In R3
    Regards,
    Prateek

  • Where should I put the sevlet

    I just started to work with Tomcat and I compiled the helloWorld sevlet.
    It's said from a book that the sevlet should be placed in serlver_root/webapps/ROOT/WEB-INF/classes, however there isn't a "classes" folder in my WEB-INF folder. So I put the helloWorld sevlet in the WEB-INF folder.
    Then I type http://localhost:8080/servlet/helloworld in my browser, I get a message from the sever said "The requested resource (/servlet/HelloWorld) is not available".
    Could anybody tell me how can solve this prolbem, where should I put the sevelt?

    have ones more a look to your book - especially to information about the configuration file "web.xml" which also should be placed in the WEB-INF folder. This file defines which servlets should be found by the server and which request-URL should be mapped to this servlet.
    for examples concerning the web.xml file see those already defined in your server. copy one and edit it for your needs. if you really want to understand what else might be configured using web.xml see the DTD for this file - it's pretty good documented!
    hope it helps :)

  • Where Should I put the time capsule?

    Where Should I put the time capsule?
    I'm using a wireless modem/router provided by the internet company, and both (the TC and the router) are located next to the pc, in the living room . Using this way, I don't have signal in my bedroom. Should I get a signal amplifier?
    Thanks!

    It would be better to use EOP adapters (homeplug is another name) or ethernet to locate the TC closer to your room.. you can use another apple router to extend the wireless if you need to.

  • We can't add a decimal number column with the create table forms

    In the version 4, we can't add a decimal number column with the create table forms.

    In the GUI, I found the following column (I translate from french to english): PK, Name, Data_type, lenght, not null, default, comments.
    In the lenght field, if I enter 9,3 to have a NUMBER(9,3), I have a message saying that the number must be an integer.

  • Where should I save the camera calibration profile for Lightroom 2?

    I created some DNG Camera Profiles by DNG Profile Editor. For Camera Calibration in Camera Raw, I save those .dcp files in C:\ Administrator\ Documents and Settings\ Application Data\ Adobe\ Camera Raw \ CameraProfiles. However, I could't find such a subfolder in Lightroom folder, does any one know where should I save the dcp files for Lightroom 2? Thank you

    It's the same install folder for both Camera Raw and Lightroom (i.e., a .dcp installed in the folder you described will be readable by both CR and LR).
    Eric

  • Where should i fire the plug within the webdynpro component

    when the search don't match for the url parameters passed in my scenario, i need to display the error view page, so wanted to know where should i fire the plug within the webdynpro component. could some one guide plz.
    thanks n regards
    Anoop

    You can go for event handling. In the component controller, just fire an event that there is a search mismatch. Handle this event in your view, where you just fire the outbound plug.
    Or, since you get the parameters in the url itself, instead of having 2 views, you can do it in one view itself by displaying only an error message when there is no record matching the query. If there are records, make the search results visible. Just have a context attribute to manipulate the visibility. This can be done with the comp controller itself, without any events.
    Regards
    Nithya

  • Where should I store the rendered files?

    (My Color projects are in "Documents")
    Where should I store the rendered files?
    On my external HD with my FCP media? Or on my Hard Disk is fine ?
    Can I calculate that 1 Go of DV NTSC = 1 Go of rendered file in 10 bits?
    Many thanks

    this came up as a topic at a recent FCPUG seminar.
    Since the dawn of time, it is recommended practice to keep your media off the application drive.
    The more disks you have spinning, the better the chance that you will get the data throughput rates that will support the demands of your media. Whether that's a RAID or a JBOD, its up to you how you value your time and assets.
    I keep things as 'external' as possible, mostly because clients are anxious to get the material back, but I'd have to keep moving stuff around just to maintain the space. And I still have to get merciless with all the temporary FCP render stuff.
    jPo

  • For new Plant should we have to create a new sales organization?

    Hi Experts,
    I am going for one roll out project. In that we have to create new plant, so should i have to create new sales organization or else we can use the same. And also tell me what are the benefits & disadvantages of that.
    Thanks & Regards
    Chavi Patle
    Edited by: chavipatlesd on Jan 30, 2011 8:33 AM

    hi
    i will say only one logic here.
    if you define the plant or new plant you need to extend all the other organisational units for it right.
    then i there is no need for creation of new SALES ORGANISATION on the same.
    please take the advice of your PM in this regard he might be having different views from reporting perspective and might be your roll out project needs a new sales orgn or not.
    if you ask us thre is no need for creating a new sales organisation on the same.
    advantages:
    if there is a really need for creating a new sales orgn as wellas plant this mihgt be for reporting perspective only & analysis will be very clear.
    disadvantages:
    this is not a disadvantage but from Enterprise Structure point of view master data will increase ofcourse this master data is needed for smooth processing of SYSTEM
    hope this clears your issue.
    balajia

  • Where can I find the accuracy table !!!

    Hi..
    Anybody knows where can I find the accuracy table for calculate the accuracy for DAQ and SCXI
    (I want to calculate by hand, without using Accuracy calculator)
    Thanks in advance for any kind help.

    Hi Nok,
    I think that KB 2X4HGEBG should help.
    Regards,
    Luca
    Regards,
    Luca

Maybe you are looking for