in

The ORM Foundation

Get the facts!

need help for conceptual modelling of database

Last post Wed, Oct 17 2012 8:33 by Menghins. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • Thu, Oct 11 2012 6:41

    • Menghins
    • Top 150 Contributor
    • Joined on Thu, Oct 11 2012
    • Posts 3

    need help for conceptual modelling of database

    hi superguys, im building a website that supports a multiplex cinema, and allows users to book tickets for the screenings; so an user can do a prenotation, and i have set a class/object 'prenotation'; i need to track the prenotation, that mean also the movie, the cinema, the date etc.. and if another user want to book, he cant see the booked seat as available, so i think i need to report someway the busy places so i (and the users) can know which places are free and this is way i think i need to track the prenotation now i wonder: first of all, should i think about this problem in the conceptual model? yes? so how should i manage this function in the conceptual model? should i give the right attributes to the prenotation class, in way that, for every prenotation i know the movie,the date, the cinema and the seat? or i can solve this in the relational schema? SUGGEST!!! SUGGEST!!! SUGGEEST!!! SUGGEEEST!!! :beer:
  • Thu, Oct 11 2012 8:28 In reply to

    • Ken Evans
    • Top 10 Contributor
      Male
    • Joined on Sun, Nov 18 2007
    • Stickford, UK
    • Posts 805

    Re: need help for conceptual modelling of database

    Hi Menghins,

    You can think of a conceptual model as a set of facts with associated constraints.
    So what you need to do is to state the facts.
    For example:
    Cinema 1 is showing the movie "Top Gun" on 15 October.
    Cinema 2 is showing the movie "The Battle of Britain" on 15 October.
    Cinema 3 is showing the movie ""Roman Holiday" on 15 October

    You analyze facts like these into what we call a "Fact Type":
    e.g. Cinema(.nr) will show Movie(.title) on Date()

    You can use an ORM tool such as NORMA to do this.

    After you have built the conceptual model, you can use NORMA to automatically generate a logical model such as an entity-relationship model or a class model.The logical model can then be used to generate a database (e.g. in SQL Server).

    After that you can write your web pages to maintain and report on the data in the database.  

    You can download NORMA and related tutorials from the Library.

    Ken

     

     

     

     

  • Fri, Oct 12 2012 7:43 In reply to

    • Menghins
    • Top 150 Contributor
    • Joined on Thu, Oct 11 2012
    • Posts 3

    Re: need help for conceptual modelling of database

    thank you, norma seems to be very interesting for the last piece of this project, i will take deepen; i have still some doubts about the conceptual model: i want to count the number of peoples that come to see the screening, and i have more than a cinema, and in a day i have more projection with different time, so is it legit to add a class with the purpose to be an archive of this numbers? im adding this class also for doing different studies about that (what film had more success in this year? how much did it earn in that month? how many people came to watch it?) or should i think about this later? ps: maybe a class is not the optimal solution
  • Fri, Oct 12 2012 9:51 In reply to

    • Ken Evans
    • Top 10 Contributor
      Male
    • Joined on Sun, Nov 18 2007
    • Stickford, UK
    • Posts 805

    Re: need help for conceptual modelling of database

    From the way that you are phrasing your questions, I infer that you are using the object-oriented paradigm to create "data stores" by just inventing a new object(class) when you see a need to store some more data.

    Whilst I know that this approach is very popular and widely used, I think that it is a poor and ineffective way to create data structures. For example the approach leads to data duplication and lots of confusion.(such as that which you seem to be experiencing right now).

    The approach that we recommend is to begin by deciding what data you need and then to design user interface code such as a web page to maintain the data. The procedure is defined in the Conceptual Schema Design Procedure (CSDP) that is described in some of the papers in the library. (For example this one: http://www.ormfoundation.org/files/folders/orm_overview/entry73.aspx)

    With our fact-based approach you begin by defining facts and storing them in an object-role model. This defines your universe of discourse.
    An object-role model is a semantic model. It is not related to the popular "Object-Oriented" methods which are about creating coding artefacts (objects).

    If you want to look at some examples, I suggest that you download the examples stored in Library>Open Source models.

    Ken

  • Fri, Oct 12 2012 20:38 In reply to

    Re: need help for conceptual modelling of database

    You want something like the attached model for your core.
  • Sat, Oct 13 2012 0:27 In reply to

    • Ken Evans
    • Top 10 Contributor
      Male
    • Joined on Sun, Nov 18 2007
    • Stickford, UK
    • Posts 805

    Re: need help for conceptual modelling of database

    Hi Clifford,

    Thanks, that's a lot of help - especially for those of us that understand ORM2 notation and it is trhe right place to start.

    However, I suspect that Menghins (and others with an OO background) would also find it helpful to see the logical model that is generated from your object-role model. So perhaps you could  post the table structure and class model that NORMA generates from your model.

    Menghins was asking about the wisdom of adding another class or not.
    As you and I know, it is much easier to change an ORM2 model and then use NORMA to generate the ER or class model than it is to try to "manually" figure out the new ER or class structure directly.

    Ken 


  • Sat, Oct 13 2012 6:32 In reply to

    Re: need help for conceptual modelling of database

    Ken Evans:

    Menghins was asking about the wisdom of adding another class or not.
    As you and I know, it is much easier to change an ORM2 model and then use NORMA to generate the ER or class model than it is to try to "manually" figure out the new ER or class structure directly.

    You're right - he seems to be imagining functional areas of code and trying to partition them into categories, with the thought of implementing a class for each category. This is almost always the wrong approach, and it's not even a correct O-O approach, it's just functional decomposition in object terminology.

    It's necessary to first determine what are the facts which describe a situation, then decide how to create/update (populate), index, search and manage those facts afterwards. I should have pointed this out. However, it never hurts to show the conceptual structure of the facts first, it always gets the brain-cells tingling :). I find when people see the conceptual structure of the facts simply presented, they visualise a different approach to implementing the program's functions also.

  • Wed, Oct 17 2012 8:33 In reply to

    • Menghins
    • Top 150 Contributor
    • Joined on Thu, Oct 11 2012
    • Posts 3

    Re: need help for conceptual modelling of database

    ok, im fine, and thanks, you make me feel important XD, unfortunately im chained to the university`s indication for this project and i cant follow you in more interesting reasoning for now; i hope we will meet again when i will start to work for my self, big hug
Page 1 of 1 (8 items)
© 2008-2024 ------- Terms of Service