Design of database

Hi.
Before I paint myself into a corner I have some questions.
The actual site is built with ADDT and will show pictures and movie clips from different persons.
Ex at http://www.olle.se.st/riviera_test/index2.php will show the most "hot" movies. Click on picture and a new page with movie and movie data opens.
http://www.olle.se.st/riviera_test/filmsid1.php?id=2
On another page is the personnel http://www.olle.se.st/riviera_test/personal.php
Click on picture of person opens the page for that person ex, http://www.olle.se.st/riviera_test/jean_paul.php click on picture there opens that persons movie page, http://www.olle.se.st/riviera_test/filmjeanpaul.php?id=2
At first I was thinking of one table in the database for personnel. And the one table fore each person containing the movies and data for the movies.
But that could end up in a lot of tables. It could be up to 20 persons. In that case I guess I guess I have to do 20different jean_paul.php and filmjeanpaul.php?id=2 pages,if you understand what I mean.
The question id then if it maybe is enough with two tables? One for persons and one fore movies that is linked with a "foreign key" in movies that keeps track on who have what movies.
I have been looking at the Image gallery tutorial at the ADDT site but I'm not quite sure it is exactly what I need.
I also want it to be easy to administer fore someone else but me. Eg delete and add persons and movies.
I'm greatful fore some thoughts or suggestions.
Regards
Olle

Hi Olle,
At first I was thinking of one table in the database for personnel. And the one table fore each person containing the movies and data for the movies
The question id then if it maybe is enough with two tables? One for persons and one fore movies that is linked with a "foreign key" in movies that keeps track on who have what movies
you´re on the right track with this approach -- one "movies" table would be all you ever need, as long you´d store the respective "personnel_id" in an extra column and define this one as foreign key to your "personnel" table´s primary key.
20 different jean_paul.php and filmjeanpaul.php?id=2
while it´s certainly OK to provide one "personnel_name.php" for each movie owner, I´d personally never link to individual "filmpersonnel_name.php" files from here, but rather provide one abstract "movie_details.php" page which receives the "personnel_id" as URL parameter, e.g. movie_details.php.php?personnel_id=4
I also want it to be easy to administer fore someone else but me. Eg delete and add persons and movies
you could use ADDT´s "levels" system for that, e.g. give an administrator a level of 1 and apply a "Restrict Access to Page" to the "admin_movies" lists and forms to make sure that only a "level 1" user can access these pages
Cheers,
Günter Schenk
Adobe Community Expert, Dreamweaver

Similar Messages

  • Someone please help me Design the database of bill of materials

    I want to design the database of bill of materials which contain item and amount.
    So the amount of child will depend on amount of parent in term of ratio. For example
    A(1)               A(2)
    |         ---->     |
    B(2)               B(4)
    My problem is when i try to add the parent and child . Let A is the parent of B , If i try to add A to be the child of C
    I want B to come along with A as well. For example
    A                       C
    |     C  --->        |           For this I have to store the relation of all item in  my list to check that this item have a child or not if yes
    B                             A              The child must come along with its parent , What the Er-diagram
    should be for all of my requirement?
                                    |
                                    B

    >I want B to come along with A as well. For example
    You can do that, but that is not automatic. You need to do some programming.
    It is better to use hierarchyid representation of the tree over traditional FK referencing.
    Tree using hierarchyid example:
    http://www.sqlusa.com/bestpractices2008/orgchart/
    BOL: "Model Your Data Hierarchies With SQL Server 2008
    .....The manufacturing system behind automobiles; the organization of a country into states, counties, cities, and postal codes; the description of a home entertainment system—what do these things have in common? The simple answer is that each
    describes a hierarchy.
    SQL Server 2008 supports a new data type, HierarchyID, that helps solve some of the problems in modeling and querying hier­archical information. I will introduce you to this data type by discussing a pattern commonly used in manufacturing
    known as bill of materials (BOM), or bills. Starting with a brief discussion of BOMs, I will illustrate how this kind of data can be modeled. I will also present an implementation of this model in SQL Server 2005. Then I will show you how the HierarchyID data
    type can be used to implement the model in SQL Server 2008.
    Hierarchical Data
    Automobiles are amalgamations of many components, such as engines, drivetrains, electronics, and steering. In the United States, our geographic territories are divided into states and are then sub-divided into jurisdictions called counties.
    Counties are then further subdivided in different ways by different agencies. The United States Census Bureau, for example, composes them from Census Tract Areas. The U.S. Postal Service routes mail delivery by Zone Improvement Plan (ZIP) codes. Geographic
    information systems (GIS) may aggregate census tracts and ZIP codes together to provide users with a familiar spatial reference for an area.
    A recent trip to a local electronics store to evaluate a replacement home entertainment system pointed to a similar sort of hierarchical system—all the combinations of possible components and options left my head spinning! I wondered
    how such systems could be modeled and implemented in a database system.
    The relationship between an automobile and its engine represents a hierarchy: the automobile contains the engine. The relationship is the same for the drivetrain, the electronics, and the steering. The relationship is containment. A
    similar hierarchy can be observed in the relationship between the different groupings of geographic or census data.
    Hierarchies exist everywhere, yet implementing them in the context of a relational database frequently proves to be a challenge. A typical approach is to represent the hierarchy using a parent/child relationship with one or more tables.
    While this approach certainly works in many cases, it has a few shortcomings. Such solutions must carefully consider how the referential integrity will be maintained. And while querying the depth and breadth of such tables was considerably simplified in SQL
    Server 2005 with the introduction of recursive common table expressions, writing queries against these types of tables can still be problematic when joins against many tables are required.
    A Bill of Materials Problem
    A few years ago I was working on a system being developed by a manufacturing company to help their dealers specify the components needed to build center-pivot irrigation systems. The software produced a list of components needed to custom-build
    the desired pivot (the totality of a center-pivot irrigation system is simply referred to as a pivot within the industry). The required components were determined based on geography, soil type, and the intended crops planted in the areas to be covered as well
    as the hydrologic and structural considerations of the device itself.
    Underpinning the solution would be a SQL Server database. The purpose of the database was to store information about the components available to build the pivot. However, when we generated the specification for manufacturing, we needed
    to identify those components as BOMs.
    Some bills represented a collection of physical parts that would be assembled into a system component. For example, every pivot needed a pump to draw water from a well into the system. That pump might be electrically powered, meaning
    it needed a transformer and fuse box, too. Or the pump might be fuel powered, meaning it needed a tank, a fuel pump, and hoses to connect the pump to the tank. In either case, the required parts for the pump would be listed in a pump bill.
    The bill for a complete pivot would include a collection of other bills. For example, a standardized pivot might consist of a tree of bills for the pump, another tree of bills for the spans of pipe used to deliver water, and bills for any other equipment
    needed to build that pivot system."
    LINK: http://msdn.microsoft.com/en-us/magazine/cc794278.aspx
    Kalman Toth Database & OLAP Architect
    SELECT Query Video Tutorial 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Someone please help me Design the database of bill of materials with 1 item can have mutiple parent

    I got this sample from  Uri
    Dimant (MCC, MVP) ,
    The problem is i want 1 item to have multiple parent  but this example don t   let 1  item to have multiple parents. this is not suit for my objective. 
    CREATE TABLE Employees
      empid   int         NOT NULL,
      mgrid   int         NULL,
      empname varchar(25) NOT NULL,
      salary  money       NOT NULL,
      CONSTRAINT PK_Employees PRIMARY KEY(empid),
      CONSTRAINT FK_Employees_mgrid_empid
        FOREIGN KEY(mgrid)
        REFERENCES Employees(empid)
    CREATE INDEX idx_nci_mgrid ON Employees(mgrid)
    SET NOCOUNT ON
    INSERT INTO Employees VALUES(1 , NULL, 'Nancy'   , $10000.00)
    INSERT INTO Employees VALUES(2 , 1   , 'Andrew'  , $5000.00)
    INSERT INTO Employees VALUES(3 , 1   , 'Janet'   , $5000.00)
    INSERT INTO Employees VALUES(4 , 1   , 'Margaret', $5000.00) 
    INSERT INTO Employees VALUES(5 , 2   , 'Steven'  , $2500.00)
    INSERT INTO Employees VALUES(6 , 2   , 'Michael' , $2500.00)
    INSERT INTO Employees VALUES(7 , 3   , 'Robert'  , $2500.00)
    INSERT INTO Employees VALUES(8 , 3   , 'Laura'   , $2500.00)
    INSERT INTO Employees VALUES(9 , 3   , 'Ann'     , $2500.00)
    INSERT INTO Employees VALUES(10, 4   , 'Ina'     , $2500.00)
    INSERT INTO Employees VALUES(11, 7   , 'David'   , $2000.00)
    INSERT INTO Employees VALUES(12, 7   , 'Ron'     , $2000.00)
    INSERT INTO Employees VALUES(13, 7   , 'Dan'     , $2000.00)
    INSERT INTO Employees VALUES(14, 11  , 'James'   , $1500.00)
    WITH EmpCTE(empid, empname, mgrid, lvl)
    AS
      -- Anchor Member (AM)
      SELECT empid, empname, mgrid, 0
      FROM Employees
      WHERE empid = 1
      UNION ALL
      -- Recursive Member (RM)
      SELECT E.empid, E.empname, E.mgrid, M.lvl+1
      FROM Employees AS E
        JOIN EmpCTE AS M
          ON E.mgrid = M.empid
    SELECT * FROM EmpCTE
    My object is
    I want to design the database of bill of materials which contain item and amount.
    So the amount of child will depend on amount of parent in term of ratio. For example
    A(1)               A(2)
    |         ---->     |
    B(2)               B(4)
    My problem is when i try to add the parent and child . Let A is the parent of B , If i try to add A to be the child of C
    I want B to come along with A as well. For example
    A                       C
    |     C  --->        |           For this I have to store the relation of all item in  my list to check that this item have a child or not if yes
    B                            
    A              The child must come along with its parent , What the Er-diagram should be for all of my requirement?
        |
        B
    Base on the example that Uri
    Dimant gave me ,  i have to stroe 1 item wtih multi parents for example if b is a child of a And b  have c as child , When i insert D as a parent of B   , c will automatic come along with B , But this not seem gonna work.
    item   Parent 
     A      NULL
    B         A
    C         B
    B         D
    Am i wrong to go this way  , any idea

    thanks Uri
    Dimant
    I am
    little confuse about how can i write
    hierarchy sql  from this relation  , Thanks
    so far i got 
    WITH EmpCTE(cid, cname, pid, lvl)
    AS
      SELECT      cid , cname ,  children.pid , 0
      FROM            children INNER JOIN
      parents ON children.pid = parents.pid
      where  cid = 1
      UNION ALL
      SELECT      E.cid , E.cname ,  E.pid , M.lvl+1
      FROM       ( select  cid , cname , children.pid FROM  children INNER JOIN
      parents ON children.pid = parents.pid) AS E JOIN EmpCTE AS M
          ON E.pid = M.cid
    SELECT * FROM EmpCTE  

  • New book! Physical Database Design: The Database Professional's Guide

    Morgan Kaufmann publishers have just released a new book on physical database design covering how to design indexes, range and hash partitioning, materialized views, storage layout, RAID, warehouse design and other physical design areas. The book covers Oracle and several other major databases. Lots of diagrams and examples. It's actually a really good book. An excellent book for people who design and administer databases.
    Available on Amazon and most other book sellers.
    Physical Database Design: The Database Professional's Guide to Exploiting Indexes, Views, Storage, and More
    by Sam S. Lightstone, Toby J. Teorey, Tom Nadeau
    Paperback, 448 pages, publication date: MAR-2007
    ISBN-13: 978-0-12-369389-1
    ISBN-10: 0-12-369389-6
    Series: The Morgan Kaufmann Series in Data Management Systems
    Link on Amazon:
    http://www.amazon.com/Physical-Database-Design-professionals-exploiting/dp/0123693896
    Link on the publisher's web site:
    http://www.elsevier.com/wps/find/bookdescription.cws_home/710637/description#description
    Comments on the book can be sent to: [email protected]

    how could we get the report of previous five years sale of the products.
    SELECT trunc(sale_date, 'YYYY'), sum(sale_qty)
    FROM   sales
    WHERE  sale_date >= add_months(sysdate-60)
    GROUP  BY trunc(sale_date, 'YYYY')
    suggest whether dropped Product name from the sale table as I already have a column prodid in it?Yes. Duplicated data is a Bad Thing. This is Rule #1 of the late Dr. Codd's 12 rules. These are the foundationstones of good relation design. Wikipedia has a good introduction to them.
    Cheers, APC

  • What the steps are useful for us while designing the database by Performanc

    Dear Experts
    Plz tell me.
    What the steps are useful for us while designing the database by Performance point of view.
    Like Proper indexing and table assing to specific tbalespace etc

    Oracle manuals would do the best for you. There is no step by step rules for tuning the database , had this be true , then Oracle must've write a programme , application or sql script to achive it . I would advise you to go through oracle performance and tuning guide .
    Hare Krishna
    Alok

  • To Design Distributed Database?

    What Architecture should I follow to Design Distributed Database?
    By using Forms at frount_end How do I design the Schema of client and server Database
    .

    I think you can use Java Trasaction API that is independent of the Resources and will give you more flexibility to handle trasactions
    This link may be helpful
    http://www.onjava.com/pub/a/onjava/2001/05/23/j2ee.html

  • Where Can I Find Components And Footprints Not Included In The Circuit Design Suite Databases?

    One of the most common questions asked by users of the Multisim and Ultiboard suite is about finding components. From time to time you may come across the need of a particular component or footprint (lanbdpattern) that is not included in the master databases. So where can you look for these components? There are multiple places to begin your search, both 3rd party and from NI that are free and readily accessible:
    One of the long-standing free resources is the Kittmaster's Component Database which is maintained by Kittmaster (Chris) one of our proven active veterans of this board as well as a Beta Tester of the Circuit Design Suite. You will find a vast collection of already built parts in Multisim and Ultiboard formats that have been submitted by users like you that have register on kittmaster's database and that actively upload custom component creations. I encourage you to register and share.
    NI has recently created the Circuit Design Community in response to requests from users around the world. The Circuit Design Community aims to provide an open resource for designers that need or would like to share Multisim components, Ultiboard footprints, sample design files and other documents that are of use for the design community. The basic difference between the Circuit Design Community and this Circuit Design Discussion Forum is that the Community is tailored for document and file sharing, whereas the Forum is designed with problem solving, tip sharing and general support questions in mind. Again, I encourage you not only to search, but also to share any components you may have created that are useful for other designers.
    Most manufacturers that offer SPICE or PSPICE models in their websites would typically allow you to download them free of charge, in most cases accepting a license agreement. The first step is to identify who the manufacture of the part you are looking for is, as well as cross-reference manufacturers. Then search in their corresponding websites for the product folder or design resources section. If you find SPICE or PSPICE models you can easily import those when creating a new component, remember that Multisim is highly compatible with PSPICE models, and every new release adds more compatibility. If you cannot find the model, it does not hurts to call or email the manufacture and ask directly if they have such models, in many cases they are not advertised in the web.
    Last, but not least, use your favourite internet search engine and see if anyone out there has posted or worked on a similar model.
    Thank you for using the support resources and I hope that these options fulfill most of the component searches that you may need to do.
    Message Edited by nestor on 04-14-2009 02:52 PM
    Nestor
    National Instruments

    You can have a look at some established projects that are using similar tools - where do they put the application files etc.
    There are things like XDG_CONFIG_HOME, XDG_DATA_HOME etc. http://standards.freedesktop.org/basedi … atest.html

  • EF Designer from Database with association

    Hi,
    I hope I selected the right category and forum otherwise let me know.
    I have simply added a EF From database workflow and it generated all the tables all right on the designer.  Now I'm trying to add an association from Customer to Contact and the first thing I get when I compile is Property is not mapped.  See image
    below.  What do I have to do ?  I don't see the CustomerId in the mapping below so I can't map it or there's something I don't understand

    Now I deleted the association and the CustomerId field in Contact and build then I tried creation the assosiation again and now I have a different message
    Error 1 Error 3004: Problem in mapping fragments starting at line 135:No mapping specified for properties Contact.CustomerId in Set Contacts.
    An Entity with Key (PK) will not round-trip when:
      Entity is type [CustomerManagerModel.Contact]
     C:\MyWork\WPF\ClientManager\CustomerModel.edmx 136 15 ClientManager

  • Designing XML Database

    Hello,
    I'm in the process of designing a relatively large XML DB System and I'm having some doubts regarding the best structure for the main XML document, in order to optimize search as well as organizing the document in such a way that is not relational (as I usually tend to think when designing an XML DB, for background reasons).
    Basically, we're trying to create a single XML document, but there's a lot of information spread in other entities and tables. We´re trying to minimize the tables and aggregate as much information as possible in a single XML file, to avoid any "relational" query, but also without getting redundant. To illustrate what I mean, here is an example:
    <?xml version="1.0" encoding="UTF-8"?>
    <doc>
         <people>
              <person>
                   <name> Johnny </name>
                   <address> St. Street, 444 </address>
              </person>
              <person>
                   <name> Tom </name>
                   <address> Mr. Street, 444 </address>
              </person>
              <person>
                   <name> Cat </name>
                   <address> Dr. Street, 444 </address>
              </person>
         </people>
         <vehicle>
              <driver>
                   <!-- redundant information, like above -->
                   <person>
                        <name> Johnny </name>
                        <address> St. Street, 444 </address>
                   </person>
              </driver>
         </vehicle>
    </doc>As you can see above, we have some redundant information repeated. Also, most importantly, I have no way of having some referencial integrity. Now, in the next example, I have tried adding a reference, using an ID node in the person element, in order to avoid the redundancy and get some integrity:
    <?xml version="1.0" encoding="UTF-8"?>
    <doc>
         <people>
              <person id="10">
                  <name> Johnny </name>
                   <address> St. Street, 444 </address>
              </person>
              <person id="11">
                   <name> Tom </name>
                   <address> Mr. Street, 444 </address>
              </person>
              <person id="12">
                   <name> Cat </name>
                   <address> Dr. Street, 444 </address>
              </person>
         </people>
         <vehicle>
              <driver>
                   <!-- storing just an ID reference> -->
                   <person>
                        <id>10</id>
                   </person>
              </driver>
         </vehicle>
    </doc>But that's my point: am I thinking "relational" here? Is there any other way to solve this, in a more efficient and secure way?
    best regards,
    - Breno

    You may like to take a look at HyperJAXB that I have used recently for a structure similar to yours. In HyperJAXB, you use JAXB binding with Hibernate on relational databas. So that you can get the results as XML document but you can also leverage relational database structure. And you can control all that without writing any code by adding annotations to XML schema document.
    -- Deha Peker

  • Tool for designing the database

    Hi, I'm assigned a task to design a small database (25 tables intially). I have given all details about the data. Can someone suggest me any free tool available which can help in ER Diagrams ( Relationships etc.)?
    I tried DB Desigener4 but its mainly for MySQL DB.
    Regards:
    Mukesh

    Hi ,
    You can use the JDev 10.1.3. which is free-licenced tool.....
    I think APC has proposed another free modeling tool...but i cannot remember it...!!!!
    If he reads your requirement , he will direct you appropriately.....!!!!!!
    Greetings,
    Simon
    Message was edited by:
    sgalaxy

  • Problems from oracle designer to database creation

    i am getting the following problem when creating a database using oracle designer:
    "has no role cannot regenerate"
    this is specific to the primary keys of each table
    has anyone come across this before? any ideas guys?
    Andy

    I think this belongs in another forum, but could you answer this question: Are you trying to generate database creation scripts by select Create Oracle Database in the DB Admin tab of the Design Editor?
    Kind regards,
    Russ Cannon

  • Designer hangs Database Middleware Selection Page on Linux Server.

    Hi All,
    I am facing an issues with Designer XI 3.1 when i try to connect to Red hat Linux 4.
    Whenever i try to create new connection or edit an existing one from the designer, the Designer screen just hangs at the Database Middlewatre Selection Page for about more than 90 minutes, but it eventually comes up.
    When i tried the same with a Windows Server, it works fine.
    Tried to set the hostname and ip address in the CMC but it does not help.
    The Environment is clustered and there are two linux servers and whenever the connection servers are stopped it runs fast, but when the connection servers are stopped it works fine.
    It also works when we login to designer in the no cms mode.
    Please help.
    -Shreyash.

    we are facing the same issue but in the Windows Server

  • Designer 6i / Database Oracle 10G / Metadata on Oracle 9. Is that possible?

    Dear all,
    Please give me a suggestion here! We have the Developer tools 6i and will want to bring a new Oracle 10G database into Designer 6i and the metadata to be stored in 9i database. Please let me know if this is possible or should we go for higher versions of Designer.
    Cheers
    Sarma.

    Sarma,
    I assume you want to install Des6i in a 9i database: that's possible.
    Then you want to capture the database(definitions) from a 10g database into that Des6i version: also that's possible.
    But I think it is not a supported combination...
    HTH
    Roel

  • Designing relational database from flat file

    hi all,
    I have little background in the filed of databases. As my work task I have to design a realtional databse from a flat file with 60 fields. would you please guide me how to or, the documents that i can refer to develop a good and efficient design.? I would appreciate your help and would love to work and read and learn to any level to get it right.have a good day

    user501335 wrote:
    Thank you very much Gerwin and Edstvens for your replies. I guess I must have elaborated a little more.
    Gerwin, I have gone throught the link you have sent me, and it was good to know that I am already aware of till this level.. Thank you for the help, can you please suggest little more so that i can go a little advance. we would be developing it for sql server2008.
    edstevens, So kind of you to send me a good suggestion.I will keep in mind while working on it.Would you please like to suggest me something more?
    No.
    If people would just get Third Normal Form burned into their brains, a lot of other problems would go away.
    wish you both a good day

  • 4.0 EA3 import from designer and database leads to differences in compare models

    Hello,
    I followed two ways to import a model in Data Modeler:
    1 - an import from Oracle Designer
    2 - an import from the database generated on basis from Oracle Designer
    Then I compare the two models in Data Modeler, and found differences ...
    One of the differences is in Table check constraints. The text is the same when viewing it in the compare model.
    So I opened the corresponding XML files for the tables and compared the XML for the constraint text. And there are differences:
    example:
    <rule>(file_locatie is not null and file_naam_org is not null) or&lt;br/&gt;(file_locatie is null and file_naam_org is null)</rule>
    <rule>(file_locatie is not null and file_naam_org is not null) or&lt;br&gt;(file_locatie is null and file_naam_org is null)</rule>    <<-- designer
    the design imported from designer contains br, the databse imported version contains br/
    This should not be considered during comparision, or better: boths imports should use the same way of formatting.
    Joop

    The Rule specification is not re-formatted in Data Modeler code; it is stored as extracted from the database.
    For Oracle Database, the Rule is extracted using SQL of the form SELECT search_condition FROM dba_constraints/all_constraints WHERE constraint_type = 'C';
    For Oracle Designer, the Rule is extracted using SQL like SELECT txt_text FROM rm_text_lines WHERE txt_type = 'CDWHCL';
    Are you able to tell how your Table Check Constraint is represented (with respect to the 'br') in your Database and Designer?
    Regards,
    Tony

  • Designer Creating Database

    (Designer 9i)Hi I've got all diagrams DFD ERD.... and now I want to generate database I don't know how to do this.

    Please read this topic "Generating a default design from analysis data" in the on-line help.

Maybe you are looking for

  • Adapter Specific Identifiers of a business system

    I created a business system and a sender RFC adapter under that. RFC destination is working fine now from the R/3 system now. When I go to the business system Adapter specific identifiers the R/3 system ID and Client are coming blank ; tried to compa

  • Memory leak in OCCI/libclnts on Linux RHEL 5.5 ? Please advise...

    Hi all, Starting with some background: I have an application that has been running on 32-bit Linux server for years without problem, a few weeks ago it was ported to 64-bit RHEL 5.5 (compiled with -m32). Now with the application in the new environmen

  • Easy to produce - Memory Leak in JVM Using thread

    I was just debugging the problem with our server and got this error (not from the original code, I reproduced it with small code) at java.lang.Thread.run(Unknown Source) java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thre

  • Default 'from' email address

    Hi, I use (and prefer) my +dot mac+ email address over the later +dot me+ one. My default email address from my computers when using Apple Mail app or Mobile Me via a web browser is set to my +dot mac+ address. But from my iPhone, the default +sent f

  • HT201318 is there a way to retrieve data from an older icloud backup?

    need help recovering voicemail from icloud, any ideas?