Want to put tables into DB

Hi there,
I'm studying DBs again after a summer break and have forgotten some basics. I have 2 tables that I need to put into a DB but I'm not sure how I should do it. Here are the table names with their columns:
Student Table:
Student_id First_name Last_name Sex Title
Attendance Table:
Student_id Att_date
I'm not sure what the primary key and/or foreign keys will be in the Attendance table as Student_id is obviously the primary key in the Student table. Should there be a joint primary key in the Attendance table?
Many thanks,
James

CREATE TABLE
Purpose
Use the CREATE TABLE statement to create one of the following types of tables:
A relational table is the basic structure to hold user data.
An object table is a table that uses an object type for a column definition. An object table is explicitly defined to hold object instances of a particular type.
You can also create an object type and then use it in a column when creating a relational table.
Tables are created with no data unless a query is specified. You can add rows to a table with the INSERT statement. After creating a table, you can define additional columns, partitions, and integrity constraints with the ADD clause of the ALTER TABLE statement. You can change the definition of an existing column or partition with the MODIFY clause of the ALTER TABLE statement.
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_73a.htm#SQLRF01402
Joel P�rez

Similar Messages

  • Want to put URLs into a custom field in the requirements

    I tried to put some code into a custom field in Empirix eManager. I was trying to add a URL to the requirement where the person could see more information. Specifically, we have use-cases online and a mockup of the final product to be developed. I wanted to put a mockup URL and use-case URL for each of the requirements where appropriate to help the developers further understand their task.
    So, I did added something like this into the custom field when creating the test case:
    View Textbook Use Case
    Unfortunately the javascript didn't execute because the eManager application put the whole command in as a string. What displayed is exactly what you see above. I'm sure this is done for security reasons so that cross-sight scripting is protected against. However, I'm not trying to do anything suspect -- just trying to link things together.
    So I went to the database for our project in eManager. I could bypass the security coding that disallows code to be placed into the field by adding it at the database level. However, when I got there it became evident that I didn't know the datamodel well enough to successfully add a field value there without possibly causing some problems. In the past I've only queried the database and not any modifications.
    Can someone tell me how a custom field value is inserting into the database? Which tables does it need to be added to to maintain referential integrity? Or alternatively, do you have a document with the schema outlined? Are there any important stored procedures we'd be missing if going directly at the database. Can anybody advise me?

    Hello Gandalf,
    If you created a customer field in OXK3, I am afraid that the customer defined field created is only
    available on G/L account line items but not Customer or Vendor line items(The field is not available on SAPMF05A screens 301 and 302).But it is possible to use it in fast entry screens SAPMF05A 8xxx (see note 2596).
    Best Regards,
    Gladys xing

  • Finder forces to use password when I want to put document into trash. ML, MBP 2009.

    Hello,
    today I have got strange situation. When I try tu put document, PDF, photo (whatever) into trash by move / pulling or right clik or in Finder by push trash icon appears information: "Finder wants to make changes. Enter your password in order to it to allow." After entering the password the document disappeared but wasn't in the basket !
    I must enter the password for every document individually. I switched off a computer but didn't help. I searched Finder preferences but I found nothing.
    I will be grateful for the help.
    Regards
    Wojciech

  • Dont want to put MBP into sleep

    Hi, I download many things from internet and my internet connection is very slow. It takes ages to download. If i close my lid it switches to sleep mode and the download stopped. I dont want my Macbook pro switch to sleep when i close the lid. Is there any option? Is there any other way to keep download when lid closed. Please help?

    Use the NoSleep or Insomnia X app.   
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101

  • Recieved Apple Store gift cards but want to put/transfer into iTune/App Store is this possible

    Hi,
    I have recently been given Apple Store gift cards but would prefer to use them buy things from iTunes and the App store is there a way to transfer the funds?
    Thanks
    Doug

    You cannot buy itunes items but you can buy app store items.  iTunes gift cards can be used for both.  Here is an Apple document.
    http://store.apple.com/uk/accessories/giftcards Scroll to the bottom.

  • I want to put my harddrive that runs on OS X 10.3.9 into an enclosure.

    My harddive uses 10.3.9 and I want to put it into an external enclosure and boot from it with a new mac book that runs on Snow Leopard 10.6. Is this possible?? Has anyone done this? I mainly want to do it so I don't have to upgrade all my software right away when I buy the new computer. Please help. Thanks.

    Actually, XP is older than Snow Leopard and will install on a Mac via Boot Camp.
    So are numerous flavors of Linux.
    While Kurt's statement is true for Mac OS, Boot Camp, and several virtualization engines offer more options*:
    http://www.macmaps.com/macosxnative.html#WINTEL
    And as I say, you can run older applications, as long as they support Rosetta, and don't do anything that Snow Leopard doesn't like in terms of drivers. That's why I posted my FAQ*:
    http://www.macmaps.com/upgradefaq.html
    As you may find some of your older applications have been tested with Snow Leopard, and will still work.
    - * Links to my pages may give me compensation.

  • How to put data into a RFC import parameter structure from portal

    Hi, All,
    I have a RFC in which an import parameter is a structure (not a table). I want to put data into that structure. I know how to put data into a table or a string. I tried to use
    IRecordSet MyTABStr = (IRecordSet)structureFactory.getStructure(function.getParameter("MYTABSTR").getStructure());
    MyTABStr.setString("FIELD1", value1);
    MyTABStr.setString("FIELD2", value2);
    importParams.put("MYTABSTR",MyTABStr);
    But it works for table not structure.  Is there anybody know how to do that?
    Thanks in advance!
    Meiying

    Hi,
    You can try the following code -
    IRecord structure = (IRecord)structureFactory.getStructure(function.getParameter("MYTABSTR").getStructure());
    structure.setString("FIELD1", value1);
    structure.setString("FIELD2", value2);
    importParams.put("MYTABSTR",structure);
    Regards,
    Sudip

  • Putting Parameter into SQL Expression or convert to formula Basic or Crystal

    Post Author: yoschua
    CA Forum: Formula
    Hello,In my old report I got something like thisSELECT MIN(cast("ParDyn"."ParVal" as integer))FROM "result".ParDyn WHERE "ParDyn"."ParNo" = (SELECT Max("Piece"."ParDynNo")                          FROM "result"."Piece"                           WHERE "Piece"."RequestNo" = XPARAM1 And "Piece"."PieceNo" = XPARAM2)      And "ParDyn"."ParIdent" = 'Trace.Assignment'  This report are viewed from VB component - at old VB they read SQL from report, input XPARAM1 and XPARAM2 and put it into report again and the show report.Because now I want to make my aplication I convert this report to use it not only at this old aplication, but with CR Viewer too.I see I can not insert Parameter into SQL Statement, so I need to use Basic or Crystal Formula.I try to make something like this : minimum({ParDyn.ParVal})and {ParDyn.ParNo} = 0of cource zero should be exchange with next statement, but this not working.What I would like to get is only one record, I do not want get whale table into CR engine and then evaluate becouse this report must work on slow connection, so I need take from database only records witch I need. Can someone help me, or show how to insert into formula value as parameter taked from another table dynamicly ?? Best Regards Bartłomiej Jóźwiak 

    Ok,
    The only way I found to get the maximum status date of an employee with the date entered in parameter was to litteraly put each employee ID, and Status Date in the Detail section.
    Then in the select expert create the parameter date.
    Then I created a running total field that counts the employees and resets on change of employee sorted by status date.
    Then I created a formula that gets all the first occurences of this running total field and if the running total field equals 1, a new formula field shows 1 and if not (2 and more), it shows 0.
    But I can't find the way to give me the total that I need for each group sections.
    It's ok if the SQL expression field does not work, but I need to find a way to get the max date.
    Thank's for your help for the SQL Expression field.
    Steph

  • Wants To Put Songs In a Particular Order

    I've subscribed to spotify in order to build my playlists for my upcoming wedding.
    Though it doesn't matter what order the songs are in for cocktail hour, I have a DJ mentality and want to put songs into a good organized flow for the reception. Is there a way to do this?
    Thanks for any and all help
    -Melanie

    Hello:
    Yes you should be able to do this. Just create your playlists, and add the tracks you want and put them in the play order you want. You can do this by dragging each track up or down the playlist order listing you wish for the track to be played in the order you want, after those tracks have been added to the playlists of course. Just make sure you do not click on any of the columns in the playlists as that reorders the track listing accordingly to whichever column you click on. You probable will want to double check these playlists a day or so before the wedding, as the content gets updated daily, so any content not available before the wedding will be unplayable unless you download it previously before the wedding. If you have a permium account, what you can do once you have the playlists set up how you want, with the music you want, and the order I would download those playlists for offline use, as you can keep the music for up to 30 days without a device app resync to update the music licenses. Just make sure before you download the playlists for offline use, you select in the app Preferences for High Quality streaming so they are downloaded in the higher quality when you set the playlists for offline use.
    You can set up a test playlist and do the offline listening option in the high quality streaming to see how it will work when you use the device in offline mode without an Internet connection. A broken stream due to Internet issues could put a damper on things with songs having problems streaming over the internet. When you are ready to get the proper playlists downloaded for offline mode for the wedding, just put the test playlist back to online mode, and set the wedding playlists to offline so they can start the downloading procedure. The switching playlists back to online and offline ensures you stay within the 3,333 track download limit, but you should be fine for a wedding though unless it is going to go on for a week. :-)

  • Importing data tables into data tablespace and indexes into tablespaces

    Hi
    I want to import data into new schema and i want to store tables into data tablespaces and index into index tablespace ...can anyone tell me how it will possible...

    I want to import data into new schema and i want to store tables into data tablespaces and index into index tablespace ...can anyone tell me how it will possible...
    imp userid=/user/passwd show=y indexfile=import.sql indexes=n full=y
    imp userid=/user/passwd show=y indexfile=import2.sql full=y
    Edit the import.sql and import2.sql to modify the tables' tablespace and indexes tablespace.
    execute import.sql the script in the database. this will create the tables in their respective tablespace.
    imp userid=/user/passwd full=y ignore=y indexes=n constraints=y - to import just the data since the tables have already been created.
    imp userid=/user/passwd full=y ignore=y rows=n  - to import just the indexes since the tables and data have already been imported.

  • Combining two tables into one result

    Hi all, I am fairly inexperienced with Crystal but have gained good results from the reports I have created, I am fluent in SQL and Basic to an extent.  I am interigating a Pronto database and I want concatenate two tables into one report.
    Table One: Customer Orders
    Fields:  Customer No, Invoice Number, Invoice date, Invoice Amount, Cost Amount.
    Table Two: Archived Customer Orders
    Fields:  Customer No, Invoice Number, Invoice date, Invoice Amount, Cost Amount.
    I want to complete a report that will tell me the sales for a given period and the outstanding orders for each customer total for all fields in each table combined into one figure.
    Any help would be greatly appreciated.
    Thanks in advance

    Hi Grant,
    As you said you are goot at writing SQL, in Crystal write a SQL statement in Add Command to join both table using Union / Union all
    If you use Union then it will filter duplicate records and pull the data from database, If you use Union All then it will include all your duplicate records.  Please use Union / Union All as required.
    Once you get all data into the report create a parameter for date range and generate the summaries as required.
    Thanks,
    Sastry

  • Photographers!  App to put text into photos?

    I have some pics that I want to put titles into/onto.
    I am putting together a poster.  The top of the poster has a picture.  I want to put some text on top of/into the pic.
    What is a SIMPLE and EASY TO USE app where I can open the pic and type in the text and do some formatting?
    I do not want a 'template' app.  The one's in pages don't work for this project.
    Oh, I want it to be able to use the fonts I have.  A program that gives me limited fonts is NOT going to work.
    MAC OSX 10.6.8

    The free Apple app Preview that came with your computer can add text and edit/color correct images. Open the image in Preview and go to Help in the menu, Preview Help.
    Click on Annotate images and PDF documents and choose add text or a text bubble, follow the directions. To see how to edit images click on Edit Images.
    If you have iPhoto installed (you need to buy it from the App Store) you can edit/color correct in that app too. To add text to a photo in iPhoto you need to download this free plug-in for iPhoto to be able to add text to an image.
    BoarderFX
    http://www.iborderfx.com/iborderfx/

  • Extract the data in a view and put them into a table

    Hi, all
    I am a new beginer in Oracle. Recently I have a project with 70,000 records in the database. I made a view so that I can combine the tables and extract the columns I need. However making the view took me a lot of time, thus I want to put those data into a table so that I don't have to creat the view everytime to decrease the performance. Can you help me?
    Thanks!!
    joey

    You don't need to recreate the view, you can just:
    SQL> SELECT * FROM view_name;
    However, if you want to create a table that has the same columns as the view and insert the rows from the view, you can:
    SQL> CREATE TABLE table_name AS SELECT * FROM view_name;
    null

  • Single form that puts data into 5 tables

    Hi,
    I'm new to ApEx, I want to create a name and address form, that puts data into 5 tables at once, all on the same form.
    Is this possible with ApEx looking at the tables?
    or do I need to create a database procedure and point ApEx at that?
    I have a couple of books, but I can't find an example that does what I want to do.
    A URL to another resource would be a great help.
    Regards
    Michael

    Hi,
    I can't remember the exact reason,
    It was something to do with there being a many to one to many join in the tables in the view.
    [table] > [link table] < [table]
    then there isn't a parent child relationship in either direction.
    I think that the other problem in webdb was the view was updated using a 'like' command
    This was not good as the primary key is a number.
    Since we are probably migrating to ApEx, and a procedure already exists to perform this functionality, I'll give that a try.
    Regards
    Michael

  • How can i put below  table into internalt table

    how can i put below  table into internalt table and want to add both internal table into 3rd internal table.
    SELECT  * FROM J_1IEXCHDR  WHERE STATUS = 'P'.
    WRITE: / J_1IEXCHDR-LIFNR,
              J_1IEXCHDR-DOCNO,
              J_1IEXCHDR-EXYEAR,
              J_1IEXCHDR-BUDAT.
    SELECT * FROM J_1IEXCDTL  WHERE TRNTYP = J_1IEXCHDR-TRNTYP
                              AND DOCYR  = J_1IEXCHDR-DOCYR
                              AND DOCNO  = J_1IEXCHDR-DOCNO.
       WRITE: / J_1IEXCDTL-EXBAS,
                J_1IEXCDTL-EXBED,
                J_1IEXCDTL-RDOC1,
                J_1IEXCDTL-ECS.
    ENDSELECT.
    ENDSELECT.
    please help
    thanks in adavaced.

    hi laxman,
    use for all entries and get the required data.
    SELECT * FROM J_1IEXCHDR into table itab1 WHERE STATUS = 'P'.
    if not itab1[] is initial.
    SELECT * FROM J_1IEXCDTL into table itab2 for all entries in itab1 WHERE TRNTYP = itab1-TRNTYP
    AND DOCYR = itab1-DOCYR
    AND DOCNO = itab1-DOCNO.
    endif.
    so itab2 will have the common records...This will solve ur problem..
    also u can do other method declare an final internal table with the common fields of the two internal table.
    then after getting data in itab1 and itab2.
    loop at itab1.
    move-corresponding itab1 to itab3.
    read table itab2 with key <give the fields> = ......
    if sy-subrc eq 0.
    move-corresponding itab2 to itab3.
    endif.
    append itab3.
    endloop.
    Regards,
    nagaraj

Maybe you are looking for