[std.database]
Steve Teale
steve.teale at britseyeview.com
Sat Oct 15 23:03:23 PDT 2011
On Sun, 16 Oct 2011 00:36:52 +0200, bls wrote:
> LIKE : RowSet
> The RowSet implementation is pretty cool. Especially the convenience
> implementation. Guess this RowSet implementation will ease D ORM
> development.
>
> MISS : MetaData
> Without thinking too much about Object Relational Mappers and GUI
> Adaptors...
> Having Meta information is not a bad thing. In other words NEEDED.
>
> A draft :
> string[] GetDataBases()
> string[] GetSchemas()
> IColumns GetColumns()
> string [] GetStoredPredures()
> etc...
>
> Why ? - Enable creating a Visual DB Toolkit, ER Designer, D ORM source
> code generator....
>
> MISS : Mapping Functionality
> Map D types to database types and vice versa
>
> Why ? - See ORM
>
> MISS/WANT LATER : Transaction and stored procedure support Makes IMHO
> not too much sense to implement MySQL TTS and Stored proc. specific
> code right now.
>
> Why ? Seems to be hard to create a common Interface. (nested
> Transactions are not avail. on all systems, just to face one thing)
> Nevertheless. A DB without TTS is not worth to be included into
> std.database
>
> MISS/EXOTIC : Database Events
> CallBack Implementation for DB Server triggered events
>
>
> -----------------------------------------------------------------------
> FWIW
>
> Since creating an universal Database Interface has much to do with
> abstraction and ergo with OOP patterns...
>
> From an OOP view .. What is needed at Level _Two_ ? (DB classes)
>
> _GoF pattern_ :
>
> The Factory Design pattern -> In order to enable database independent
> development.
> OR
> The Prototype pattern -> smarter than Factory, but this pattern requires
> the implementation of ICloneable respective MemberwiseClone
>
> The Observer Pattern ->
> Get and transfer DB Server-side Events to interested parties.
>
> What is needed at Level _Three_ ? (Object Relation Mapper) Enterprise
> patterns
>
> - The Data Mapper pattern
> - The Active Record Pattern (optional) - The Unit Of Work Pattern
> ------ UOW Pattern is using the (GoF) Memento Pattern
>
> Random thoughts..
> I guess that we will need std.uid ( getGUID() getOID() etc ) and also
> std.serialisation -> ( orange library) to make std.database work.
>
> Finally .. as I see the Levels
> 1 etc.c
> 2 Database classes - D query language 3 ORM classes
> 4 GUI Adaptor classes
>
> I hope this comments are useful. will try your MySQL stuff on WIN 7
> asap, and (maybe) create a more detailed ORM design within the
> following days.. Thanks, Bjoern
Bjoern,
Lots of people have visited the page, but first you were. However I could
have a lot worse fist comment. Thank you for your considered constructive
criticism. The metadata sounds like a good task for a quiet Sunday.
Also I'll add that the mapping functionality is pretty much all there,
just not explicitly exposed. A job for Monday perhaps ;=)
Steve
More information about the Digitalmars-d
mailing list