如何使用knockout.js显示我的oracle表



这是我的表:

create table CARS
(
id           NUMBER not null,
gender       NUMBER,
firstname    VARCHAR2(25),
lastname     VARCHAR2(25),
manufacturer NUMBER,
model        NUMBER,
engine       NUMBER
)

和我的HTML:

<tr>
<th>Gender</th>
<th>firstName</th>
<th>lastName</th>
<th>ManuFacturer</th>
<th>Model</th>
<th>Engine</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</ItemTemplate>
</table>

knockout.js和编程是我的新事物;数据绑定=";text:性别;但我不知道这是否是从数据库中显示我的表的正确方式。我找了很多,但找不到任何解决方案。。希望有人能帮助我

  • Knockout.js是一个在客户端的web浏览器中运行的库
  • Oracle是一个数据库

通常,不可能(或不希望(从客户端浏览器中运行的任何应用程序直接连接到任何数据库。通常有一个中间层应用程序(即PHP、Java、C#、Python/Django等(位于两者之间,管理与数据库的连接池,并响应客户端的请求执行查询(并处理其他事情,如用户身份验证和数据格式化(。

您需要实现中间层,然后让您的客户端应用程序与之对话(而不是直接与数据库对话(。