- 专利标题: System and method for providing user defined types in a database system
-
申请号: US11057475申请日: 2005-02-14
-
公开(公告)号: US20050177585A1公开(公告)日: 2005-08-11
- 发明人: Ramachandran Venkatesh , Jun Fang , Jose Blakeley , Beysim Sezgin , Balaji Rathakrishnan , Peter Carlin
- 申请人: Ramachandran Venkatesh , Jun Fang , Jose Blakeley , Beysim Sezgin , Balaji Rathakrishnan , Peter Carlin
- 申请人地址: US WA Redmond
- 专利权人: Microsoft Corporation
- 当前专利权人: Microsoft Corporation
- 当前专利权人地址: US WA Redmond
- 主分类号: G06F7/00
- IPC分类号: G06F7/00 ; G06F17/00 ; G06F17/30
摘要:
A database system and method allows a user to write program code in a high-level programming language that implements a class that defines the structure of a user-defined type and methods that can be invoked on instances of the type. The class is then registered with the database system, which enforces a specific contract for user-defined types against the class. The contract comprises the following requirements. First, the class must specify one of a plurality of different formats for persisting instances of the user-defined type in a database store. Second, the class must be capable of returning a null value for the user-defined type. Third, the class must provide a method for converting the user-defined type to another type. Once these requirements are satisfied, the database system enables instances of the user-defined type to be created. A user-defined type can be used in all contexts where any other built-in type can be used. This includes defining columns of tables, declaring variables and parameters to functions and stored procedures, and evaluating expressions of the user-defined type in SQL queries and updates. Preferably, the database system stores metadata about the user-defined type for subsequent use in creating instances of the type.
公开/授权文献
信息查询